feat(portal-shell): ci gate — fail prod build on missing translations
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:
@@ -38,6 +38,7 @@
|
||||
"configurations": {
|
||||
"production": {
|
||||
"localize": ["en", "fr"],
|
||||
"i18nMissingTranslation": "error",
|
||||
"budgets": [
|
||||
{
|
||||
"type": "initial",
|
||||
|
||||
Reference in New Issue
Block a user