Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add defaultLocale in config.json #1010

Merged
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions public/config.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"defaultLocale": "en",
"hostname": null,
"port": null,
"remoteMode": false,
Expand Down
1 change: 1 addition & 0 deletions src/locales/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@
"CheckMoonrakerLog": "Wenn diese Meldung wiederholt erscheint, schaue bitte in die Logdatei unter:",
"Connecting": "Verbinde zu {host}",
"Failed": "Verbindung fehlgeschlagen",
"Initializing": "Inizialisieren",
meteyou marked this conversation as resolved.
Show resolved Hide resolved
"TryAgain": "Erneut versuchen"
},
"Console": {
Expand Down
1 change: 1 addition & 0 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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!')
Expand Down