From 36f4fb3c6dcf2d7c6a50cc9c6ae1f91e09ffe69a Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 16 Jan 2012 17:24:29 +0300 Subject: lang: add support for parsing function itemname(). --- lang/updatelang.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'lang') diff --git a/lang/updatelang.py b/lang/updatelang.py index 9fd1459..2166c7f 100755 --- a/lang/updatelang.py +++ b/lang/updatelang.py @@ -16,6 +16,7 @@ strre1 = re.compile("[\t +(]l[(][\"](?P[^\"]+)[\"]") strre3 = re.compile("[\t +(]getitemlink[(][\"](?P[^\"]+)[\"][)]") strre2 = re.compile("^[^/](.+)[.]gat([^\t]+)[\t](script|shop)[\t](?P[\w ]+)[\t]([\d]+),") strre4 = re.compile("[\t +(]lg[(][\"](?P[^\"]+)[\"]") +strre5 = re.compile("[\t +(]getitemname[(][\"](?P[^\"]+)[\"][)]") itemsplit = re.compile(",") langFiles = dict() @@ -51,7 +52,12 @@ def collectStrings(parentDir): if len(m) > 0: for str in m: allStrings.add(itemNamesByName[str.lower()]) - + m = strre5.findall(line) + if len(m) > 0: + for str in m: + allStrings.add(itemNamesByName[str.lower()]) + + def loadFiles(dir): with open(dir + "/langs.txt", "r") as f: -- cgit v1.2.3-70-g09d2