Merge pull request #4081 from manolino/patch-3

Update app.js
v1.18.x
Julian Lam 9 years ago
commit 0368280e52

@ -1,5 +1,5 @@
"use strict";
/*global templates, translator, ajaxify, utils, bootbox, overrides, socket, config, Visibility*/
/*global templates, ajaxify, utils, bootbox, overrides, socket, config, Visibility*/
var app = app || {};
@ -519,6 +519,7 @@ app.cacheBuster = null;
};
app.parseAndTranslate = function(template, blockName, data, callback) {
require(['translator'], function(translator) {
if (typeof blockName === 'string') {
templates.parse(template, blockName, data, function(html) {
translator.translate(html, function(translatedHTML) {
@ -533,5 +534,6 @@ app.cacheBuster = null;
});
});
}
});
};
}());

Loading…
Cancel
Save