When collecting strings from ui-files, transform the html entity '"'

to '"' for the sake of gettext tools, which are html-agnostic.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@37029 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Enrico Forestieri 2010-12-29 02:00:27 +00:00
parent 6f0a9d94fe
commit b5c25fe3b2

View File

@ -222,7 +222,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;', '>')
string = string.replace('&amp;', '&').replace('&quot;', '"')
string = string.replace('&lt;', '<').replace('&gt;', '>')
string = string.replace('\\', '\\\\').replace('"', r'\"')
string = string.replace('&#x0a;', r'\n')
print >> output, '#: %s:%d\nmsgid "%s"\nmsgstr ""\n' % \