feat(i18n): add German (de) locale
Adds a complete German translation covering all 4 735 UI strings. New files: - packages/ui/src/lib/i18n/messages/de.ts - packages/ui/src/lib/i18n/messages/de.settings.ts Modified files: - runtime.ts: add 'de' to Locale type, LOCALES array, LOCALE_LABEL_KEYS - store.ts: add 'de' case in loadDictionary - messages/en.ts: add common.language.german key
This commit is contained in:
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -5,6 +5,7 @@ export const dict = {
|
||||
'common.loading': 'Loading...',
|
||||
'common.unavailable': 'Unavailable',
|
||||
'common.language.english': 'English',
|
||||
'common.language.german': 'German',
|
||||
'common.language.french': 'French',
|
||||
'common.language.simplifiedChinese': 'Chinese (Simplified)',
|
||||
'common.language.traditionalChinese': 'Chinese (Traditional)',
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
export type Locale = 'en' | 'fr' | 'zh-CN' | 'zh-TW' | 'uk' | 'es' | 'pt-BR' | 'ko' | 'pl' | 'ja';
|
||||
export type Locale = 'en' | 'de' | 'fr' | 'zh-CN' | 'zh-TW' | 'uk' | 'es' | 'pt-BR' | 'ko' | 'pl' | 'ja';
|
||||
|
||||
export const LOCALES = ['en', 'fr', 'zh-CN', 'zh-TW', 'uk', 'es', 'pt-BR', 'ko', 'pl', 'ja'] as const satisfies readonly Locale[];
|
||||
export const LOCALES = ['en', 'de', 'fr', 'zh-CN', 'zh-TW', 'uk', 'es', 'pt-BR', 'ko', 'pl', 'ja'] as const satisfies readonly Locale[];
|
||||
|
||||
export const DEFAULT_LOCALE: Locale = 'en';
|
||||
|
||||
@@ -14,6 +14,7 @@ export const LOCALE_LABEL_KEYS: Record<Locale, 'common.language.english' | 'comm
|
||||
'pt-BR': 'common.language.brazilianPortuguese',
|
||||
ko: 'common.language.korean',
|
||||
pl: 'common.language.polish',
|
||||
de: 'common.language.german',
|
||||
ja: 'common.language.japanese',
|
||||
};
|
||||
|
||||
|
||||
@@ -42,7 +42,9 @@ async function loadDictionary(locale: Locale): Promise<I18nDictionary> {
|
||||
? await import('./messages/ko') as { dict: I18nDictionary }
|
||||
: locale === 'pl'
|
||||
? await import('./messages/pl') as { dict: I18nDictionary }
|
||||
: locale === 'ja'
|
||||
: locale === 'de'
|
||||
? await import('./messages/de') as { dict: I18nDictionary }
|
||||
: locale === 'ja'
|
||||
? await import('./messages/ja') as { dict: I18nDictionary }
|
||||
: { dict: enDict };
|
||||
dictionaries.set(locale, mod.dict);
|
||||
|
||||
Reference in New Issue
Block a user