Skip to content

Commit

Permalink
Merge pull request #44 from RondaYummy/116-added-german-language
Browse files Browse the repository at this point in the history
Added german language
  • Loading branch information
opengs authored Sep 6, 2024
2 parents 85f6fc0 + 1ca9c08 commit 9a825b8
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src-electron/handlers/settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export interface SettingsData {
autoUpdate: boolean
hideInTray: boolean
startOnBoot: boolean,
language: 'en-US' | 'ua-UA'
language: 'en-US' | 'ua-UA' | 'de-DE'
},
modules: {
dataPath: string;
Expand Down Expand Up @@ -403,4 +403,4 @@ export function handleSettings(settings: Settings) {
ipcMain.handle('settings:gui:matrixModeUnlocked', async (_e, data: SettingsData['gui']['matrixModeUnlocked']) => {
await settings.setGuiMatrixModeUnlocked(data)
})
}
}
2 changes: 2 additions & 0 deletions src/i18n/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import enUS from './en-US'
import uaUA from './ua-UA'
import deDE from './de-DE'

export default {
'en-US': enUS,
'ua-UA': uaUA,
'de-DE': deDE,
}
8 changes: 6 additions & 2 deletions src/pages/settings/LanguageSelectorComponent.vue
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ const languages: Language[] = [
name: 'English',
symbol: 'en-US'
},
{
name: 'Deutsch',
symbol: 'de-DE'
},
{
name: "Московский",
symbol: 'ru-RU'
Expand All @@ -59,7 +63,7 @@ async function onLanguageSelected(lang: Language) {
await loadSavedLanguage()
return
}
i18n.locale.value = language.value.symbol
await window.settingsAPI.system.setLanguage(language.value.symbol as unknown as "en-US")
}
Expand All @@ -73,4 +77,4 @@ onMounted(async () => {
await loadSavedLanguage()
})
</script>
</script>

0 comments on commit 9a825b8

Please sign in to comment.