diff options
author | Kristóf Marussy <kristof@marussy.com> | 2022-04-03 02:05:40 +0200 |
---|---|---|
committer | Kristóf Marussy <kristof@marussy.com> | 2022-05-16 00:54:59 +0200 |
commit | 49c622189cf1d2c489b963d9be2f7493543afa3a (patch) | |
tree | 87636e0c08ce6ee2258566e3e0879707c9a51ea7 /packages/shared/src/index.ts | |
parent | build: Allow command line arguments to watch (diff) | |
download | sophie-49c622189cf1d2c489b963d9be2f7493543afa3a.tar.gz sophie-49c622189cf1d2c489b963d9be2f7493543afa3a.tar.zst sophie-49c622189cf1d2c489b963d9be2f7493543afa3a.zip |
feat(main): Language setting in config file
Load localization according to either the environment or the
configuration file from the list of supported locales.
Ideally, we would also set the chromium locale with --lang, but by the
time we have read the config file (to known which locale to set),
electron has already initialized the chromium resource bundle.
So the chromium localization will always be auto-detected by chromium.
Also makes startup hopefully a bit faster by doing more things
concurrently while the localization and the main window is being loaded.
Signed-off-by: Kristóf Marussy <kristof@marussy.com>
Diffstat (limited to 'packages/shared/src/index.ts')
-rw-r--r-- | packages/shared/src/index.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/packages/shared/src/index.ts b/packages/shared/src/index.ts index 51f9f06..c4de885 100644 --- a/packages/shared/src/index.ts +++ b/packages/shared/src/index.ts | |||
@@ -18,8 +18,6 @@ | |||
18 | * SPDX-License-Identifier: AGPL-3.0-only | 18 | * SPDX-License-Identifier: AGPL-3.0-only |
19 | */ | 19 | */ |
20 | 20 | ||
21 | export const fallbackLng = ['en']; | ||
22 | |||
23 | export type { default as SophieRenderer } from './contextBridge/SophieRenderer'; | 21 | export type { default as SophieRenderer } from './contextBridge/SophieRenderer'; |
24 | 22 | ||
25 | export { MainToRendererIpcMessage, RendererToMainIpcMessage } from './ipc'; | 23 | export { MainToRendererIpcMessage, RendererToMainIpcMessage } from './ipc'; |
@@ -44,6 +42,7 @@ export type { | |||
44 | export { | 42 | export { |
45 | default as GlobalSettingsBase, | 43 | default as GlobalSettingsBase, |
46 | defineGlobalSettingsModel, | 44 | defineGlobalSettingsModel, |
45 | SYSTEM_LOCALE, | ||
47 | } from './stores/GlobalSettingsBase'; | 46 | } from './stores/GlobalSettingsBase'; |
48 | 47 | ||
49 | export { default as Profile } from './stores/Profile'; | 48 | export { default as Profile } from './stores/Profile'; |
@@ -79,4 +78,5 @@ export type { | |||
79 | export { | 78 | export { |
80 | default as SharedStoreBase, | 79 | default as SharedStoreBase, |
81 | defineSharedStoreModel, | 80 | defineSharedStoreModel, |
81 | FALLBACK_LOCALE, | ||
82 | } from './stores/SharedStoreBase'; | 82 | } from './stores/SharedStoreBase'; |