Ensure translations are loaded.

Since i18next loads translations asynchronously we need to make sure
that they are loaded before we call the JS code which depends on them.

Fixes #982
This commit is contained in:
Umair Khan
2016-06-10 12:03:36 +05:00
committed by Tim Abbott
parent d29ab6651b
commit c61a3dfbcc
5 changed files with 61 additions and 25 deletions

View File

@@ -135,7 +135,7 @@ exports.populate_emoji = function (emoji_data) {
loading.destroy_indicator($('#admin_page_emoji_loading_indicator'));
};
exports.setup_page = function () {
function _setup_page() {
var options = {
realm_name: page_params.realm_name,
domain: page_params.domain,
@@ -596,6 +596,10 @@ exports.setup_page = function () {
});
});
}
exports.setup_page = function () {
i18n.ensure_i18n(_setup_page);
};
return exports;