diff options
author | George Hazan <ghazan@miranda.im> | 2019-07-24 17:34:29 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2019-07-24 17:34:35 +0300 |
commit | c978ed512327913c63a384c084920e2db0ff2f51 (patch) | |
tree | fcf0b2a79b3e6fa643d36ecdd4520ff408e8f9bf | |
parent | 080507db9a11bdee60c0b1cfed977071cb3bf66c (diff) |
lgpen.js: added support for TranslateU / TranslateU_LP
-rw-r--r-- | tools/lpgen/lpgen.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/lpgen/lpgen.js b/tools/lpgen/lpgen.js index 2c9443c5b1..2d997c5d47 100644 --- a/tools/lpgen/lpgen.js +++ b/tools/lpgen/lpgen.js @@ -523,7 +523,7 @@ function ParseSourceFile(FileTextVar, array) { //not store ?: functions LPGEN or LPGENT? or Translate(T or W) or _T, than any unnecessary space \s, than not stored ?: "(" followed by ' or " (stored and used as \1) than \S\s - magic with multiline capture, ending with not stored ?= \1 (we get " or ' after "("), than none or few spaces \x20 followed by )/m=multiline g=global
//var find= /(?:LPGEN[TW]?|Translate[TW]?||Translate[AW]_LP|_T)(?:\s*?\(\s*?L?\s*)(['"])([\S\s]*?)(?=\1,?\x20*?(?:tmp)?\))/mg;
//comment previous line and uncomment following line to output templates without _T() function in source files. Too many garbage from _T()..
- var find = /(?:LPGEN[TW]?|Translate[TW]?|Translate[AW]_LP)(?:\s*?\(\s*?L?\s*)((?:(?:"[^"\\]*(?:\\[\S\s][^"\\]*)*")\s*)*)(?:\s*?,?\s*?(?:tmp)?\))/gm;
+ var find = /(?:LPGEN[TW]?|Translate[TUW]?|Translate[AUW]_LP)(?:\s*?\(\s*?L?\s*)((?:(?:"[^"\\]*(?:\\[\S\s][^"\\]*)*")\s*)*)(?:\s*?,?\s*?(?:tmp)?\))/gm;
//now make a job, till end of matching regexp
while ((string = find.exec(FileTextVar)) !== null) {
//first, init empty var
|