From dcc2128cde9c02c4397e3906d7814e8a32c85f0d Mon Sep 17 00:00:00 2001 From: Basil Date: Tue, 26 Feb 2013 09:49:12 +0000 Subject: more precise building a translation dictionary. Now source translated files ignores a string, which have a newline after [somestring], thus somestring are untranslated (removes CR unix-style newline symbol in translated file and add a [somestring] to untranslated file) git-svn-id: http://svn.miranda-ng.org/main/trunk@3777 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- tools/lpgen/translate.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/lpgen/translate.js b/tools/lpgen/translate.js index bdaa17fa7a..ba4034cea0 100644 --- a/tools/lpgen/translate.js +++ b/tools/lpgen/translate.js @@ -272,7 +272,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(^(?!\[|;file).+?(?=$))/mg; +var find=/(^\[.+?\](?=$))\r\n(^(?!\[|;file)[^\r\n]+?(?=$))/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