Mercurial > p > roundup > code
changeset 2382:c7a05bddd453
escape quotes in msgids
| author | Alexander Smishlajev <a1s@users.sourceforge.net> |
|---|---|
| date | Sat, 29 May 2004 04:32:00 +0000 |
| parents | 00001a0e3fe5 |
| children | bacda30e7eb6 |
| files | roundup/cgi/TAL/talgettext.py |
| diffstat | 1 files changed, 3 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/roundup/cgi/TAL/talgettext.py Sat May 29 02:22:13 2004 +0000 +++ b/roundup/cgi/TAL/talgettext.py Sat May 29 04:32:00 2004 +0000 @@ -14,6 +14,7 @@ ############################################################################## # Modifications for Roundup: # 1. commented out ITALES references +# 2. escape quotes in msgids """Program to extract internationalization markup from Page Templates. @@ -42,7 +43,7 @@ #from ITALES import ITALESEngine from roundup.cgi.TAL.TALDefs import TALESError -__version__ = '$Revision: 1.3 $' +__version__ = '$Revision: 1.4 $' pot_header = '''\ # SOME DESCRIPTIVE TITLE. @@ -304,7 +305,7 @@ for filename, position in positions: outfile.write('#: %s:%s\n' % (filename, position[0])) - outfile.write('msgid "%s"\n' % msgid) + outfile.write('msgid "%s"\n' % msgid.replace('"', '\\"')) outfile.write('msgstr ""\n') outfile.write('\n')
