summaryrefslogtreecommitdiff
path: root/tools/lpgen
diff options
context:
space:
mode:
authorBasil <basil@miranda-ng.org>2013-02-20 09:00:52 +0000
committerBasil <basil@miranda-ng.org>2013-02-20 09:00:52 +0000
commit1cee868c228c2754cb010ef3fcd02e7419fc0810 (patch)
tree1ee583e9cd275e16e4ce8616d2a76f307adaca8b /tools/lpgen
parent299712d0d5b49abc6edb0ba4a668d61e24f5c448 (diff)
- now ignores commented lines (start with //) in *.rc
Unfortunately, rc parsing engine reads *.rc files line-by-line, thus currently ignoring multi-line comments (start with /* and ends with */) not supported. - typo git-svn-id: http://svn.miranda-ng.org/main/trunk@3647 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'tools/lpgen')
-rw-r--r--tools/lpgen/lpgen.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/lpgen/lpgen.js b/tools/lpgen/lpgen.js
index b9bb283ee0..d31ef5214c 100644
--- a/tools/lpgen/lpgen.js
+++ b/tools/lpgen/lpgen.js
@@ -417,7 +417,7 @@ function ParseRCFile(RC_File,array) {
//read on line into rcline
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*?(,|$|\\)/);
+ rc_regexp=rcline.match(/^(?!\/{1,2})\s*(?:CONTROL|(?:DEF)?PUSHBUTTON|[LRC]TEXT|AUTORADIOBUTTON|GROUPBOX|(?:AUTO)?CHECKBOX|CAPTION|MENUITEM|POPUP)\s*"((?:(?:""[^"]+?"")*[^"]*?)*)"\s*?(,|$|\\)/i);
// if exist rc_regexp, and our string length at least one symbol do checks, double "" removal and add strings into array
if (rc_regexp && rc_regexp[1].length>0) {
// check for some garbage like "List1","Tab1" etc. in *.rc files, we do not need this.
@@ -438,8 +438,8 @@ function ParseRCFile(RC_File,array) {
case "Slider2": {break};
//default action is to wrote text inside quoted into array
default:
- //check result. If it does not match [a-z] (no any letter in results, such as "..." or "->" it's a crap, break further actions.
- if (!rc_regexp[1].match(/[a-z]/gi)) {break};
+ //check result. If it does not match [a-z] (no any letter in results, such as "..." or "->") it's a crap, break further actions.
+ if (!rc_regexp[1].match(/[a-z]/gi)) {break};
//if there is double "", replace with single one
stringtolangpack=rc_regexp[1].replace(/\"{2}/g,"\"");
//add string to array