You've already forked AstralRinth
forked from didirus/AstralRinth
feat: i18n switcher in app-frontend (#4990)
* feat: app i18n stuff * feat: locale switching on load * feat: db migration * feat: polish + fade indicator impl onto TabbedModal * fix: prepr checks * fix: remove staging lock for language switching * fix: lint
This commit is contained in:
@@ -92,6 +92,7 @@ import {
|
||||
isDev,
|
||||
isNetworkMetered,
|
||||
} from '@/helpers/utils.js'
|
||||
import i18n from '@/i18n.config'
|
||||
import {
|
||||
provideAppUpdateDownloadProgress,
|
||||
subscribeToDownloadProgress,
|
||||
@@ -224,6 +225,7 @@ async function setupApp() {
|
||||
const {
|
||||
native_decorations,
|
||||
theme,
|
||||
locale,
|
||||
telemetry,
|
||||
collapsed_navigation,
|
||||
advanced_rendering,
|
||||
@@ -235,6 +237,11 @@ async function setupApp() {
|
||||
pending_update_toast_for_version,
|
||||
} = await getSettings()
|
||||
|
||||
// Initialize locale from saved settings
|
||||
if (locale) {
|
||||
i18n.global.locale.value = locale
|
||||
}
|
||||
|
||||
if (default_page === 'Library') {
|
||||
await router.push('/library')
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user