diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-01-10 17:47:27 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-01-10 17:47:27 +0300 |
commit | 362b80311bd339eea5338ea220b62f745f29f774 (patch) | |
tree | 5ed9e284527a408dc406dfdb7b142efdbdad47d7 /lang | |
parent | 75f5eb644d177d96a2b43cae0fc05cabb796cade (diff) | |
download | evol-tools-362b80311bd339eea5338ea220b62f745f29f774.tar.gz evol-tools-362b80311bd339eea5338ea220b62f745f29f774.tar.bz2 evol-tools-362b80311bd339eea5338ea220b62f745f29f774.tar.xz evol-tools-362b80311bd339eea5338ea220b62f745f29f774.zip |
lang: add support for script command lg().
lang: fix creating empty files.
lang: add new copyright to lang files.
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 a0ccda4..5d49527 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,10 @@ 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) m = strre2.search(line) if m is not None: allStrings.add(m.group("str")) @@ -81,6 +86,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 +200,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") |