diff options
Diffstat (limited to 'js/codeq')
-rw-r--r-- | js/codeq/core.js | 4 | ||||
-rw-r--r-- | js/codeq/init.js | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/js/codeq/core.js b/js/codeq/core.js index d60c7e4..9c32279 100644 --- a/js/codeq/core.js +++ b/js/codeq/core.js @@ -403,6 +403,10 @@ codeq.fire('langchange', {'lang': newLang}); }, + 'setResources': function (newResources) { + resources = newResources; + }, + 'escapeHtml': function (s) { return ('' + s).replace(regexpAmp, '&').replace(regexpLt, '<').replace(regexpGt, '>'); }, diff --git a/js/codeq/init.js b/js/codeq/init.js index dfd9253..811d781 100644 --- a/js/codeq/init.js +++ b/js/codeq/init.js @@ -67,7 +67,7 @@ loadGuiTranslations() .then(codeq.comms.getResourceTree) .then(function (resourceTree) { - resources = resourceTree; // save the loaded resource tree to the internal variable + codeq.setResources(resourceTree); // save the loaded resource tree codeq.fire('init'); // tell any interested modules that we are now initialized, perhaps they want to initialize too codeq.setLang(lang || 'en'); // initial language setting, this also translates the GUI |