commit 3ea8f0f81b09a56ff4591cc20bcf5989b098c397
Author: Kornel Benko <[email protected]>
Date:   Thu Jun 8 17:57:32 2017 +0200

    Amend 268ae66: Enable use of '\\' chars and empty lines in HelpText
---
 po/lyx_pot.py |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/po/lyx_pot.py b/po/lyx_pot.py
index d783fe9..b45f34f 100755
--- a/po/lyx_pot.py
+++ b/po/lyx_pot.py
@@ -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 = ''

Reply via email to