mirror of
https://github.com/zulip/zulip.git
synced 2025-11-03 21:43:21 +00:00
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:
@@ -126,7 +126,7 @@ function render_bots() {
|
||||
// Choose avatar stamp fairly randomly, to help get old avatars out of cache.
|
||||
exports.avatar_stamp = Math.floor(Math.random()*100);
|
||||
|
||||
exports.setup_page = function () {
|
||||
function _setup_page() {
|
||||
// To build the edit bot streams dropdown we need both the bot and stream
|
||||
// API results. To prevent a race streams will be initialized to a promise
|
||||
// at page load. This promise will be resolved with a list of streams after
|
||||
@@ -670,6 +670,10 @@ exports.setup_page = function () {
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
exports.setup_page = function () {
|
||||
i18n.ensure_i18n(_setup_page);
|
||||
};
|
||||
|
||||
return exports;
|
||||
|
||||
Reference in New Issue
Block a user