mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 10:00:33 +00:00
Amend 268ae66
: Enable use of '\\' chars and empty lines in HelpText
This commit is contained in:
parent
cb5464ea2b
commit
3ea8f0f81b
@ -540,6 +540,8 @@ def external_l10n(input_files, output, base):
|
|||||||
elif HelpTextSection.match(line):
|
elif HelpTextSection.match(line):
|
||||||
(help_string,) = HelpTextSection.match(line).groups()
|
(help_string,) = HelpTextSection.match(line).groups()
|
||||||
help_string = help_string.replace('"', '')
|
help_string = help_string.replace('"', '')
|
||||||
|
help_string = help_string.replace('\\', '_backsl_')
|
||||||
|
help_string = help_string.replace('_backsl_', '\\\\')
|
||||||
if help_string != "" and prev_help_string == '':
|
if help_string != "" and prev_help_string == '':
|
||||||
print(u'#: %s:%d\nmsgid ""\n"%s\\n"' % \
|
print(u'#: %s:%d\nmsgid ""\n"%s\\n"' % \
|
||||||
(relativePath(src, base), lineno+1, help_string), file=output)
|
(relativePath(src, base), lineno+1, help_string), file=output)
|
||||||
@ -547,6 +549,10 @@ def external_l10n(input_files, output, base):
|
|||||||
elif help_string != "":
|
elif help_string != "":
|
||||||
print(u'"%s\\n"' % help_string, file=output)
|
print(u'"%s\\n"' % help_string, file=output)
|
||||||
prev_help_string = help_string
|
prev_help_string = help_string
|
||||||
|
else:
|
||||||
|
# Empty line
|
||||||
|
print(u'"\\n"', file=output)
|
||||||
|
prev_help_string = 'xxxx'
|
||||||
elif HelpTextStart.match(line):
|
elif HelpTextStart.match(line):
|
||||||
inHelp = True
|
inHelp = True
|
||||||
prev_help_string = ''
|
prev_help_string = ''
|
||||||
|
Loading…
Reference in New Issue
Block a user