Commit 59ca7bae authored by JC Brand's avatar JC Brand

Make sure variables are interpolated when no translations exist.

parent f0deac9e
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
tpl_form_captcha tpl_form_captcha
) { ) {
"use strict"; "use strict";
locales = locales || {};
var XFORM_TYPE_MAP = { var XFORM_TYPE_MAP = {
'text-private': 'password', 'text-private': 'password',
...@@ -158,8 +159,8 @@ ...@@ -158,8 +159,8 @@
// Translation machinery // Translation machinery
// --------------------- // ---------------------
__: function (str) { __: function (str) {
if (typeof Jed === "undefined" || !utils.isConverseLocale(this.locale) || this.locale === 'en') { if (!utils.isConverseLocale(this.locale) || this.locale === 'en') {
return str; return Jed.sprintf.apply(Jed, arguments);
} }
if (typeof this.jed === "undefined") { if (typeof this.jed === "undefined") {
this.jed = new Jed(window.JSON.parse(locales[this.locale])); this.jed = new Jed(window.JSON.parse(locales[this.locale]));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment