From 0725bfe33d57ea4bdf18eab99b2a1e15904b4b09 Mon Sep 17 00:00:00 2001 From: Chris Mayo Date: Sat, 18 Jul 2015 20:43:43 +0100 Subject: [PATCH] Stop using concatenation to create docstring Fixes gramps failing to start if file is byte-compiled and optimized which sets __doc__ to None. --- gramps/gen/datehandler/_datestrings.py | 32 ++++++++++++-------------- 1 file changed, 15 insertions(+), 17 deletions(-) diff --git a/gramps/gen/datehandler/_datestrings.py b/gramps/gen/datehandler/_datestrings.py index 403e783a9..a94a709b7 100644 --- a/gramps/gen/datehandler/_datestrings.py +++ b/gramps/gen/datehandler/_datestrings.py @@ -21,6 +21,21 @@ """ Date strings to translate per each language for display and parsing. + +__main__ +-------- + +Run this code with the appropriate ``LANG`` and ``LC_DATE`` set for your target +language, in order to generate the .po snippets initialized with the strings +from your locale (from the deprecated data provided in _grampslocale). + +E.g., for French:: + + LANG=fr_FR.utf8 LC_ALL=fr_FR.utf8 GRAMPS_RESOURCES=$PWD python -m gramps.gen.datehandler._datestrings + +Then merge the output into your language's .po file, and further modify the +strings as needed. Then remove the strings from your language's +:class:`DateParserXX` and :class:`DateHandlerXX` classes. """ #------------------------------------------------------------------------- @@ -233,23 +248,6 @@ class DateStrings(object): _("Saturday"), ) -__doc__ += """ -__main__ --------- - -Run this code with the appropriate ``LANG`` and ``LC_DATE`` set for your target -language, in order to generate the .po snippets initialized with the strings -from your locale (from the deprecated data provided in _grampslocale). - -E.g., for French:: - - LANG=fr_FR.utf8 LC_ALL=fr_FR.utf8 GRAMPS_RESOURCES=$PWD python -m gramps.gen.datehandler._datestrings - -Then merge the output into your language's .po file, and further modify the -strings as needed. Then remove the strings from your language's -:class:`DateParserXX` and :class:`DateHandlerXX` classes. -""" - if __name__ == '__main__': import sys from ..utils.grampslocale import GrampsLocale