summaryrefslogtreecommitdiff
path: root/tools/lpgen
diff options
context:
space:
mode:
authorBasil <basil@miranda-ng.org>2013-02-14 11:04:50 +0000
committerBasil <basil@miranda-ng.org>2013-02-14 11:04:50 +0000
commit2d0357f65c67e42f105e59d298f55fd1035a5e15 (patch)
treea4be7666468be1fde668af686f324a5f53df8beb /tools/lpgen
parent30dc3a2f0f14446cc104067c0545b613e20b49b5 (diff)
translate.js now output all files in UTF-8 with BOM. Thanks wishmaster for hint
git-svn-id: http://svn.miranda-ng.org/main/trunk@3598 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'tools/lpgen')
-rw-r--r--tools/lpgen/translate.js17
1 files changed, 4 insertions, 13 deletions
diff --git a/tools/lpgen/translate.js b/tools/lpgen/translate.js
index fde32331ec..fe988bb628 100644
--- a/tools/lpgen/translate.js
+++ b/tools/lpgen/translate.js
@@ -146,9 +146,9 @@ if (out) {
}
//output traslated core into file, if outfile not specified
if (!outfile) {
- WriteToFile(Translated_Core_Array,Translated_Core_File);
+ WriteToUnicodeFile(Translated_Core_Array,Translated_Core_File);
//if untranslated=true, output to file
- if (untranslated) WriteToFile(UnTranslated_Core_Array,UnTranslated_Core_File);
+ if (untranslated) WriteToUnicodeFile(UnTranslated_Core_Array,UnTranslated_Core_File);
}
//loggin output
if (log & !outfile) WScript.Echo("Output to:\r\n"+Translated_Core_File+"\r\n"+UnTranslated_Core_File);
@@ -182,9 +182,9 @@ filesenum=new Enumerator(TemplateFilesArray);
TranslateTemplateFile(curfile,TranslatedTemplate,UnTranslatedStrings);
//Write array into file, if outfile not specified
if (!outfile) {
- WriteToFile(TranslatedTemplate,traslatedtemplatefile);
+ WriteToUnicodeFile(TranslatedTemplate,traslatedtemplatefile);
//Write untranslated array into file, if /untranslated specified and there is something in array
- if (untranslated & UnTranslatedStrings.length>0) WriteToFile(UnTranslatedStrings,untranslatedfile);
+ if (untranslated & UnTranslatedStrings.length>0) WriteToUnicodeFile(UnTranslatedStrings,untranslatedfile);
}
//if we will output one file only, concatenate array
if (outfile) full_langpack_array=full_langpack_array.concat(TranslatedTemplate);
@@ -371,15 +371,6 @@ function FindFiles (path,name,filelistarray) {
};
};
-//Put array of strings into file
-function WriteToFile (array,file) {
- //Create file
- out_file=FSO.CreateTextFile(file, overwritefile , unicode)
- //Finally, write strings from array to file
- for (i=0;i<=array.length-1;i++) out_file.WriteLine(array[i]);
- //Close file
- out_file.Close();
-};
//Write UTF-8 file
function WriteToUnicodeFile(array,langpack) {
stream.Open();