Skip to content

fix(i18n): unify the Chinese product term for crm_case to 工单 - #1525

Merged
os-sales merged 2 commits into
mainfrom
claude/issue-837-crm-case-gongdan
Sep 3, 2026
Merged

fix(i18n): unify the Chinese product term for crm_case to 工单#1525
os-sales merged 2 commits into
mainfrom
claude/issue-837-crm-case-gongdan

Conversation

@os-sales

@os-sales os-sales commented Sep 3, 2026

Copy link
Copy Markdown
Collaborator

Fixes #837

Maintainer ruling, 2026-08-31 (verbatim, kept untranslated): 「crm_case 统一叫工单。」

What changed

surface before after
src/translations/zh-CN.ts — 6 places naming the object 服务案例 / 案例编号 / 来源案例 工单 / 工单编号 / 来源工单
15 *.zh-Hans.mdx pages 案例 (14) · 个案 (1) 工单
18 *.zh-Hant.mdx pages 案例 (15) · 案件 (3) 工單
4 authored test ledgers 案例 · 案件 工单 / 工單
new guard test/docs-object-term-consistency.test.ts

en, es-ES and ja-JP are untouched — they carry Case / Caso / ケース.

Two premises in the card did not survive measurement

1. "The four locale packs' crm_case label (currently 服务案例) changes to 工单."
Only one pack carries a Chinese term. Measured on e8a3ae9: en.ts Case,
es-ES.ts Caso, ja-JP.ts ケース, zh-CN.ts 服务案例. Rewriting three of
them to 工单 would put a Chinese word on the English, Spanish and Japanese UI. The
maintainer's words are about the Chinese term, so the change lands in zh-CN.ts
alone — and there it covers all six places the pack named the object, not just
label: pluralLabel, description, case_number, the nav_case sidebar entry
(which read 服务案例 while its neighbour nav_my_cases already read 我的工单),
and crm_knowledge_article.related_to_case (来源案例, whose own help text on the
same line already said 工单).

2. "zh-Hant 同形."
It is not, in three separate ways. 工单 is Simplified-only — the Traditional form
is 工單, so a Simplified grep cannot see that surface at all. Re-derived per
script:

zh-Hans zh-Hant
pages using the target term 29 27
pages using 案例 14 15
pages using 案件 0 3
pages using 个案 / 個案 1 0
pages mixing two spellings 5 5

The two scripts disagree on which pages as well as how many: profiles and
sharing-and-security are 工单 in Simplified and 案件 in Traditional, and
whats-new is 个案 in Simplified and 案例 in Traditional. So crm_case answered
to five Chinese names, not three. Re-derived change surface: 33 doc pages,
against the 14 the card scoped.

Every hit was read; one was rejected

92 Chinese occurrences across the two scripts, each read before it was changed.
All 92 were this object — 案例 never appears here as "case study". One hit was
rejected as unrelated
: src/translations/ja-JP.ts:566, where
crm_opportunity's description reads 「パイプライン上の商談・案件」 — a Japanese
word, about a different object. That is why the scan surface is the two Chinese
doc scripts plus the zh-CN pack, and not the tree.

The guard, and the proof it can fail

Ruled part 3, landing in the same stroke. It derives the Simplified term from
objects.crm_case.label in the zh-CN pack — through the same stack the app
resolves it from, so it can never disagree with the product UI — and fails on a
retired spelling reaching a zh-Hans page, a zh-Hant page, the pack itself, or a
string literal in any ledger under test/. That last surface is the point:
three guarded ledgers named this object three different ways and all stayed
green, because each compared only its own page to its own ledger.

Traditional is authored, not derived, with the reason stated in the file: the app
ships no Traditional locale (the console falls back to Simplified), so there is
no field to read it from.

Observed failing, five ablations, each mutation confirmed on disk before the
run and each restore confirmed against HEAD after it (git diff HEAD empty and
the guard's blob hash equal to its HEAD blob):

leg mutation result
A whole pre-fix tree (content + src + test at e8a3ae9) 7 of 12 red
B pre-fix zh-CN.ts only 4 red
C pre-fix sharing-coverage.test.ts only 2 red — the ledger rule, the case the ruling names
D pre-fix automation.zh-Hans.mdx only 1 red
E the term deleted from all 39 zh-Hans pages (557 occurrences) 1 redonly 0 zh-Hans page(s) name crm_case as 工单

Leg E's first attempt was a no-op — a perl substitution that matched
nothing and exited 0, leaving the tree unmutated and the guard green. Recorded
rather than quietly re-run: read without checking that the mutation landed, that
green would have said "the vacuity rule cannot fail". The rerun replaced 557
occurrences across 39 files before the guard was asked anything.

Legs B and E also show the guard is not a one-way absence check: it fails if the
pack is renamed to a retired word, and it fails if the word is deleted instead
of unified.

Verification

pnpm verify green on the final commit ca48e6fobjectstack validate,
tsc --noEmit, objectstack lint, the i18n gate (0 i18n/missing-*), source
hygiene, the token ratchet, objectstack build, and vitest run
(157 files, 3297 passed, 1 skipped). The token ratchet is unmoved by design:
src/translations/ is outside its measured surface by ruling, and the new guard
lives in test/.

The 49 pre-existing objectstack lint warnings are unchanged — this PR edits
label values, never keys.

Refs #827, #810.

🤖 Generated with Claude Code

https://claude.ai/code/session_019hUuCQStzXGMFSX4dzww5t


Generated by Claude Code

os-sales and others added 2 commits September 3, 2026 07:43
Maintainer ruling 2026-08-31: 「crm_case  统一叫工单。」

crm_case answered to five Chinese names at once — 服务案例 in the language
pack (so, on screen), 工单/工單 on 29+27 doc pages, 案例 on 14+15, 案件 in
sharing-coverage's zh-Hant ledger, and 个案 in whats-new.zh-Hans. Three
guarded ledgers named one object three different ways and all stayed green,
because each only compared its own page to its own ledger.

- zh-CN pack: label, pluralLabel, description, case_number, nav_case and
  knowledge_article.related_to_case now all read 工单. en/es-ES/ja-JP are
  untouched — they carry Case/Caso/ケース, not a Chinese term.
- 33 Chinese doc pages (15 zh-Hans, 18 zh-Hant) move to 工单/工單.
- The four authored test ledgers that pinned an older spelling follow.
- New guard: test/docs-object-term-consistency.test.ts derives the term from
  the pack and fails on any retired spelling in the pages, the pack or a test
  ledger.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019hUuCQStzXGMFSX4dzww5t
@vercel

vercel Bot commented Sep 3, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
hotcrm Ignored Ignored Sep 3, 2026 7:53am UTC

Request Review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci/cd CI plumbing and the verification pipeline metadata Declarative metadata — schema, security posture, UI surfaces

Projects

None yet

1 participant