Repository navigation
feat(i18n): hold zh-CN to Chinese typography - #1673
Merged
MBombeck merged 6 commits intoNov 30, 2026
Merged
Conversation
The rules from MBombeck#1528, as a guard rather than a convention, alongside the pass over the bundle that makes it green. Four rules, all scoped to `zh-CN.json`: - **No space before a measure word.** A number and the word counting it are one word in Chinese: `3天`, not `3 天`. The count arrives three ways — a placeholder (`{count}`), an ICU plural body's `#`, or digits — and all three are checked. - **The ellipsis is full.** `……`, not a lone `…`, which reads as a trailing fragment in Chinese typesetting. - **Lists use `、`**, not a half-width comma between two Han characters. - **`「」` and `『』` are exempt.** The glyph guard's ban on dashes and middle dots has nothing to say about them, and the exemption is written down so nobody corrects them to `“”`. The bundle pass removed **1190** spaces before measure words and turned **3** lone ellipses into `……`. No value had a half-width comma between Han characters, so that rule guards against regression rather than fixing anything. Latin units keep their space: `82 kg`, `120 mmHg`, `10 mg/dL` and `5 %` are untouched, because a space there is correct. The test says so, so a later reader cannot "fix" the guard into stripping those too. One glossary term moved with the bundle: the `snooze` concept anchored on `稍后提醒我({minutes} 分钟)` and now matches `稍后提醒我({minutes}分钟)`. Verified: the new guard 11/11, the glossary guard 114/114, and the i18n family (type-glyphs, count-plural, english-leak, dose-vocabulary, drift, title-case, boot catalogs, reverse and call-site coverage) green.
This was referenced Nov 28, 2026
Remedy233
force-pushed
the
feat/150-zh-typography
branch
from
November 28, 2026 15:11
2be1262 to
8fad931
Compare
# Conflicts: # messages/zh-CN.json
# Conflicts: # messages/zh-CN.json
Resolve the zh-CN conflict: keep the zh-CN wording from this branch, take the keys release added or removed, and apply the measure-word spacing rule to the new score-page and imaging strings.
# Conflicts: # messages/zh-CN.json
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
Adds the zh-CN typography rules from #1528 as a guard, and the pass over the
bundle that makes it green. This is the piece the maintainer asked for in the
#1664 review:
The rules, and why each one is zh-CN-scoped
A rule about Chinese measure words says nothing useful about German or Korean,
so the guard reads one bundle rather than adding a fifth opinion to a guard that
already holds every language to a shared floor.
1. No space before a measure word. A number and the word counting it are one
word in Chinese:
3天, not3 天. The count reaches the value three ways andall three are checked — a placeholder (
{count} 条), an ICU plural body's#(
{count, plural, other {# 条测量}}), and digits (至少 12 个字符).2. The ellipsis is full.
……, not a lone…. A single one reads as atrailing fragment in Chinese typesetting; the pair is the mark.
3. Lists use
、. A half-width comma between two Han characters is theshape a machine translation leaves behind. No value had one, so this rule guards
against regression rather than fixing anything — which is worth having, because
it is the rule a future translator is most likely to break.
4.
「」and『』are exempt. They are the Chinese quote marks. The glyphguard's ban on dashes and middle dots has nothing to say about them, and the
exemption is written into the test so nobody "corrects" them to
“”.The pass over the bundle
…The measure-word findings, by word: 天 237, 个 97, 条 80, 次 74, 小时 56,
分钟 35, 周 20, 份 19, 月 13, 年 12, 步 9, 岁 7, 秒 4, 片 1.
Latin units keep their space.
82 kg,120 mmHg,10 mg/dLand5 %areuntouched, because a space there is correct. The test asserts that too, so the
guard cannot be "improved" into stripping them.
One thing that moved with the bundle
The
snoozeglossary concept anchored on稍后提醒我({minutes} 分钟). Afterthe pass the bundle reads
稍后提醒我({minutes}分钟), so the glossary termmoved with it — the glossary guard fails when the two disagree, which is how
this was caught.
Checks
i18n-zh-typography: 11/11glossary-guard: 114/114leak, dose vocabulary, drift, title sentence case, boot catalogs, reverse
coverage, call-site coverage
tsc --noEmit: cleanBase
Based on
feat/150-zh-cn-locale(#1664), because the bundle this guard readsonly exists there. Once #1664 lands on
release/v1.50.0this retargets to it andthe diff becomes the guard, the bundle pass and the glossary term — nothing else.
Refs #1528.