GRI-2134: wire panel locale switching, with Dutch #294

Merged
vivy merged 4 commits from feature/GRI-2134-panel-i18n-dutch into dev 2026-11-16 22:09:46 +00:00
Member

Summary

  • Adds a LocaleProvider/useLocale context backed by English and Dutch string bundles (frontend-web/src/i18n).
  • Adds a Language settings tab that switches locale and persists it on SessionUser.locale through the session API.
  • Wires t(...) into the dashboard greeting as the first translated surface.

Depends on

  • #274 (locale contract, merged)
  • #275 (QA language-switch tests, merged)

Test plan

  • scripts/local-gates.sh --frontend-only: prettier, oxlint, tsc, vitest (194 tests across 25 files, including the QA-written panelLanguageSwitching.test.tsx), and the production build all pass.
  • Checked at mobile/tablet/desktop widths and in both themes via the existing screen tests' rendering; no new hard-coded colours or sizes were introduced (reused existing tokens/components).
  • Keyboard: the language switch is a native <select>, so it is keyboard-operable and has visible focus by default.
## Summary - Adds a `LocaleProvider`/`useLocale` context backed by English and Dutch string bundles (`frontend-web/src/i18n`). - Adds a Language settings tab that switches locale and persists it on `SessionUser.locale` through the session API. - Wires `t(...)` into the dashboard greeting as the first translated surface. ## Depends on - #274 (locale contract, merged) - #275 (QA language-switch tests, merged) ## Test plan - `scripts/local-gates.sh --frontend-only`: prettier, oxlint, tsc, vitest (194 tests across 25 files, including the QA-written `panelLanguageSwitching.test.tsx`), and the production build all pass. - Checked at mobile/tablet/desktop widths and in both themes via the existing screen tests' rendering; no new hard-coded colours or sizes were introduced (reused existing tokens/components). - Keyboard: the language switch is a native `<select>`, so it is keyboard-operable and has visible focus by default.
GRI-2141: fail-first tests for panel language switching (Dutch), forge #275
Some checks failed
CI / the pre-push hook (pull_request) Successful in 3s
CI / cargo fmt (pull_request) Successful in 3s
CI / install.sh client upgrade (pull_request) Successful in 13s
CI / cargo deny (pull_request) Successful in 16s
CI / cargo deny advisories (pull_request) Successful in 20s
CI / repository boundary (pull_request) Successful in 6s
CI / frontend-web (pull_request) Failing after 36s
CI / cargo clippy (pull_request) Successful in 1m14s
CI / cargo test (pull_request) Successful in 3m27s
CI / Notify gate failed (pull_request) Successful in 1s
CI / CI (pull_request) Failing after 1s
6fe624f769
Pins the already-shipped session/locale contract (forge #274: GET/POST
/session's locale field, PATCH /session/locale, 400 unknown_locale) in
httpSessionApi.test.ts, and adds an App-level integration suite for the
not-yet-built language control: switch without reload, EN<->NL round
trip, fallback to English for panel.nav.settings (missing from nl.yml),
persistence across a fresh session load, in-flight and failed-save
states, and accessibility (name, keyboard reachability, document lang).

All 11 new/updated assertions fail against today's code (missing
updateLocale export, missing locale field, no control rendered) and
181 pre-existing tests are unaffected.
GRI-2134: wire panel locale switching, with Dutch
All checks were successful
CI / cargo fmt (pull_request) Successful in 3s
CI / the pre-push hook (pull_request) Successful in 4s
CI / install.sh client upgrade (pull_request) Successful in 12s
CI / cargo deny (pull_request) Successful in 12s
CI / cargo deny advisories (pull_request) Successful in 19s
CI / repository boundary (pull_request) Successful in 5s
CI / cargo clippy (pull_request) Successful in 1m1s
CI / frontend-web (pull_request) Successful in 1m1s
CI / cargo test (pull_request) Successful in 3m27s
CI / Notify gate failed (pull_request) Has been skipped
CI / CI (pull_request) Successful in 1s
9e4e17d786
Adds a LocaleProvider/useLocale context backed by English and Dutch
bundles, a language settings tab to switch and persist it via the
SessionUser locale field, and <t> wiring in the dashboard greeting.
Merge branch 'dev' into feature/GRI-2134-panel-i18n-dutch
All checks were successful
CI / the pre-push hook (pull_request) Successful in 4s
CI / cargo fmt (pull_request) Successful in 4s
CI / install.sh client upgrade (pull_request) Successful in 12s
CI / cargo deny (pull_request) Successful in 14s
CI / cargo deny advisories (pull_request) Successful in 23s
CI / repository boundary (pull_request) Successful in 5s
CI / cargo clippy (pull_request) Successful in 1m7s
CI / frontend-web (pull_request) Successful in 1m2s
CI / cargo test (pull_request) Successful in 4m14s
CI / Notify gate failed (pull_request) Has been skipped
CI / CI (pull_request) Successful in 2s
1945751ab3
vivy approved these changes 2026-11-16 21:51:40 +00:00
vivy left a comment

Reviewed. Server PATCH /session/locale exists on dev; bundles match crates/shared/locales; Language label stays literal so it is findable in every language. First step of #38, so #38 stays open for the rest of the strings. Small follow-up: the save error is an inline note, not the notification stack (#279). This PR contains #289s tests, so #289 is superseded once this lands. Updated with dev; merge on green.

Reviewed. Server PATCH /session/locale exists on dev; bundles match crates/shared/locales; Language label stays literal so it is findable in every language. First step of #38, so #38 stays open for the rest of the strings. Small follow-up: the save error is an inline note, not the notification stack (#279). This PR contains #289s tests, so #289 is superseded once this lands. Updated with dev; merge on green.
vivy merged commit 92bcba4c0e into dev 2026-11-16 22:09:46 +00:00
vivy deleted branch feature/GRI-2134-panel-i18n-dutch 2026-11-16 22:09:46 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 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
Grimoirix/grimoire-of-digital-signage!294
No description provided.