Files
OmniRoute/scripts/i18n
Diego Rodrigues de Sa e Souza d6f720bceb feat(i18n): new-key gate rejects __MISSING__ markers; skills translate new keys in parallel (#13996)
On 2026-09-16 eight feature PRs added 61 keys to src/i18n/messages/en.json and
stamped `__MISSING__:<en>` into all 65 locales instead of translating.
check-new-key-coverage accepted the marker as "the key reached the locale", so
nothing blocked the PRs, and the blocking real-translation ratio gate then failed
on the release tip for everybody (pt-BR 3.2 % > 2.5 % + 0.5).

- scripts/i18n/check-new-key-coverage.mjs: a leaf whose value starts with
  `__MISSING__:` is judged exactly like an absent leaf; the FAIL message names
  the marker as the cause and prints the per-locale sync-ui-keys command and the
  parallel runner. Header/JSDoc updated.
- tests/unit/i18n-new-key-coverage.test.ts: "a new key that only carries a
  __MISSING__ marker is flagged" (was the inverse case, which encoded the old
  contract); the other six cases unchanged and green.
- scripts/i18n/translate-new-keys.sh (+ `npm run i18n:translate-new-keys`):
  committed, detached-safe runner — flock queue, N workers (default 5), 3
  attempts per locale of `sync-ui-keys.mjs --translate-markers --batch-size=40`,
  per-locale logs/.exit + batch.log/batch.status/batch.rc/batch.pid under
  _artifacts/i18n-new-keys/, non-zero exit while any locale still carries a
  marker, refuses to start (exit 2, names the five OMNIROUTE_TRANSLATION_* vars)
  when the backend env is absent. Reads only the OMNIROUTE_TRANSLATION_* lines
  of the repo .env; kills nothing, matches nothing by name.
- docs: QUALITY_GATES.md (gate table + check-new-key-coverage section) and
  I18N.md (gate table + "Translating the keys a branch adds" subsection).

The implementation/port/merge skills reference the new shared snippet
`.agents/skills/_shared/i18n-translate-new-keys.md` (skills repo, separate).
2026-09-17 13:13:13 -03:00
..