Repository navigation
test(i18n): hold zh-CN to the English-leak guard - #1674
Merged
MBombeck merged 9 commits intoNov 30, 2026
Merged
Conversation
`LEAK_LOCALES` names the bundles that must never echo English; `zh-CN` was not in it, so a Chinese value copied from `en.json` would have passed every guard. This adds it and the single allowlist entry that was needed: `settings.chatId` is "Chat ID" in Chinese Telegram clients too, because that is the name of the field. The delta was computed with the guard's own algorithm rather than guessed: of the 29 multi-word values that are byte-identical to english, 28 are already either allowlisted, a URL, a mask placeholder, or a single token. Depends on the zh-CN bundle PR: the guard reads `messages/zh-CN.json`.
This was referenced Nov 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this does
Puts
zh-CNunder the English-leak guard.LEAK_LOCALESnames the bundles that must never echo English.zh-CNwas notin it, so a Chinese value copied from
en.jsonwould have passed every guardin the suite: the existing guards prove key-shape parity, that no key is
empty, and that placeholders survive — none of them can tell a translated
string from a copied one.
The allowlist entry
One key needed adding:
The delta was computed with the guard's own algorithm rather than guessed. Of
the values that are byte-identical to English, 28 are already either
allowlisted, a URL, a mask placeholder, or a single token — leaving exactly
this one.
Checks
tsc --noEmit: cleanfindings=0Depends on
The zh-CN bundle PR — the guard reads
messages/zh-CN.json, so this is stackedon that branch and should merge after it.