diff options
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)
 | 
