Repository navigation
fix(i18n): write 簽 not 籤 in generated zh-Hant (#366) - #370
Merged
Merged
Conversation
OpenCC's twp preset maps Simplified 签 to 籤 (slip, tag) in 签核, 会签, and across word boundaries in 请求签名 and 中签发/上签发, where Taiwan writes 簽 (sign). gen-zh-hant.mjs now applies an ordered list of exact [wrong, right] pairs to the converter's output, with 標籤 and 書籤 set aside so no pair reaches into them. Fences still bypass both. The corpus is regenerated; every changed byte is 籤 -> 簽, and the 標籤 count is unchanged (45). Fixes #366 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jRd8W1US76Cj78zAM8
Contributor
席位核对 · REVISE · 2026-10-28T00:31Z ·
|
…#366) The guard regex held raw U+E000 and U+F8FF, invisible in editors and review views and easy to drop silently. Same match, now \uE000-\uF8FF. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jRd8W1US76Cj78zAM8
Contributor
席位核对 · ACCEPT · 2026-10-28T00:34Z ·
|
zhuangjianguo
marked this pull request as ready for review
October 28, 2026 00:37
This was referenced Oct 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.
Requested by Steedos · project thread
Fixes #366
What changed
OpenCC's
twppreset maps Simplified 签 to 籤 (slip, tag) where Taiwan writes 簽 (sign): it has no phrase for 签核 / 会签, and it segments 请求签名 as 请 + 求签 + 名 and 中签发 as 中签 + 发.apps/docs/scripts/gen-zh-hant.mjsnow runs an ordered list of exact[wrong, right]pairs on the converter's output:標籤 and 書籤 are swapped for private-use stand-ins before the pairs run and swapped back after, so no pair can reach into them (标签名 → 標籤名 would otherwise become 標簽名). The layer lives inside
convert(), so it sees exactly the prose runs and the meta / fixed-pair JSON the converter sees; fences still bypass both. A source containing a private-use code point is refused rather than risking a collision.The whole corpus is regenerated. Six files change, and every changed byte is 籤 → 簽 (checked by diffing old and new with 籤 folded to 簽: no other difference):
content/docs/use/approvals.zh-Hant.mdxcontent/docs/build/automation/approvals.zh-Hant.mdxcontent/docs/build/automation/index.zh-Hant.mdxcontent/docs/build/automation/workflows.zh-Hant.mdxcontent/docs/configure/webhooks.zh-Hant.mdxcontent/docs/configure/mcp.zh-Hant.mdxNo zh-Hans file is touched.
Verification (local, at this head)
grep -rnP '(中|上|求|都|次|待|人)籤|會籤' content/docs --include=*.zh-Hant.mdx: empty.node apps/docs/scripts/gen-zh-hant.mjs --check: ✓ 81 files match byte for byte.check-translations.mjs: passed.check-translation-output.mjs --files <PR diff>: passed (85 pre-existing findings reported, none in zh-Hans/zh-Hant).--self-test: passed.check-translation-ownership.mjs: passed.pnpm turbo run type-check test: green.pnpm turbo run buildthencheck-locale-surface.mjs: ✓.next startand loaded the four pages named in zh-Hant: the generator writes 籤 (lottery slip) where Traditional uses 簽 (sign): 籤核, 會籤, 請求籤名, 中籤發 on landed pages #366 in Chromium: each returns 200, no 籤 outside 標籤 in the page text, and 簽核 / 會簽 / 請求簽名 / 簽發 render.Follow-up (not in this PR)
www.objectos.ai'ssrc/lib/zhconvert.tsruns the samecn → twppreset without this layer, so its Traditional pages likely have the same defect. That file belongs to the www site's owner; it is named here as a follow-up.Generated by Claude Code