feat(i18n): per-bundle LOCALE_ID + language switching under docker compose
CI / frontend (push) Successful in 3m18s
CI / backend (push) Successful in 2m28s
CI / storybook-a11y (push) Successful in 7m54s
CI / semgrep (push) Successful in 1m25s
CI / e2e (push) Successful in 3m54s
CI / api-client-drift (push) Successful in 2m10s
CI / frontend (push) Successful in 3m18s
CI / backend (push) Successful in 2m28s
CI / storybook-a11y (push) Successful in 7m54s
CI / semgrep (push) Successful in 1m25s
CI / e2e (push) Successful in 3m54s
CI / api-client-drift (push) Successful in 2m10s
Fix the hardcoded LOCALE_ID: 'nl' — provide it from $localize.locale (the build-time locale, 'nl'/'en', undefined→'nl' in dev) and register both nl+en locale data, so the en bundle formats dates/numbers correctly. Make `docker compose up` serve the LOCALIZED build: the web service now runs `ng build --localize` then serve-i18n.mjs, which gained a PORT env + an /api reverse-proxy (API_PROXY_TARGET → the api container) so both /nl/ and /en/ are served with the language switcher working end-to-end. Drop the now-unused proxy.conf.docker.json (serve-i18n proxies /api itself); update ARCHITECTURE. `npm start` stays the nl-only HMR loop. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -534,8 +534,9 @@ no longer hand-written DTOs — it's an **NSwag-generated typed client**
|
||||
- **Proxy.** The app uses a relative base URL (`apiBaseUrl: ''`), so `/api` calls are
|
||||
same-origin and `ng serve` proxies them to the backend on `:5000`.
|
||||
([`environment.ts`](../../../src/environments/environment.ts),
|
||||
[`proxy.conf.json`](../../../proxy.conf.json); `proxy.conf.docker.json` targets the
|
||||
compose service.)
|
||||
[`proxy.conf.json`](../../../proxy.conf.json)). Under `docker compose up` the app is served
|
||||
localized (both locales) by `scripts/serve-i18n.mjs`, which proxies `/api` to the `api`
|
||||
container itself (`API_PROXY_TARGET`).
|
||||
- **Client → HttpClient seam.** The NSwag client's `fetch` is routed through Angular's
|
||||
`HttpClient` by `httpClientFetch` — the one place cross-cutting concerns live:
|
||||
`X-Correlation-Id` on every call, `Idempotency-Key` on non-GETs, a 10 s timeout, and
|
||||
|
||||
Reference in New Issue
Block a user