feat: add defaultLocale in config.json (#1010)
Co-authored-by: th33xitus <domwil1091+github@gmail.com>
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
{
|
{
|
||||||
|
"defaultLocale": "en",
|
||||||
"hostname": null,
|
"hostname": null,
|
||||||
"port": null,
|
"port": null,
|
||||||
"instancesDB": "moonraker",
|
"instancesDB": "moonraker",
|
||||||
|
@@ -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": {
|
||||||
|
@@ -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!')
|
||||||
|
Reference in New Issue
Block a user