refactor: cleanup translations

Signed-off-by: Sebastian Krupinski <krupinski01@gmail.com>
This commit is contained in:
2026-07-07 17:57:43 -04:00
parent d92a0331a6
commit 5a729d851e
8 changed files with 43 additions and 31 deletions
+2
View File
@@ -0,0 +1,2 @@
/** Locale used before runtime localization configuration is available. */
export const DEFAULT_LOCALE = 'en';
-24
View File
@@ -1,24 +0,0 @@
{
"header": {
"searchPlaceholder": "Hier suchen.."
},
"systemMenu": {
"administration": "Administration",
"applications": "Anwendungen",
"personalSettings": "Persönliche Einstellungen",
"toggleAdmin": "Admin",
"toggleApps": "Apps",
"toggleSettings": "Einstellungen"
},
"notifications": {
"markAllRead": "Alle als gelesen markieren",
"title": "Benachrichtigungen",
"viewAll": "Alle anzeigen"
},
"userMenu": {
"darkMode": "Dunkles Design",
"lightMode": "Helles Design",
"logout": "Abmelden",
"settings": "Einstellungen"
}
}
-14
View File
@@ -1,14 +0,0 @@
{
"systemMenu": {
"adminSettings": "System",
"apps": "Applications",
"personalSettings": "Settings",
"userSettings": "Settings"
},
"userMenu": {
"darkMode": "Dark Mode",
"lightMode": "Light Mode",
"logout": "Logout",
"settings": "Settings"
}
}
+8 -4
View File
@@ -1,7 +1,6 @@
import { createI18n } from 'vue-i18n';
import { en as vuetifyEn, de as vuetifyDe } from 'vuetify/locale';
export const FALLBACK_LOCALE = 'en';
import { DEFAULT_LOCALE } from '@KTXC/l10n/config';
/**
* The single vue-i18n instance shared by the core shell and all modules.
@@ -9,8 +8,8 @@ export const FALLBACK_LOCALE = 'en';
export const i18n = createI18n({
legacy: false,
globalInjection: false,
locale: FALLBACK_LOCALE,
fallbackLocale: FALLBACK_LOCALE,
locale: DEFAULT_LOCALE,
fallbackLocale: DEFAULT_LOCALE,
missingWarn: import.meta.env.DEV,
fallbackWarn: false,
messages: {
@@ -31,3 +30,8 @@ export function mergeCatalog(locale: string, namespace: string, messages: Record
export function applyLocale(locale: string): void {
i18n.global.locale.value = locale;
}
/** Update the locale used when a translation is missing from the active locale. */
export function applyFallbackLocale(locale: string): void {
i18n.global.fallbackLocale.value = locale;
}