Node.js based forum software built for the modern web
i8n - if translation not present, use a readable key
psychobunny7c8c735e05f1
diff --git a/public/src/translator.js b/public/src/translator.jsindex 7f87402557..fb8f602006 100644--- a/public/src/translator.js+++ b/public/src/translator.js@@ -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;}