i8n - if translation not present, use a readable key

v1.18.x
psychobunny 11 years ago
parent b21a202142
commit 7c8c735e05

@ -62,11 +62,6 @@
async.map(keys, getKey, callback);
}
/*
* TODO: Not fully converted to server side yet, ideally server should be able to parse whole templates on demand if necessary
* fix: translator.load should determine if server side and immediately return appropriate language file.
*/
translator.translate = function (data, callback) {
var keys = data.match(/\[\[.*?\]\]/g),
loading = 0;
@ -79,9 +74,11 @@
}
text = text.replace(key, value);
} else {
var string = key.split(':');
text = text.replace(key, string[string.length-1].replace(/\]+$/, ''));
}
return text;
}

Loading…
Cancel
Save