fix(i18n/de): address code review findings

- Remove broken `import type { I18nDictionary } from '../types'` from
  de.ts and de.settings.ts; match the untyped style of fr.ts/fr.settings.ts
- Add `de`/`de-*` case to normalizeLocale() in runtime.ts so browser
  locale auto-detection picks up German without manual Settings change
- Fix ternary indentation in store.ts to match surrounding pl/ja branches
This commit is contained in:
SGD-DEV
2026-07-15 20:31:07 +02:00
parent a31ae16807
commit 5f700a7067
4 changed files with 9 additions and 9 deletions
@@ -1,6 +1,4 @@
import type { I18nDictionary } from '../types'; export const settingsDict = {
export const settingsDict: Partial<I18nDictionary> = {
'settings.providers.page.openCodeGo.title': 'OpenCode Go Nutzungsverfolgung', 'settings.providers.page.openCodeGo.title': 'OpenCode Go Nutzungsverfolgung',
'settings.providers.page.openCodeGo.description': 'Verbinden Sie das OpenCode Go Dashboard, um rollierenden, wöchentlichen und monatlichen Verbrauch anzuzeigen.', 'settings.providers.page.openCodeGo.description': 'Verbinden Sie das OpenCode Go Dashboard, um rollierenden, wöchentlichen und monatlichen Verbrauch anzuzeigen.',
'settings.providers.page.openCodeGo.workspaceId': 'Workspace-ID', 'settings.providers.page.openCodeGo.workspaceId': 'Workspace-ID',
+1 -2
View File
@@ -1,7 +1,6 @@
import { settingsDict } from './de.settings'; import { settingsDict } from './de.settings';
import type { I18nDictionary } from '../types';
export const dict: Partial<I18nDictionary> = { export const dict = {
...settingsDict, ...settingsDict,
'common.language.german': 'Deutsch', 'common.language.german': 'Deutsch',
'chat.message.userText.collapseAria': 'Benutzer-Nachricht einklappen', 'chat.message.userText.collapseAria': 'Benutzer-Nachricht einklappen',
+3
View File
@@ -60,6 +60,9 @@ export function normalizeLocale(value: string | undefined | null): Locale {
if (normalized === 'ja' || normalized.startsWith('ja-')) { if (normalized === 'ja' || normalized.startsWith('ja-')) {
return 'ja'; return 'ja';
} }
if (normalized === 'de' || normalized.startsWith('de-')) {
return 'de';
}
if (normalized === 'pl' || normalized.startsWith('pl-')) { if (normalized === 'pl' || normalized.startsWith('pl-')) {
return 'pl'; return 'pl';
} }