From 3ea8f0f81b09a56ff4591cc20bcf5989b098c397 Mon Sep 17 00:00:00 2001 From: Kornel Benko Date: Thu, 8 Jun 2017 17:57:32 +0200 Subject: [PATCH] Amend 268ae66: Enable use of '\\' chars and empty lines in HelpText --- po/lyx_pot.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/po/lyx_pot.py b/po/lyx_pot.py index d783fe9ff8..b45f34f346 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 = '' -- 2.39.2