summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorBasil <basil@miranda-ng.org>2013-07-11 11:50:49 +0000
committerBasil <basil@miranda-ng.org>2013-07-11 11:50:49 +0000
commitdc03dbb2218a0ef621c76003a87b5d0ac2701054 (patch)
tree7c1a87bd44e0d530092096d9263719b78a83f65f /tools
parent1b97a92df3c1000cc52b3daaf52bf8a1e1772fd6 (diff)
fixed /release parameter removing a MUUID and plugin head
git-svn-id: http://svn.miranda-ng.org/main/trunk@5327 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'tools')
-rw-r--r--tools/lpgen/translate.js19
1 files changed, 8 insertions, 11 deletions
diff --git a/tools/lpgen/translate.js b/tools/lpgen/translate.js
index 83b395ee8b..125a63e357 100644
--- a/tools/lpgen/translate.js
+++ b/tools/lpgen/translate.js
@@ -410,23 +410,20 @@ function TranslateTemplateFile(Template_file,translated_array,untranslated_array
var line=stream.ReadText(-2);
//If we need refference to "; file source\file\path" in template or langpack, put into array every line
if (!noref) translated_array.push(line);
- //If we need "clean" file, remove stirngs, starting from ";file"
- if (noref) {
- //RegExp matching strings, starting from ";file"
- reffline=line.match(/^;file.+/);
- //RegExp for match a =CORE=.txt header line "Miranda Language Pack Version 1". If /noref specified, remove this line as well.
- headerline=line.match(/^Miranda Language Pack Version 1$/)
- //if RegExp not matched, push line into array
- if (!reffline && !headerline) translated_array.push(line);
- }
+ //RegExp matching strings, starting from ";file"
+ reffline=line.match(/^;file.+/);
+ //RegExp for match a =CORE=.txt header line "Miranda Language Pack Version 1". If /noref specified, remove this line as well.
+ headerline=line.match(/^Miranda Language Pack Version 1$/)
+ //if /noref enabled, check string and if not matched, add to array
+ if (noref && (!reffline && !headerline)) translated_array.push(line);
+ //same for /release
+ if (release && (!reffline && !headerline)) release_array.push(line);
//find string covered by[] using regexp
englishstring=line.match(/\[.+\]/);
//If current line is english string covered by [], try to find translation in global db
if (englishstring) {
//uncomment next string for more verbose log output
//if (log) WScript.Echo("lookin' for "+englishstring);
- //add enlishstring to release array
- release_array.push(englishstring);
//firstly find our string exist in Plugin translate DB dictionary
if (PluginTranslateDict.Exists(line)) {
//yes, we have translation, put translation into array