#119-i18n (alt) — Automatische Spracherkennung + vollständige Internationalisierung (DE/EN) #122
Labels
No labels
priority/could
priority/must
priority/should
priority/wont
status/blocked
status/claimed
status/done-migrated
type/bug
type/feature
type/infra
type/tech-debt
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
robert/todo#122
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Story: Automatische Spracherkennung + vollständige Internationalisierung (DE/EN)
As a Nutzer,
I want to die App automatisch in der Sprache meines Geräts sehen (Deutsch, sonst Englisch als Fallback),
so that ich nicht zwischen Sprachen wechseln oder mit einer für mich fremden Sprache klarkommen muss.
Background
Verifiziert im Code: Es existiert aktuell kein i18n-Framework (keine Treffer für
i18n,useTranslation,LanguageProvidero. ä. inReactUi/src). Die UI-Strings sind eine unkoordinierteMischung aus Englisch und Deutsch, z. B.:
ListActionsMenu.tsx,TodoListItem.tsx: durchgängig Englisch ("Delete", "Rename", "Invite","Archive", "Transfer ownership", "Export as CSV" …)
PriorityMatrixPage.tsx: durchgängig Deutsch ("Ändern", "Dringend / Wichtig", "Faktor", "NeuerEintrag", "Liste"/"Karte", "Alle Labels" …)
PO-Entscheidung (2026-08-17, per Rückfrage bestätigt): Vollständige Internationalisierung — nicht
nur Spracherkennung oder ein Teilbereich. Größter Umfang der drei zur Wahl gestellten Optionen, dafür
langfristig sauber statt eines weiteren Flickenteppichs.
AC
react-i18nexto. äquivalent — technische Wahl liegt beimArchitekten), mit zwei Sprachpaketen: Deutsch und Englisch.
navigator.language/navigator.languages) ausgewertet:Deutsch (
de*) → deutsche UI, alles andere → englische UI als Fallback.siehe
Theme/GetThemePreferenceQuery/UpdateThemePreferenceCommand), sodass ein eingeloggterNutzer sie geräteübergreifend behält.
Dark-Mode-Schalter).
Mechanismus ersetzt — keine hartkodierten Strings mehr in Komponenten.
ai/roles/00_team_overview.mdbzw. der Frontend-Rolle als Konvention ergänzen).Out of scope
Claimed for this go-cycle (2026-08-23).
Architect plan:
ReactUi/src/i18n/locales/{de,en}/common.json(single namespace to start given the app's current size - can split later if it grows unwieldy). Keys grouped by component/feature area.de*vs everything-else fallback the AC specifies (not the library's full locale-matching default, which would need to be constrained explicitly).Languageplain enum (German/English, not a Vogen VO, same precedent as Theme/TodoListColor/TodoPriority),GetLanguagePreferenceQuery/UpdateLanguagePreferenceCommand, single-field addition to the user settings shape (4th one after IsEmailVerified/SessionsRevokedBeforeUtc/avatar/Theme - still not worth a consolidated preferences object per the #31 decision precedent).t('key')calls and populating both locale files as I go. Given the size, this lands as a sequence of small, reviewable commits (framework+backend+detection+settings first, then component groups) rather than one mega-diff, per this repo's commit-discipline convention - the AC's 100% coverage requirement stays the actual completion bar, tracked here until every component is migrated.Security/scope: no new attack surface (same pattern as Theme, a simple per-user string preference); no server-side content translated (emails etc. explicitly out of scope per the story).
Progress update + scope split decision.
Delivered so far (2 commits): the full i18n mechanism end-to-end - react-i18next, persisted Language preference (backend GetLanguagePreferenceQuery/UpdateLanguagePreferenceCommand mirroring the existing Theme pattern exactly, migration AddLanguageToUser), device detection on first load, the Settings toggle, and a representative migrated batch (Login, Register, AcceptInvitePage, ForgotPasswordPage, ResetPasswordPage, VerifyEmailPage, UnsubscribePage, EmailVerificationBanner, LogoutButton, BackendUnreachableBanner, OfflineBanner, SettingsModal's Appearance tab).
Remaining scope: ~78 components still have hardcoded strings (Todo list core, Shopping, Pantry, Priority Matrix, Master Packing List, account/notifications). That's real, substantial work on its own - splitting it into 5 follow-up stories (#122b-f, same pattern as #101's split into #101b-e) rather than one unreviewable mega-diff, per this repo's commit-discipline convention. This issue (#122) stays open and tracks the umbrella - its own AC (100% string coverage) is only satisfied once #122b-f are all done and a final repo-wide grep sweep (per #122f) confirms nothing was missed.
Closing out #122 - full i18n migration to react-i18next now complete across the entire ReactUi frontend.
Summary
useTranslation()/t(...)keys, in sub-issues #122b through #122f plus this final close-out gap-fill (SettingsModal.tsx's remaining Profile/Security/Notifications tabs, which had only been partially migrated).Final verification sweep (repo-wide grep across every
.tsxundersrc/, not justcomponents/):components/:App.tsx's top-level loading fallback, and the sharedui/dialog.tsxDialogContentclose-button's screen-reader-only label.Code review
ai/roles/memory/04_frontend_engineer_memory.md's Learned Patterns for the full progression of the rule). The 5th recurrence (in this close-out cycle's SettingsModal work) was fixed:settings.profile.email/username-> reusedauth.register.email/username,settings.profile.remove/.removing-> reusedshopping.cartCheck.remove/.removing,settings.security.copy-> reusedinvitePanel.copy.npm run build+npx tsc -b+npm run coverage(1050 tests, 114 files) green after every fix.Known limitation: Docker is not available in this environment, so the local review container (docker-compose.dev.yml) could not be rebuilt this cycle - noted explicitly per the loop's step 6 rather than silently skipped.