diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-03-06 14:30:40 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-03-06 14:30:40 +0300 |
commit | fe0253fe089a7cc50c8cea8d39ecfcfccd3d1390 (patch) | |
tree | b3c275fd6d7518567e9ee32b4ff5d49238994fe5 /lang | |
parent | 8ba994b91015d5f9c0bc227632db8db518a955f3 (diff) | |
download | evol-tools-fe0253fe089a7cc50c8cea8d39ecfcfccd3d1390.tar.gz evol-tools-fe0253fe089a7cc50c8cea8d39ecfcfccd3d1390.tar.bz2 evol-tools-fe0253fe089a7cc50c8cea8d39ecfcfccd3d1390.tar.xz evol-tools-fe0253fe089a7cc50c8cea8d39ecfcfccd3d1390.zip |
lang: fix minor issues in code.
Diffstat (limited to 'lang')
-rwxr-xr-x | lang/updatelang.py | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/lang/updatelang.py b/lang/updatelang.py index d608caa..e97e172 100755 --- a/lang/updatelang.py +++ b/lang/updatelang.py @@ -113,7 +113,8 @@ def parseFile(name, readFirstLine): def loadPoFiles(podir): files = os.listdir(podir) for name in files: - parsePoFile(name[:-3], podir + "/" + name) + if name[-3:] == ".po": + parsePoFile(name[:-3], podir + "/" + name) def parsePoFile(name, path): @@ -202,13 +203,13 @@ def sortDict(adict): d2.append ((key, adict[0][key])) return (d2, adict[1]) -def saveFiles(dir): +def saveFiles(langDir): for trans in langFiles: - writeFile (dir + "/lang_" + trans + ".txt", langFiles[trans], trans, False) - writeFile (dir + "/lang_" + trans + ".old", oldLangFiles[trans], trans, True) + writeFile (langDir + "/lang_" + trans + ".txt", langFiles[trans], trans, False) + writeFile (langDir + "/lang_" + trans + ".old", oldLangFiles[trans], trans, True) -def writeFile(dir, texts, trans, isold): - with open (dir, "w") as f: +def writeFile(langDir, texts, trans, isold): + with open (langDir, "w") as f: if texts[1] is not None: f.write(texts[1]) for line in texts[0]: |