feat: add defaultLocale in config.json (#1010)

Co-authored-by: th33xitus <domwil1091+github@gmail.com>
This commit is contained in:
Stefan Dej
2022-08-07 22:53:29 +02:00
committed by GitHub
parent 1d117ed82f
commit 46f0879677
3 changed files with 3 additions and 0 deletions

View File

@@ -1,4 +1,5 @@
{ {
"defaultLocale": "en",
"hostname": null, "hostname": null,
"port": null, "port": null,
"instancesDB": "moonraker", "instancesDB": "moonraker",

View File

@@ -111,6 +111,7 @@
"CheckMoonrakerLog": "Wenn diese Meldung wiederholt erscheint, schaue bitte in die Logdatei unter:", "CheckMoonrakerLog": "Wenn diese Meldung wiederholt erscheint, schaue bitte in die Logdatei unter:",
"Connecting": "Verbinde zu {host}", "Connecting": "Verbinde zu {host}",
"Failed": "Verbindung fehlgeschlagen", "Failed": "Verbindung fehlgeschlagen",
"Initializing": "Initialisieren",
"TryAgain": "Erneut versuchen" "TryAgain": "Erneut versuchen"
}, },
"Console": { "Console": {

View File

@@ -82,6 +82,7 @@ const initLoad = async () => {
window.console.debug('Loaded config.json') window.console.debug('Loaded config.json')
await store.dispatch('importConfigJson', file) await store.dispatch('importConfigJson', file)
if ('defaultLocale' in file) i18n.locale = file.defaultLocale
}) })
.catch((_) => { .catch((_) => {
window.console.error('config.json not found or cannot be decoded!') window.console.error('config.json not found or cannot be decoded!')