diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-02-28 14:05:29 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-02-28 14:05:29 +0300 |
commit | 13b4126208ae5cda2c57f996bf8e1dc7a1a19c43 (patch) | |
tree | 442f6824913f0286479e97e006431e564fcce935 /lang | |
parent | af29bfd2762c9e7ee55515cbe74d2bec029d8390 (diff) | |
download | evol-tools-13b4126208ae5cda2c57f996bf8e1dc7a1a19c43.tar.gz evol-tools-13b4126208ae5cda2c57f996bf8e1dc7a1a19c43.tar.bz2 evol-tools-13b4126208ae5cda2c57f996bf8e1dc7a1a19c43.tar.xz evol-tools-13b4126208ae5cda2c57f996bf8e1dc7a1a19c43.zip |
lang: fix writing po files with single slash inside strings.
Diffstat (limited to 'lang')
-rwxr-xr-x | lang/updatelang.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lang/updatelang.py b/lang/updatelang.py index da7f691..d6afd4e 100755 --- a/lang/updatelang.py +++ b/lang/updatelang.py @@ -289,11 +289,15 @@ def writePoFile(poDir, texts, trans): if line[0] in strComments.keys(): writePoComments(w, strComments[line[0]]) - w.write ("msgid \"" + line[0].replace("\"", "\\\"") + "\"\n") + srcLine = line[0] + srcLine = srcLine.replace("\\", "\\\\"); + srcLine = srcLine.replace("\"", "\\\"") + w.write ("msgid \"" + srcLine + "\"\n") trLine = line[1] if trans == "en": if len(trLine) > 2 and (trLine[-2:] == "#0" or trLine[-2:] == "#1"): trLine = trLine[:-2] + trLine = trLine.replace("\\", "\\\\"); trLine = trLine.replace("\"", "\\\"") w.write ("msgstr \"" + trLine + "\"\n\n") |