summaryrefslogtreecommitdiff
path: root/lang/updatelang.py
diff options
context:
space:
mode:
authorReid <reidyaro@gmail.com>2012-01-15 19:26:19 +0100
committerReid <reidyaro@gmail.com>2012-01-15 19:26:19 +0100
commit55201f2eb9afe3d3e5e7483470e59a915f37eb4b (patch)
treef149f22617bb4d85ed8b977771c3b8bc1199d085 /lang/updatelang.py
parente2dbae81aaa3721a91ac117120f7468bd7146b01 (diff)
parentd63a5a0debaff0143a92bea6dfa0fb21e5a76aee (diff)
downloadtools-55201f2eb9afe3d3e5e7483470e59a915f37eb4b.tar.gz
tools-55201f2eb9afe3d3e5e7483470e59a915f37eb4b.tar.bz2
tools-55201f2eb9afe3d3e5e7483470e59a915f37eb4b.tar.xz
tools-55201f2eb9afe3d3e5e7483470e59a915f37eb4b.zip
Merge branch 'master' of ssh://gitent-scm.com/git/evol/privtools
Diffstat (limited to 'lang/updatelang.py')
-rwxr-xr-xlang/updatelang.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/lang/updatelang.py b/lang/updatelang.py
index a0ccda4..9fd1459 100755
--- a/lang/updatelang.py
+++ b/lang/updatelang.py
@@ -15,6 +15,7 @@ allStrings = set()
strre1 = re.compile("[\t +(]l[(][\"](?P<str>[^\"]+)[\"]")
strre3 = re.compile("[\t +(]getitemlink[(][\"](?P<str>[^\"]+)[\"][)]")
strre2 = re.compile("^[^/](.+)[.]gat([^\t]+)[\t](script|shop)[\t](?P<str>[\w ]+)[\t]([\d]+),")
+strre4 = re.compile("[\t +(]lg[(][\"](?P<str>[^\"]+)[\"]")
itemsplit = re.compile(",")
langFiles = dict()
@@ -38,6 +39,11 @@ def collectStrings(parentDir):
if len(m) > 0:
for str in m:
allStrings.add(str)
+ m = strre4.findall(line)
+ if len(m) > 0:
+ for str in m:
+ allStrings.add(str + "#0")
+ allStrings.add(str + "#1")
m = strre2.search(line)
if m is not None:
allStrings.add(m.group("str"))
@@ -81,6 +87,8 @@ def parseFile(name, readFirstLine):
trans[line1] = line2
line1 = ""
line2 = ""
+ elif readFirstLine:
+ firstLine = "Copyright (C) 2010-2012 Evol Online\n"
return (trans, firstLine)
@@ -193,7 +201,7 @@ def loadItemDb(dir):
continue
itemNamesByName[rows[1].lower().strip()] = rows[2].strip()
-rootPath = "../../gittorious/serverdata"
+rootPath = "../../gittorious/serverdata-beta"
loadItemDb(rootPath + "/db")
collectStrings(rootPath + "/npc")