diff options
| author | Kirill Volinsky <mataes2007@gmail.com> | 2014-04-11 06:18:44 +0000 | 
|---|---|---|
| committer | Kirill Volinsky <mataes2007@gmail.com> | 2014-04-11 06:18:44 +0000 | 
| commit | 6ec2c8cee8c32a798e47b5ae5f1a659872f2e3e5 (patch) | |
| tree | a3598199c1f63e74320a475be686d61916d3755d /tools | |
| parent | 6d08efb05a3ed58dadf7e280d4a683293961ff78 (diff) | |
Some langpack generation improvements (thx Basil)
git-svn-id: http://svn.miranda-ng.org/main/trunk@8943 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'tools')
| -rw-r--r-- | tools/lpgen/lpgen.js | 10 | 
1 files changed, 5 insertions, 5 deletions
| diff --git a/tools/lpgen/lpgen.js b/tools/lpgen/lpgen.js index e4ec6307d7..65f579ad3f 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])|(%.(.*%)?))$/g,"");
 +      onestring=string[2].replace(/^(((List|Tab|Tree|Spin|Custom|Slider|DateTimePicker|Radio|Check|HotKey|Progress)\d)|(whiterect|IndSndList|&?[Oo][Kk]|ICQ|Jabber|&\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;
 @@ -462,8 +462,8 @@ function ParseSourceFile (FileTextVar,array) {  //filter _T() function results
  function filter_T(string) {
 -//filter not begin with symbols :.]?;#~{!/_+$
 -//var filter1=/^[^\:\]\?\;\#\~\|\{\!\/\_\+\\$].+$/g;
 +//filter for exact matched strings
 +var filter1=/^(&?[Oo][Kk]|ICQ|Jabber)$/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-|<div|<html|<img|<span|<hr|<a\x20|<table|<td|miranda_|kernel32|user32|muc|pubsub|shlwapi|Tahoma|NBRichEdit|CreatePopup|&?[Oo][Kk]|<\/|<\w>|\w\\\w|urn\:|<\?xml|<\!|h\d|\.!\.).*$/g;
  //filter string ending with following words
 @@ -474,7 +474,7 @@ var filter4=/^((d\s\w)|\[\/?(\w|url|img|size|quote|color)(=\w*)?\]?|(\\\w)|(%\w+  var filter5=/^[\w_:%.\\\/*-]+\.\w+$/g;
  //apply filters to our string
 -//test1=filter1.test(string);
 +test1=filter1.test(string);
  test2=filter2.test(string);
  test3=filter3.test(string);
  test4=filter4.test(string);
 @@ -482,7 +482,7 @@ test5=filter5.test(string);  //if match (test1) first filter and NOT match other tests, thus string are good, return this string back.
  //if (test1 && !test2 && !test3 && !test4 && !test5) {
 -if (!test2 && !test3 && !test4 && !test5) {
 +if (!test1 && !test2 && !test3 && !test4 && !test5) {
      return string;
      } else {
          //in other case, string is a garbage, put into crap array.
 | 
