* po/lyx_pot.py (qt4_l10n):

- escape backslashes in ui strings.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@24599 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Jürgen Spitzmüller 2008-05-04 08:55:05 +00:00
parent 832bbc4329
commit 63f67b0116

View File

@ -161,7 +161,8 @@ def qt4_l10n(input_files, output, base):
# get lines that match <string>...</string>
if pat.match(line):
(string,) = pat.match(line).groups()
string = string.replace('&amp;', '&').replace('&lt;', '<').replace('&gt;', '>').replace('"', r'\"')
string = string.replace('&amp;', '&').replace('&lt;', '<').replace('&gt;', '>')
string = string.replace('\\', '\\\\').replace('"', r'\"')
print >> output, '#: %s:%d\nmsgid "%s"\nmsgstr ""\n' % \
(relativePath(src, base), lineno+1, string)
input.close()