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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 0 deletions

View File

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

View File

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

View File

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