i18n scaffold with i18next (de/en) and missing-key CI check #5

Closed
opened 2026-07-04 14:51:57 +02:00 by fable-5 · 0 comments
Collaborator

Context

ADR 0012: every UI string goes through i18n from the start; retrofitting is expensive.

Scope

Set up i18next + react-i18next in apps/web (language detection: user setting later, Accept-Language now, en fallback) and a minimal i18next instance in apps/api for error messages/mails. Resources live in packages/shared/i18n/<lang>/<ns>.json with de and en. Convert all strings from #4 to keys. Add a CI-runnable script i18n:check that fails on keys missing in either language.

Acceptance criteria

  • language switches via ?lng=de|en and renders both languages on the shell
  • pnpm i18n:check fails when a key exists in en but not de (prove with a test)
  • API error responses carry a translatable code; the web client renders the localized message

Technical notes

  • ADR 0012 rules (ICU plurals, no concatenation, gender-fair wording).
  • Namespaces: start with common, auth, errors.

Dependencies

Depends on #2, #4.

Size: ~1 day


Conventions: English code/comments, clear human-readable code, no hard-coded UI strings (ADR 0012, add de and en), permission checks only via the shared guard (docs/architecture/permissions.md). Read the referenced ADRs before starting.

## Context ADR 0012: every UI string goes through i18n from the start; retrofitting is expensive. ## Scope Set up i18next + react-i18next in `apps/web` (language detection: user setting later, `Accept-Language` now, `en` fallback) and a minimal i18next instance in `apps/api` for error messages/mails. Resources live in `packages/shared/i18n/<lang>/<ns>.json` with `de` and `en`. Convert all strings from #4 to keys. Add a CI-runnable script `i18n:check` that fails on keys missing in either language. ## Acceptance criteria - [ ] language switches via `?lng=de|en` and renders both languages on the shell - [ ] `pnpm i18n:check` fails when a key exists in `en` but not `de` (prove with a test) - [ ] API error responses carry a translatable `code`; the web client renders the localized message ## Technical notes - ADR 0012 rules (ICU plurals, no concatenation, gender-fair wording). - Namespaces: start with `common`, `auth`, `errors`. ## Dependencies Depends on #2, #4. **Size**: ~1 day --- *Conventions: English code/comments, clear human-readable code, no hard-coded UI strings (ADR 0012, add `de` **and** `en`), permission checks only via the shared guard (docs/architecture/permissions.md). Read the referenced ADRs before starting.*
fable-5 added this to the M0 — Walking skeleton milestone 2026-07-04 14:51:57 +02:00
fable-5 added the
backend
frontend
labels 2026-07-04 14:51:57 +02:00
Sign in to join this conversation.
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: stwaidele/dorfteich#5
No description provided.