feat: implement i18n — extract all UI strings, add EN + ES-MX translations, add language selector #9

Merged
marcel merged 1 commits from feat/i18n into main 2026-03-19 15:13:57 +01:00
Owner

Summary

  • Extract 100+ hardcoded German strings from all .svelte files into Paraglide message keys
  • Add complete translations in messages/en.json (English) and messages/es.json (Spanish/Mexico)
  • Change baseLocale from ende so German is the default
  • Add DE | EN | ES language selector in the header (right of nav, left of logout); active language is bold, choice persists via Paraglide's cookie strategy (PARAGLIDE_LOCALE)
  • Add E2E tests for the language selector: visibility, switching, persistence across navigation, active highlight

Files changed

Area Change
messages/de.json 100+ keys extracted from all pages and components
messages/en.json Full English translation
messages/es.json Full Spanish (Mexico) translation
project.inlang/settings.json baseLocale: "de"
+layout.svelte Language selector + setLocale() integration
10 route pages + 3 components All hardcoded strings replaced with m.key()
e2e/lang.spec.ts New E2E spec for language switching

Test plan

  • E2E: lang.spec.ts — language selector shows DE/EN/ES, switching translates nav, choice persists after navigation
  • Existing E2E tests still pass (German is the default locale, so German text assertions are unaffected)
  • Manual: switch to EN → all visible text is in English; switch to ES → Spanish; switch back to DE → German

Closes #2

🤖 Generated with Claude Code

## Summary - Extract 100+ hardcoded German strings from all `.svelte` files into Paraglide message keys - Add complete translations in `messages/en.json` (English) and `messages/es.json` (Spanish/Mexico) - Change `baseLocale` from `en` → `de` so German is the default - Add **DE | EN | ES** language selector in the header (right of nav, left of logout); active language is bold, choice persists via Paraglide's cookie strategy (`PARAGLIDE_LOCALE`) - Add E2E tests for the language selector: visibility, switching, persistence across navigation, active highlight ## Files changed | Area | Change | |---|---| | `messages/de.json` | 100+ keys extracted from all pages and components | | `messages/en.json` | Full English translation | | `messages/es.json` | Full Spanish (Mexico) translation | | `project.inlang/settings.json` | `baseLocale: "de"` | | `+layout.svelte` | Language selector + `setLocale()` integration | | 10 route pages + 3 components | All hardcoded strings replaced with `m.key()` | | `e2e/lang.spec.ts` | New E2E spec for language switching | ## Test plan - [ ] E2E: `lang.spec.ts` — language selector shows DE/EN/ES, switching translates nav, choice persists after navigation - [ ] Existing E2E tests still pass (German is the default locale, so German text assertions are unaffected) - [ ] Manual: switch to EN → all visible text is in English; switch to ES → Spanish; switch back to DE → German Closes #2 🤖 Generated with [Claude Code](https://claude.com/claude-code)
marcel added 1 commit 2026-03-19 12:40:11 +01:00
feat: implement i18n — extract all UI strings, add EN + ES-MX translations, add language selector
Some checks failed
CI / Unit & Component Tests (push) Successful in 9m22s
CI / Backend Unit Tests (push) Successful in 1m52s
CI / E2E Tests (push) Failing after 59s
CI / Unit & Component Tests (pull_request) Successful in 9m51s
CI / Backend Unit Tests (pull_request) Successful in 2m3s
CI / E2E Tests (pull_request) Failing after 1m11s
2829e1adf1
Extract all hardcoded German strings from every .svelte file and component
into Paraglide message keys. Add complete translations for all keys in
messages/en.json (English) and messages/es.json (Spanish/Mexico).

Changes:
- messages/de.json: 100+ keys covering navigation, buttons, form labels,
  placeholders, section headings, empty states, and error messages
- messages/en.json, messages/es.json: complete translations for all keys
- project.inlang/settings.json: change baseLocale from "en" to "de"
- +layout.svelte: add DE/EN/ES language selector in header using setLocale();
  active language is bold, choice persists via Paraglide cookie strategy
- All 10 route pages + 3 shared components: replace hardcoded German with m.key()
- e2e/lang.spec.ts: E2E tests for language selector visibility, switching,
  persistence across navigation, and active state highlighting

Closes #2
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
marcel merged commit 0e76be5672 into main 2026-03-19 15:13:57 +01:00
marcel deleted branch feat/i18n 2026-03-19 15:14:01 +01:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: marcel/familienarchiv#9