From 2dd1238e02fff27cb929585fbe6461ec6c788fd5 Mon Sep 17 00:00:00 2001 From: Basil Date: Fri, 15 Feb 2013 05:52:01 +0000 Subject: 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 --- tools/lpgen/translate.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tools/lpgen/translate.js') 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 -- cgit v1.2.3