summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--js/codeq/core.js27
1 files changed, 5 insertions, 22 deletions
diff --git a/js/codeq/core.js b/js/codeq/core.js
index b54095f..03c5539 100644
--- a/js/codeq/core.js
+++ b/js/codeq/core.js
@@ -357,23 +357,6 @@
codeq.fire('langchange', {'lang': newLang});
},
- 'chooseTranslation': function (translations, language) {
- var tr, lang;
- if ((typeof translations !== 'object') || (translations === null)) return {};
- tr = translations[language || codeq.lang];
- if ((typeof tr === 'object') && (tr !== null)) return tr;
- // default fallback
- tr = translations['en'];
- if ((typeof tr === 'object') && (tr !== null)) return tr;
- // fallback to whatever is available
- for (lang in translations) {
- tr = translations[lang];
- if ((typeof tr === 'object') && (tr !== null)) return tr;
- }
- // all options were exhausted, we have nothing
- return {};
- },
-
'escapeHtml': function (s) {
return ('' + s).replace(regexpAmp, '&').replace(regexpLt, '<').replace(regexpGt, '>');
},
@@ -541,10 +524,6 @@
}
};
- // ================================================================================
- // The boot sequence
- // ================================================================================
-
var loadGuiTranslations = function () {
var langs = codeq.availableLangs,
loaders = [],
@@ -588,6 +567,10 @@
});
};
+ // ================================================================================
+ // The boot sequence
+ // ================================================================================
+
$(document).ready(function () {
// set the language
var navigatorLang = navigator.language || navigator.browserLanguage, // language reported by browser
@@ -603,7 +586,7 @@
codeq.availableLangs.push(key);
}
- // the boot chain: must be a sequence of .then() terminated with a .fail().done()
+ // the boot chain of async handlers: must be a sequence of .then() terminated with a .fail().done()
loadGuiTranslations()
.then(codeq.comms.getResourceTree)
.then(function (resourceTree) {