]> git.lyx.org Git - lyx.git/commitdiff
Amend 268ae66: Enable use of '\\' chars and empty lines in HelpText
authorKornel Benko <kornel@lyx.org>
Thu, 8 Jun 2017 15:57:32 +0000 (17:57 +0200)
committerKornel Benko <kornel@lyx.org>
Thu, 8 Jun 2017 15:57:32 +0000 (17:57 +0200)
po/lyx_pot.py

index d783fe9ff84a77d5c3ba7f4e8e3454873dfe2e5e..b45f34f3464ab2f193ed9f3b46ee3e90a06d37d4 100755 (executable)
@@ -540,6 +540,8 @@ def external_l10n(input_files, output, base):
                 elif HelpTextSection.match(line):
                     (help_string,) = HelpTextSection.match(line).groups()
                     help_string = help_string.replace('"', '')
+                    help_string =  help_string.replace('\\', '_backsl_')
+                    help_string =  help_string.replace('_backsl_', '\\\\')
                     if help_string != "" and prev_help_string == '':
                         print(u'#: %s:%d\nmsgid ""\n"%s\\n"' % \
                             (relativePath(src, base), lineno+1, help_string), file=output)
@@ -547,6 +549,10 @@ def external_l10n(input_files, output, base):
                     elif help_string != "":
                         print(u'"%s\\n"' % help_string, file=output)
                     prev_help_string = help_string
+                else:
+                    # Empty line
+                    print(u'"\\n"', file=output)
+                    prev_help_string = 'xxxx'
             elif HelpTextStart.match(line):
                 inHelp = True
                 prev_help_string = ''