summaryrefslogtreecommitdiff
path: root/lang
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-01-12 00:54:30 +0300
committerAndrei Karas <akaras@inbox.ru>2012-01-12 00:54:30 +0300
commitd63a5a0debaff0143a92bea6dfa0fb21e5a76aee (patch)
tree0fdd1481495db2956b589062004c3e06ca32d273 /lang
parent315ce8f31fef26a5980456d5a2dd6c34f781fec7 (diff)
downloadevol-tools-d63a5a0debaff0143a92bea6dfa0fb21e5a76aee.tar.gz
evol-tools-d63a5a0debaff0143a92bea6dfa0fb21e5a76aee.tar.bz2
evol-tools-d63a5a0debaff0143a92bea6dfa0fb21e5a76aee.tar.xz
evol-tools-d63a5a0debaff0143a92bea6dfa0fb21e5a76aee.zip
Allow generate po english files without english translation.
Diffstat (limited to 'lang')
-rwxr-xr-xlang/converttopo.py14
1 files changed, 10 insertions, 4 deletions
diff --git a/lang/converttopo.py b/lang/converttopo.py
index dc746bd..03c6c89 100755
--- a/lang/converttopo.py
+++ b/lang/converttopo.py
@@ -27,9 +27,12 @@ def loadFiles(dir):
langs.add(line[:-1])
for file in langs:
- langFiles[file] = parseFile(dir + "/lang_" + file + ".txt", True)
+ if file == "en":
+ langFiles[file] = parseFile(dir + "/lang_" + file + ".txt", True, True)
+ else:
+ langFiles[file] = parseFile(dir + "/lang_" + file + ".txt", True, False)
-def parseFile(name, readFirstLine):
+def parseFile(name, readFirstLine, isBaseLang):
trans = dict()
firstLine = None
if os.path.exists(name):
@@ -50,7 +53,10 @@ def parseFile(name, readFirstLine):
continue
line2 = line[:-1]
- trans[line1] = line2
+ if isBaseLang:
+ trans[line1] = line1
+ else:
+ trans[line1] = line2
line1 = ""
line2 = ""
return (trans, firstLine)
@@ -81,7 +87,7 @@ def saveFile(path, name):
w.write ("msgstr \"" + line2 + "\"\n\n")
-rootPath = "../../gittorious/serverdata"
+rootPath = "../../gittorious/serverdata-beta"
loadFiles(rootPath + "/langs")
saveFiles("po")