Repository navigation
fix(i18n): the quarter empty state names close_date by its declared label - #1760
Merged
Merged
Conversation
…abel
`src/translations/zh-CN/objects.pipeline.ts` declares
`close_date: { label: '预计成交日期' }`, and its own empty-state message for the
`closing_this_quarter` view named that same field twice by a coined short form
成交日期. Both are shipped Chinese UI, so a rep opening 本季度待成交商机 with no
matching records read a message calling the field 成交日期 while the field in the
very quarter filter being described was labelled 预计成交日期.
`src/` is the source of truth for a label (#1329, AGENTS.md §Documentation
discipline rule 6). The contradiction is inside one file, so the declared label
governs and the prose follows it. The label declaration, the empty-state title
本季度暂无待成交商机 and the view label are untouched — none of them spell the
field name.
Measured in a UTF-8 locale, because `grep -P` matches bytes under `LC_ALL=POSIX`
and silently drops real hits on multibyte neighbours:
`LC_ALL=C.UTF-8 grep -rhoP "(?<![计計])成交日期" src/` reads 2 before and 0 after,
against `预计成交日期` at 1 before and 3 after — rewritten in place, none added
and none lost.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019YKN9TPqDSSXUaYqp2j7MZ
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
os-bill
marked this pull request as ready for review
September 8, 2026 05:36
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.
Fixes #1750
The
zh-CNpack contradicted itself.src/translations/zh-CN/objects.pipeline.tsdeclares thecrm_opportunity.close_datelabel, and sixty-nine lines later its own empty-state message for theclosing_this_quarterview named that same field twice by a coined short form. Both strings are shipped Chinese UI: a rep who opened 本季度待成交商机 with no matching records read a message calling the field 成交日期, while the field on every opportunity record — and in the very quarter filter the message describes — is labelled 预计成交日期.src/is the source of truth for a label (#1329,AGENTS.md§Documentation discipline rule 6). The contradiction here is inside a single file, so there is no "which surface is authoritative" question to settle first: the declared label governs the prose beside it.The change
One line, two occurrences, both inside
emptyState.message.Before
After
The straight substitution reads naturally in both positions, so no rephrase was needed.
Untouched, deliberately — none of these spell the field name, and the first is the authority the change follows:
close_date: { label: '预计成交日期' },— the label declarationemptyState.title— 本季度暂无待成交商机label— 本季度待成交商机Why this site is worth a card of its own
content/docs/sales/opportunities.*documents this exact tab and its quarter filter. #1733 aligned 56 coined doc sites onto the pack wording across 16 pages — so a reader now follows Chinese docs that say 预计成交日期 and lands on the one screen that still said 成交日期. The split #1733 closed in the docs survived at the place the docs send the reader.Measurement
The instrument is load-bearing, so it is stated with the reading.
grep -Pmatches bytes underLC_ALL=POSIXand silently drops real hits on multibyte neighbours, so every count below was taken in a UTF-8 locale. The negative lookbehind names both scripts (计and計): the coined form is a substring of the correct one, and omitting traditional計counts zh-Hant pack sites as coined, which is how an unreachable number gets into a count.The arithmetic closes: 1 + 2 = 3. Every occurrence was rewritten in place, none added and none lost.
A zero from a byte-matching grep is not a zero, so the zero above carries a control leg — the same command shape, same corpus, same locale, on a string known to be present:
The pattern engine reaches CJK in this tree, so the 0 is a real absence rather than a broken pattern.
Other packs (verified, not assumed). No other locale spells this field in Chinese characters, so the fix stays
zh-CN-only:close_datelabelzh-CNja-JPes-ESenEach zero has its own multibyte control leg, so none of them is an instrument failure.
Verification
pnpm verifyon commit16fe217a— real exit code 0, all eight steps:The token ratchet reading says nothing about this diff either way —
scripts/check-source-token-ratchet.mjsexcludessrc/translationsby maintainer ruling, so this file is outside the surface it measures.Scope held
close_datetwo ways — 65 uses of the coined 「成交日期」 against 18 of the pack's 「预计成交日期」 #1733 was ruled no-new-gate on this exact surface;test/docs-object-term-consistency.test.ts's language-pack rule is currently vacuous (The #802 term guard's pack rule scanssrc/translations/zh-CN.ts, which the #1311 split turned into a 77-line barrel — it re-passed the #1529 defect verbatim in an ablation #1755 — it scans thesrc/translations/zh-CN.tsbarrel, which the The 70% advisory band's first real output:es-ES.ts(75.3%) andja-JP.ts(73.4%) are the only two files it names, and a third sits 224 bytes below it #1311 split left carrying zero occurrences), so an entry added there today would not fire.test/**is also epic Epic: bring this repo's test farm back under the 2026-08-31 ruling — platform-first,os lint --strictfirst, then retire the local re-implementations by family #1579's declared territory.skip-changeset: this ships Chinese UI a user reads.Type of Change
Checklist
.changeset/quarter-empty-state-names-the-declared-label.md(patch). Notskip-changeset: this ships Chinese UI a user reads.lint:i18n-gate🤖 Generated with Claude Code
https://claude.ai/code/session_019YKN9TPqDSSXUaYqp2j7MZ
Generated by Claude Code