From c365f07f0b8cefd91f684f984a9eb439c049a0c8 Mon Sep 17 00:00:00 2001 From: Kirill Volinsky Date: Tue, 22 Apr 2014 06:11:41 +0000 Subject: script update git-svn-id: http://svn.miranda-ng.org/main/trunk@9028 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- tools/lpgen/lpgen.js | 8 ++++---- tools/lpgen/lpgen.js.bat | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'tools/lpgen') diff --git a/tools/lpgen/lpgen.js b/tools/lpgen/lpgen.js index c6dffb5581..9fd17e72cd 100644 --- a/tools/lpgen/lpgen.js +++ b/tools/lpgen/lpgen.js @@ -419,7 +419,7 @@ function ParseRCFile(FileTextVar,array) { //now make a job, till end of matching regexp while ((string = find.exec(FileTextVar)) != null) { // check for some garbage like "List1","Tab1" etc. in *.rc files, we do not need this. - onestring=string[2].replace(/^(((List|Tab|Tree|Spin|Custom|Slider|DateTimePicker|Radio|Check|HotKey|Progress)\d)|(whiterect|IndSndList|&?[Oo][Kk]|ICQ|Jabber|WhatsApp|OSD|&\w)|(%.(.*%)?))$/g,""); + onestring=string[2].replace(/^(((List|Tab|Tree|Spin|Custom|Slider|DateTimePicker|Radio|Check|HotKey|Progress)\d)|(whiterect|IndSndList|&?[Oo][Kk]|ICQ|Jabber|WhatsApp|OSD|Google|Miranda NG|&\w)|(%.(.*%)?))$/g,""); // ignore some popup menu craps if (string[1]=="POPUP" && onestring.match(/^([a-zA-Z ]*(menu|context|popup))|([A-Z][a-z]+([A-Z][a-z]*)+)|(new item)$/g)) continue; @@ -450,8 +450,8 @@ function ParseSourceFile (FileTextVar,array) { nofirstlaststring=noslashstring.slice(1, -1) //remove escape slashes before ' and " stringtolangpack=nofirstlaststring.replace(/\\(['"])/g,"$1"); - //if our string still exist, and length more than 1 symbol (nothing to translate if only one symbol) - if (stringtolangpack.length>1) { + ///if our string still exist, and length at least one symbol + if (stringtolangpack.length>0) { //brand new _T() crap filtering engine :) clearstring=filter_T(stringtolangpack); //finally put string into array including cover brackets [] @@ -463,7 +463,7 @@ function ParseSourceFile (FileTextVar,array) { //filter _T() function results function filter_T(string) { //filter for exact matched strings -var filter1=/^(&?[Oo][Kk]|ICQ|Jabber|WhatsApp|OSD)$/g; +var filter1=/^(&?[Oo][Kk]|ICQ|Jabber|WhatsApp|OSD|Google|Miranda NG)$/g; //filter string starting from following words var filter2=/^(SOFTWARE\\|SYSTEM\\|http|ftp|UTF-|utf-|TEXT|EXE|exe|txt|css|html|dat[^a]|txt|MS\x20|CLVM|TM_|CLCB|CLSID|CLUI|HKEY_|MButton|BUTTON|WindowClass|MHeader|RichEdit|RICHEDIT|STATIC|EDIT|CList|listbox|LISTBOX|combobox|COMBOBOX|TitleB|std\w|iso-|windows-||\w\\\w|urn\:|<\?xml|<\!|h\d|\.!\.).*$/g; //filter string ending with following words diff --git a/tools/lpgen/lpgen.js.bat b/tools/lpgen/lpgen.js.bat index cc0084bcf6..a1ad31dd95 100644 --- a/tools/lpgen/lpgen.js.bat +++ b/tools/lpgen/lpgen.js.bat @@ -1,2 +1,2 @@ rem echo off -cscript /nologo lpgen.js \ No newline at end of file +cscript /nologo lpgen.js /crap:"yes" \ No newline at end of file -- cgit v1.2.3