mirror of
https://github.com/zulip/zulip.git
synced 2025-11-21 15:09:34 +00:00
unread_ui: Wait for i18n setup before rendering.
Without this, the "Since you were last here" text got rendered in English for me every time when I tested in German, both in dev and on chat.zulip.org. This brings us to 9 places we invoke `ensure_i18n`. That seems like a sign that there may well be more places we're still missing, and that we should probably find a more systematic way to make sure all our frontend UI rendering waits for translation to be ready. Anyway, for now, fix this one.
This commit is contained in:
@@ -93,7 +93,7 @@ function consider_bankruptcy() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
exports.initialize = function initialize() {
|
function _initialize() {
|
||||||
// No matter how the bankruptcy modal is closed, show unread counts after.
|
// No matter how the bankruptcy modal is closed, show unread counts after.
|
||||||
$("#bankruptcy").on("hide", function () {
|
$("#bankruptcy").on("hide", function () {
|
||||||
unread_ui.enable();
|
unread_ui.enable();
|
||||||
@@ -108,8 +108,11 @@ exports.initialize = function initialize() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
consider_bankruptcy();
|
consider_bankruptcy();
|
||||||
};
|
}
|
||||||
|
|
||||||
|
exports.initialize = function () {
|
||||||
|
i18n.ensure_i18n(_initialize);
|
||||||
|
};
|
||||||
|
|
||||||
return exports;
|
return exports;
|
||||||
}());
|
}());
|
||||||
|
|||||||
Reference in New Issue
Block a user