diff options
Diffstat (limited to 'packages/shared/src/stores')
-rw-r--r-- | packages/shared/src/stores/GlobalSettingsBase.ts | 3 | ||||
-rw-r--r-- | packages/shared/src/stores/SharedStoreBase.ts | 4 |
2 files changed, 6 insertions, 1 deletions
diff --git a/packages/shared/src/stores/GlobalSettingsBase.ts b/packages/shared/src/stores/GlobalSettingsBase.ts index 1bd0628..c74c822 100644 --- a/packages/shared/src/stores/GlobalSettingsBase.ts +++ b/packages/shared/src/stores/GlobalSettingsBase.ts | |||
@@ -30,10 +30,13 @@ import { ThemeSource } from '../schemas/ThemeSource'; | |||
30 | 30 | ||
31 | import ServiceBase from './ServiceBase'; | 31 | import ServiceBase from './ServiceBase'; |
32 | 32 | ||
33 | export const SYSTEM_LOCALE = 'system'; | ||
34 | |||
33 | export function defineGlobalSettingsModel<TS extends IAnyModelType>( | 35 | export function defineGlobalSettingsModel<TS extends IAnyModelType>( |
34 | service: TS, | 36 | service: TS, |
35 | ) { | 37 | ) { |
36 | return types.model('GlobalSettings', { | 38 | return types.model('GlobalSettings', { |
39 | language: SYSTEM_LOCALE, | ||
37 | themeSource: types.optional( | 40 | themeSource: types.optional( |
38 | types.enumeration(ThemeSource.options), | 41 | types.enumeration(ThemeSource.options), |
39 | 'system', | 42 | 'system', |
diff --git a/packages/shared/src/stores/SharedStoreBase.ts b/packages/shared/src/stores/SharedStoreBase.ts index 86bd0fc..a576a0e 100644 --- a/packages/shared/src/stores/SharedStoreBase.ts +++ b/packages/shared/src/stores/SharedStoreBase.ts | |||
@@ -31,6 +31,8 @@ import GlobalSettingsBase from './GlobalSettingsBase'; | |||
31 | import ProfileBase from './Profile'; | 31 | import ProfileBase from './Profile'; |
32 | import ServiceBase from './ServiceBase'; | 32 | import ServiceBase from './ServiceBase'; |
33 | 33 | ||
34 | export const FALLBACK_LOCALE = 'en'; | ||
35 | |||
34 | export function defineSharedStoreModel< | 36 | export function defineSharedStoreModel< |
35 | TG extends IAnyModelType, | 37 | TG extends IAnyModelType, |
36 | TP extends IAnyModelType, | 38 | TP extends IAnyModelType, |
@@ -43,7 +45,7 @@ export function defineSharedStoreModel< | |||
43 | servicesById: types.map(service), | 45 | servicesById: types.map(service), |
44 | services: types.array(types.reference(service)), | 46 | services: types.array(types.reference(service)), |
45 | shouldUseDarkColors: false, | 47 | shouldUseDarkColors: false, |
46 | language: 'en', | 48 | language: FALLBACK_LOCALE, |
47 | }); | 49 | }); |
48 | } | 50 | } |
49 | 51 | ||