From 0b733c351967485bebc78f4d6801ab1b498d3f26 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 18 Jan 2013 02:00:12 +0300 Subject: updatelang: add support for npc in new format. Add old string translation restore from old files. --- lang/updatelang.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'lang') diff --git a/lang/updatelang.py b/lang/updatelang.py index d1e9bc6..7758ef4 100755 --- a/lang/updatelang.py +++ b/lang/updatelang.py @@ -1,7 +1,7 @@ #! /usr/bin/env python2.6 # -*- coding: utf8 -*- # -# Copyright (C) 2010-2011 Evol Online +# Copyright (C) 2010-2013 Evol Online # Author: Andrei Karas (4144) import os @@ -14,7 +14,7 @@ filt = re.compile(".+[.]txt", re.IGNORECASE) allStrings = set() 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]+),") +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[^\"]+)[\"][)]") strre6 = re.compile("[\t ]mesn[ ][\"](?P[^\"]+)[\"]") @@ -165,9 +165,12 @@ def addMissingLines(): for str in allStrings: for trans in langFiles: newFile = langFiles[trans][0] + oldFile = oldLangFiles[trans][0] if str not in newFile: if trans == defaultLang: newFile[str] = str + elif str in oldFile: + newFile[str] = oldFile[str] else: newFile[str] = "" print trans + ":new string: " + str -- cgit v1.2.3-70-g09d2