diff options
author | Basil <basil@miranda-ng.org> | 2013-02-15 05:52:01 +0000 |
---|---|---|
committer | Basil <basil@miranda-ng.org> | 2013-02-15 05:52:01 +0000 |
commit | 2dd1238e02fff27cb929585fbe6461ec6c788fd5 (patch) | |
tree | 5d6035761e1797719b27bd952a3975297c94f9c2 /tools | |
parent | d8aaa26f36075ac9cceb5e346b33a128c332abc3 (diff) |
translate.js - more correct RegExp for build a translation dictionary. Solves the issue with duplicated english strings when no translation in source file and duplicated ;file link.
In other words, string after [somestring] have to start not from "[" and not from ";file" and must ends without "]"
git-svn-id: http://svn.miranda-ng.org/main/trunk@3608 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'tools')
-rw-r--r-- | tools/lpgen/translate.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/lpgen/translate.js b/tools/lpgen/translate.js index fe988bb628..1abd1377e4 100644 --- a/tools/lpgen/translate.js +++ b/tools/lpgen/translate.js @@ -250,7 +250,7 @@ stream.LoadFromFile(file); //read file into var
var translatefiletext=stream.ReadText();
//"find" - RegularExpression, first string have to start with [ and end with]. Next string - translation
-var find=/(^\[.+?\])\r\n(.+?)(?=$)/mg;
+var find=/(^\[.+?\])\r\n((?!\[|;file).+?[^\]])(?=$)/mg;
//While our "find" RegExp return a results, add strings into dictionary.
while ((string = find.exec(translatefiletext)) != null) {
//first, init empty var
|