i18n: Reorganize language_list logic.

This reorganization follows our modern coding conventions for avoid
leaving data in page_params that should be owned by a single module.
This commit is contained in:
Tim Abbott
2021-06-17 17:16:48 -07:00
parent 8fc3715ea8
commit 0a1eaf0384
4 changed files with 30 additions and 21 deletions

View File

@@ -27,6 +27,7 @@ import * as gear_menu from "./gear_menu";
import * as giphy from "./giphy";
import * as hashchange from "./hashchange";
import * as hotspots from "./hotspots";
import * as i18n from "./i18n";
import * as invite from "./invite";
import * as lightbox from "./lightbox";
import * as linkifiers from "./linkifiers";
@@ -465,7 +466,9 @@ export function initialize_everything() {
const user_groups_params = pop_fields("realm_user_groups");
const user_status_params = pop_fields("user_status");
const i18n_params = pop_fields("language_list");
i18n.initialize(i18n_params);
tippyjs.initialize();
// We need to initialize compose early, because other modules'
// initialization expects `#compose` to be already present in the