When exporting translations, quote the backslash

bzr revid: p_christ@hol.gr-20090608221923-he37i0dztj3shpvm
This commit is contained in:
P. Christeas 2009-06-09 01:19:23 +03:00
parent 3680a51aa8
commit b142b5f546
1 changed files with 2 additions and 1 deletions

View File

@ -273,7 +273,8 @@ class TinyPoFile(object):
def write(self, modules, tnrs, source, trad):
def quote(s):
return '"%s"' % s.replace('"','\\"') \
.replace('\n', '\\n"\n"')
.replace('\n', '\\n"\n"') \
.replace(' \\ ',' \\\\ ')
plurial = len(modules) > 1 and 's' or ''
self.buffer.write("#. module%s: %s\n" % (plurial, ', '.join(modules)))