files : [ "/location/of/file1.js", "/location/of/file2.js", ... ],
target : "/tmp/output.js",
debugTarget : "/tmp/output.debug.js", // merged file without compression.
- translateJson : "/tmp/translate.json",
+ translateJSON: "/tmp/translate.json",
);
*/
tmpDir : '/tmp',
- translateJson : '', // json based list of strings in all files.
+ translateJSON : '', // json based list of strings in all files.
/**
* @prop cleanup {Boolean} (optional) clean up temp files after done -
}
- if (this.translateJson) {
+ if (this.translateJSON) {
print("MERGING LANGUAGE");
File.write(this.target, "if (typeof(_T) == 'undefined') { _T={};}\n");
- File.write(this.translateJson, "");
+ File.write(this.translateJSON, "");
for(var i=0; i < this.files.length; i++) {
var file = this.files[i];
var transfile= this.tmpDir + '/' +file.replace(/\//g, '.') +'.lang.trans';
if (File.exists(transfile)) {
var str = File.read(transfile);
if (str.length) {
- File.append(this.translateJson, str);
+ File.append(this.translateJSON, str);
}
if (this.cleanup) {
File.remove(transfile);
var toks = tr.tokenize(new TextStream(str)); // dont merge xxx + . + yyyy etc.
// at this point we can write a language file...
- if (this.translateJson) {
+ if (this.translateJSON) {
this.writeTranslateFile(fn, minfile, tr.translateMap);
}
{
//print("STRING HANDLER");
// callback when outputing compressed file,
- if (!this.translate) {
+ if (!this.translateJSON) {
// print("TURNED OFF");
return tok.outData;
}