feat(portal-shell): ci gate — fail prod build on missing translations
CI / commits (pull_request) Successful in 2m17s
CI / scan (pull_request) Successful in 2m26s
CI / check (pull_request) Successful in 2m35s
CI / a11y (pull_request) Successful in 2m35s
CI / perf (pull_request) Successful in 5m40s

Set `i18nMissingTranslation: "error"` on the production build
configuration. The Angular CLI checks every `<source>` extracted
from `i18n` markers and `$localize` calls against the loaded
translation file (`messages.fr.xlf`), and now fails the build if a
target is missing instead of silently falling back to the source
text in the FR bundle.

Gates automatically through CI: `pnpm ci:check` runs `nx affected -t
... build`, which uses the production configuration by default. A PR
that adds an `i18n` marker without updating `messages.fr.xlf` fails
its build job and blocks the merge.

Verified locally by temporarily inserting an unmarked-in-fr string,
running the prod build, observing the explicit error message:

  ERROR: No translation found for "sanity.test.missingTranslation"
         ("A string with no FR translation").

Closes the loop on ADR-0019 §"Confirmation" — the final piece of
the i18n track before the BFF route + cookie work (deferred to the
auth-flow chantier).
This commit is contained in:
Julien Gautier
2026-05-12 00:26:52 +02:00
parent fe180fd125
commit 0c0a88a02e
+1
View File
@@ -38,6 +38,7 @@
"configurations": { "configurations": {
"production": { "production": {
"localize": ["en", "fr"], "localize": ["en", "fr"],
"i18nMissingTranslation": "error",
"budgets": [ "budgets": [
{ {
"type": "initial", "type": "initial",