Neither locale file uses $t(…) nesting or the unescaped {{- …}} form
yet. The header of the guard now says what would happen if one came:
a nested key is not compared, and {{- name}} reads as the token
"- name", a gap against {{name}}. Comments only.
Resolves#480
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
REVIEW.md said the guard of src/i18n/locales.keys.test.ts compares only
the keys of both locale files; it now also fails on a key whose {{…}}
variables differ between them, format option included. The i18n zone
rule names the variables next to the keys, and the « Faux t » pitfall
keeps its blind spots: a text left in the other language passes, the
code is never read, so a key the code calls that neither file declares
escapes the guard, and so does a variable both files write alike that
the call does not pass. The « Niveaux » section is untouched.
Resolves#480
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The guard of #453 held both locale files to one set of keys but never
read the values: a key writing {{count}} in fr.json and {{n}} in en.json
passed it and showed a raw {{n}} in one language.
For every leaf both files hold, variablesOf reads the {{…}} tokens as
i18next does (format options included, without the whitespace i18next
ignores) and variableGaps lists every key whose token sets differ, with
the tokens of each side. A canary reads import.rootFiles.message_one
(count, folder, names) and the formatted token of
onboarding.card.transactions.uncategorized (filter, lowercase) in both
files. Measured on main ff8738b: 1743 common leaves, 117 with variables,
zero gap, so no exception list.
The leaf walk is shared with nodesOf, so a path compared for its
variables is a path compared for its key.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>