diff options
author | Andrei Karas <akaras@inbox.ru> | 2019-01-26 20:16:34 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2019-01-26 20:16:34 +0300 |
commit | 5df08951f736dea8d0fe38d79d48e06f56ad1397 (patch) | |
tree | 9f11940a996e5417e1e4d0ce31c7c77e155b0b40 /lang | |
parent | a5e265d2adaff23db447e0879e8a91cdd44558be (diff) | |
download | evol-tools-5df08951f736dea8d0fe38d79d48e06f56ad1397.tar.gz evol-tools-5df08951f736dea8d0fe38d79d48e06f56ad1397.tar.bz2 evol-tools-5df08951f736dea8d0fe38d79d48e06f56ad1397.tar.xz evol-tools-5df08951f736dea8d0fe38d79d48e06f56ad1397.zip |
lang: add translation exceptions for translation test strings
Diffstat (limited to 'lang')
-rwxr-xr-x | lang/updatelang.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/lang/updatelang.py b/lang/updatelang.py index 2897367..8916af2 100755 --- a/lang/updatelang.py +++ b/lang/updatelang.py @@ -246,6 +246,13 @@ def saveFiles(langDir, poDir): writeLangFile (langDir + "/lang_" + trans + ".old", oldLangFiles[trans], trans, True) writePoFile (poDir, langFiles[trans], trans) +def removeGenderStr(trLine): + if trLine in ("test#0", "test#1", "test1#0", "test1#1", "test2#0", "test2#1", + "test1 %s#0", "test1 %s#1", "test2 %s#0", "test2 %s#1", + "test1 @@#0", "test1 @@#1", "test2 @@#0", "test2 @@#1"): + return trLine + return trLine[:-2] + def writeLangFile(langDir, texts, trans, isold): with open (langDir, "w") as f: if texts[1] is not None: @@ -256,7 +263,7 @@ def writeLangFile(langDir, texts, trans, isold): trLine = line[1] if trans == "en": if len(trLine) > 2 and (trLine[-2:] == "#0" or trLine[-2:] == "#1"): - trLine = trLine[:-2] + trLine = removeGenderStr(trLine) f.write (trLine + "\n\n") def writePoComments(w, comments): |