Skip to content

docs(contracts): bring the zh sharing close to the measured parent reach (#881) - #893

Merged
yinlianghui merged 1 commit into
mainfrom
claude/issue-881-contracts-zh-sharing-sync
Aug 6, 2026
Merged

yinlianghui merged 1 commit into
mainfrom
claude/issue-881-contracts-zh-sharing-sync

Conversation

@yinlianghui

@yinlianghui yinlianghui commented Aug 6, 2026 •

Copy link
Copy Markdown
Collaborator

Fixes #881

content/docs/revenue/contracts.mdx「共享」小节的收尾段在 #699(0899b4f7)里按 #694 的实测结论重写过,但那个 commit 只动了英文页。两份中文页停在改写之前,中文读者拿到的是纠偏之前的口径。本 PR 只补这一段的两份译文。

前提复核(基线 origin/main = c94a35c7)

三份页面的 git log 对照,成因与 issue 的判断一致:

页面 是否含 0899b4f7 之后补翻的 PR
content/docs/revenue/contracts.mdx 有 ——
content/docs/revenue/contracts.zh-Hans.mdx 无 无(本 PR)
content/docs/revenue/contracts.zh-Hant.mdx 无 无(本 PR)

#694 / #699 的事实在英文页仍在(contracts.mdx:155),test/parent-derived-reach.test.ts 仍在钉住实测可达范围,上游 objectstack-ai/objectstack#5386 仍 open。前提成立。

en / zh 差异表(改前)

英文页 contracts.mdx:155 现行有、两份中文页 :155 没有的四处:

# 英文页现行内容(撮要) 改前 zh-Hans / zh-Hant 判定
1 neither available route actually delivers 「follows the account」 today 只说「两种做法都会对该对象的所有用户放开合同可见性」 缺结论:没说这等于没做到读者想要的事
2 a Controlled-by-Parent OWD derives org-wide in this release — the parent link is not consulted per caller 完全没有 缺 #694 实测结论,正是这段被改写的原因
3 a sharing rule on Contract widens the records it matches for every holder of the object;Both are a broad widening, not an account-scoped one 「都会对该对象的所有用户放开」把两条路揉成一句,丢掉「宽口径 vs 按账户」的对照 缺对照
4 see Sharing and Security 页链接 + Controlled by Parent, in practice 只有页面级链接,没有小节名 缺小节指向

译文对照

zh-Hans(contracts.zh-Hans.mdx:155)

  • 改前:如果你的组织希望合同跟随账户,需要管理员显式配置:在 Contract 上新增共享规则,或把它的 OWD 改成“由父级控制”。两种做法都会对该对象的所有用户放开合同可见性 —— 参见共享与安全。
  • 改后:如果你的组织希望合同跟随账户,需要管理员显式配置——而今天可走的两条路,没有一条真的交付了「跟随账户」:在 Contract 上新增共享规则,放开的是这条规则匹配到的那些记录,而且是对该对象的每一个持有者放开;把它的 OWD 改成“由父级控制”,在本版本中派生出来的是组织范围——父级链接并不会按调用者去查。两种做法都是一次宽口径的放开,而不是一次按账户收窄的放开——参见共享与安全,“由父级控制”在实践中。

zh-Hant(contracts.zh-Hant.mdx:155)

  • 改前:如果你的組織希望合約跟隨帳戶,需要管理員明確設定:在 Contract 上新增共用規則,或把它的 OWD 改成「由父層控制」—— 參見共用與安全。兩種做法都會對該物件的所有使用者放開合約可見性。
  • 改後:如果你的組織希望合約跟隨帳戶,需要管理員明確設定——而今天可走的兩條路,沒有一條真的交付了「跟隨帳戶」:在 Contract 上新增共用規則,放開的是這條規則匹配到的那些記錄,而且是對該物件的每一個持有者放開;把它的 OWD 改成「由父層控制」,在本版本中衍生出來的是組織範圍——父層連結並不會按呼叫者去查。兩種做法都是一次寬口徑的放開,而不是一次按帳戶收窄的放開——參見共用與安全,「由父層控制」在實務中。

只翻既有英文事实,不加新断言:改后四个分句与英文页 :155 的四个分句一一对应,没有引入英文页没说的东西(没有新增测试数字、没有新增 issue 号、没有新增行为承诺)。

用词:简体按 src/translations/zh-CN.ts 与本页既有惯用词(合同 / 字段 / 对象 / 共享规则 / 派生 / 调用者 / 父级链接 / 组织范围,均与 sharing-and-security.zh-Hans.mdx 一致);繁体按本页既有惯用词(合約 / 欄位 / 物件 / 共用規則 / 衍生 / 呼叫者 / 父層連結 / 組織範圍,与 sharing-and-security.zh-Hant.mdx 一致)。引号沿用两页各自的既有写法:zh-Hans 页正文用「」,而「由父级控制」这个术语在全仓 zh-Hans 页(sharing-and-security.zh-Hans.mdx 的小节标题、profiles.zh-Hans.mdx 的引用)一律写作 “由父级控制”,改前那一行也是如此,故保持不动;zh-Hant 全用「」,无此分歧。

小节引用按 zh 页既有写法:不新增带锚站内链接。两页的翻译标题(“由父级控制”在实践中 / 「由父層控制」在實務中)不会 slugify 成英文锚点,PR #868 已为同类情形定下「zh 页链接到页面、锚点去掉」的先例;这里在既有页面级链接之后补一个纯文本小节名,与 profiles.zh-Hans.mdx:45 / profiles.zh-Hant.mdx:45 已在用的写法逐字一致。英文页自己引用这一小节时也是纯文本,不带锚。

与 #878 的衔接

0550c5fb(#878)改的是同小节的前两条 bullet(合同所有者的「读 vs 编辑」两层、Sales Manager / System Administrator 是仅有的两个持有编辑权的 profile),收尾段它没碰。本 PR 只改收尾段那一行,git diff 每份文件各 1 行增删,#878 与 #874 落的内容逐字节未动,零回退。语义上也不重复:前两条 bullet 讲「谁读得到、谁改得动」,收尾段讲「想让它跟随账户该怎么办、以及为什么两条路都不成」。

同批漏页核查(只核不改,结论:无漏页)

0899b4f7 的文件面里另有两份文档页。逐段比对英文页与两份中文页后,两份都已补齐,无需再改:

同批文件 中文页是否跟上 #699 补翻的 PR
content/docs/administration/sharing-and-security.mdx 已跟上(zh-Hans / zh-Hant 均有该小节、org-wide 实测段、OWD 表两行注解、相关列表表格与其后散文、手工共享段、层级合成第 4 条、用户提示第 2 条) a98ddaa4(#790 / #791 → PR #811)
content/docs/administration/profiles.mdx 已跟上(zh-Hans / zh-Hant 的 sales_rep「联系人」「商机行项和报价行项」两条均为实测口径) cc25f6d9(#807 → PR #820)

0899b4f7 触及的其余文件是 src/** 注释与 test/sharing-coverage.test.ts,没有中文对应页。因此本条不产生 out-of-scope finding。

验证

全量套件在共享锁下依次跑过,均为退出码 0:

步骤 退出码 关键行
pnpm validate 0 ✓ Validation passed (4619ms)
pnpm typecheck 0 tsc --noEmit 无输出
pnpm build 0 ✓ Build complete (1566ms) · Artifact: dist/objectstack.json (1921.4 KB)
pnpm test -- --maxWorkers=2 0 Test Files 66 passed (66) · Tests 1587 passed | 1 skipped (1588)
pnpm lint 0 13 warning(s), 14 suggestion(s) (1231ms)(均为既有告警,与本改动无关)
node scripts/check-source-hygiene.mjs 0 ✓ source hygiene clean(406 个 content / .changeset 文件纳入控制字节扫描)

pnpm test 输出里 ✗ source hygiene failed … 若干行是 source-hygiene 元测试自身故意构造的失败样本打到 stderr 的,属预期,测试文件全绿。

docs-drift.test.ts 的中英文 callout 数量校验不受影响:本 PR 没有增删任何 blockquote 引用块。

改动文件的控制字节自扫(grep -naP 扫 \x00-\x08、\x0b、\x0c、\x0e-\x1f)零命中。

changeset

.changeset/contracts-zh-sharing-sync.md(hotcrm: patch),站内路径用反引号。

…ach (#881)

The closing paragraph of the *Sharing* section on
`content/docs/revenue/contracts.mdx` was rewritten in #699 (0899b4f) against
the reach measured in #694: neither route an admin can take actually delivers
"contracts follow the account" today — a sharing rule on Contract widens the
records it matches for every holder of the object, and a Controlled-by-Parent
OWD derives org-wide in this release, the parent link not being consulted per
caller. That commit touched the English page only. Both Chinese pages stayed on
the pre-correction text, which said the two routes merely "open contract
visibility to every user of the object" and omitted the conclusion the
correction exists to deliver.

`contracts.zh-Hans.mdx` and `contracts.zh-Hant.mdx` now carry the same three
facts as the English page, and cite the *Controlled by Parent, in practice*
section by its translated heading — “由父级控制”在实践中 /
「由父層控制」在實務中 — on top of the page-level link they already had. No new
anchor link: the translated headings do not slugify to the English anchor, so
the zh pages keep the un-anchored form used since #868, and the English page
cites that section as plain text as well.

Translation only — no new assertion beyond what the English page states. No
English page, metadata, profile, sharing-rule or OWD change; the reach being
described stays pinned by `test/parent-derived-reach.test.ts`. The first two
bullets of the same section, rewritten in #878, are untouched.

Fixes #881
@vercel

vercel Bot commented Aug 6, 2026

Copy link
Copy Markdown

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

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
hotcrm Ignored Ignored Aug 6, 2026 5:15am

Request Review

Copy link
Copy Markdown
Collaborator Author

正文在一次 body 更新中被平台去掉了归属页脚(创建时是有的),补在这里:


Generated by Claude Code

@yinlianghui
yinlianghui marked this pull request as ready for review August 6, 2026 05:18
@yinlianghui
yinlianghui added this pull request to the merge queue Aug 6, 2026
Merged via the queue into main with commit 92b94e7 Aug 6, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

contracts 的 zh-Hans / zh-Hant「共享」小节收尾段停在 #699 改写之前(controlled_by_parent 的 org-wide 实测结论只进了英文页)

2 participants