client: Apply locale selection

This commit is contained in:
Elian Doran
2024-08-11 08:12:01 +03:00
parent bc648e981e
commit 22dc4ef997
4 changed files with 35 additions and 20 deletions

View File

@@ -6,11 +6,15 @@ import toastService from "./services/toast.js";
import noteAutocompleteService from './services/note_autocomplete.js';
import macInit from './services/mac_init.js';
import electronContextMenu from "./menus/electron_context_menu.js";
import DesktopLayout from "./layouts/desktop_layout.js";
import glob from "./services/glob.js";
import { t } from "./services/i18n.js";
bundleService.getWidgetBundlesByParent().then(widgetBundles => {
bundleService.getWidgetBundlesByParent().then(async widgetBundles => {
appContext.earlyInit();
// A dynamic import is required for layouts since they initialize components which require translations.
const DesktopLayout = (await import("./layouts/desktop_layout.js")).default;
appContext.setLayout(new DesktopLayout(widgetBundles));
appContext.start()
.catch((e) => {