diff options
author | Basil <basil@miranda-ng.org> | 2013-02-14 12:30:56 +0000 |
---|---|---|
committer | Basil <basil@miranda-ng.org> | 2013-02-14 12:30:56 +0000 |
commit | 25359ca57da5cc1dd5d6e34ca7b5bd65353f092a (patch) | |
tree | 85d952fabdc16a475b13c8f9415b8b2db459de47 /tools/lpgen | |
parent | 2d0357f65c67e42f105e59d298f55fd1035a5e15 (diff) |
multi-line stings parsing update, now trailing slash before end of line removed
git-svn-id: http://svn.miranda-ng.org/main/trunk@3599 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'tools/lpgen')
-rw-r--r-- | tools/lpgen/lpgen.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/lpgen/lpgen.js b/tools/lpgen/lpgen.js index 88f4fc9ed6..b4bfd7f415 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(/\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) {
// check for some garbage like "List1","Tab1" etc. in *.rc files, we do not need this.
@@ -468,7 +468,7 @@ function ParseSourceFile (SourceFile,array) { //first, init empty var
var string;
//replace newlines with "" in second [1] subregexp ([\S\s]*?), and Delphi newlines "'#13#10+" replace
- onestring=string[2].replace(/'?(\#13\#10)*?\+?\r\n(\x20*?\')?/g,"");
+ 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)
|