summaryrefslogtreecommitdiff
path: root/tools/lpgen/lpgen.js
diff options
context:
space:
mode:
authorBasil <basil@miranda-ng.org>2013-02-18 11:56:55 +0000
committerBasil <basil@miranda-ng.org>2013-02-18 11:56:55 +0000
commit1ab3c162104548699c12dcf01c93c3593f16ce7a (patch)
tree59cf74a7ab75dbf2af13792f129ca8822fd04892 /tools/lpgen/lpgen.js
parentb0584d48fdb5ab7691af0ee9fcd8834d5417a20b (diff)
do not include results with one-symbol length, both RC ans Source files parsing engines.
git-svn-id: http://svn.miranda-ng.org/main/trunk@3630 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'tools/lpgen/lpgen.js')
-rw-r--r--tools/lpgen/lpgen.js9
1 files changed, 4 insertions, 5 deletions
diff --git a/tools/lpgen/lpgen.js b/tools/lpgen/lpgen.js
index b4bfd7f415..dc6edfdc97 100644
--- a/tools/lpgen/lpgen.js
+++ b/tools/lpgen/lpgen.js
@@ -418,8 +418,8 @@ function ParseRCFile(RC_File,array) {
rcline=RC_File_stream.ReadLine();
//find string to translate in rcline by regexp
rc_regexp=rcline.match(/\s*(?:CONTROL|(?:DEF)?PUSHBUTTON|[LRC]TEXT|AUTORADIOBUTTON|GROUPBOX|(?:AUTO)?CHECKBOX|CAPTION|MENUITEM|POPUP)\s*"((?:(?:""[^"]+?"")*[^"]*?)*)"\s*?(,|$|\\)/);
- // if exist rc_regexp, do checks, double "" removal and add strings into array
- if (rc_regexp) {
+ // if exist rc_regexp, and our string length longer, than one symbol (indeed, translate only one simbol?) do checks, double "" removal and add strings into array
+ if (rc_regexp && rc_regexp[1].length>1) {
// check for some garbage like "List1","Tab1" etc. in *.rc files, we do not need this.
switch (rc_regexp[1]) {
case "List1": {break};
@@ -436,7 +436,6 @@ function ParseRCFile(RC_File,array) {
case "Custom2": {break};
case "Slider1": {break};
case "Slider2": {break};
- case "": {break};
//default action is to wrote text inside quoted into array
default:
//if there is double "", replace with single one
@@ -471,8 +470,8 @@ function ParseSourceFile (SourceFile,array) {
onestring=string[2].replace(/'?(\#13\#10)*?\\?\r\n(\x20*?\')?/g,"");
//remove escape slashes before ' and "
stringtolangpack=onestring.replace(/\\(['"])/g,"$1");
- //if our string still exist, and length more than 2 symbol (nothing to translate if only two symbols, well, except No and OK, but they are in core. But dozens crap with variables are filtered)
- if (stringtolangpack.length>2) {
+ //if our string still exist, and length more than 1 symbol (nothing to translate if only one symbol)
+ if (stringtolangpack.length>1) {
//brand new _T() crap filtering engine :)
clearstring=filter_T(stringtolangpack);
//finally put string into array including cover brackets []