Repository navigation
Commit 4b8f8cd
docs(skills): the i18n skill names
<!-- claude-projects-attribution: {"github_login":"os-steve"} -->
_Requested by **Steve** · [project
thread](https://claude.ai/code/project/chan_01FdL1XeUyvVNxLreh3F4Qi9?thread=cmsg_01FdL1XeUyvVNxLreh3F4Qi98Ny4V8ebAep3LPcP3m5TDK)_
Fixes #26759
Clause-②: no
Metadata-protocol: none
## 维护者速读
- 改了什么:`skills/objectstack-i18n/SKILL.md` 的分组表补上两把 18.2
已接受、运行时已下发但技能没教的键:`fields.{field_name}` 行加
`inlineTitle`(主从字段在父表单上的内嵌子网格标题,键挂在拥有该字段的子对象下;未翻译时保留作者原文,不回退到子对象复数标签);`reports`
那句加
`reports.{report}.blocks.{block_name}.{label,description}`(联合报表各区块标题,按区块必填的
`name` 取键)。表后各给一行示例,照搬 `app-crm` / `app-showcase` 已发货的 zh-CN 包写法。手写作者页
`content/docs/ui/translations.mdx` 同补两处。eval 文件加第 8 题覆盖两把键;其 token
棘轮行先削重复再按实测钉在 1642;`@objectstack/skills` 补丁 changeset。
- 为什么改:PR #26757 把这两把键加进了协议,卡 #26759 是它欠下的 `Skills-docs:` 后续——AI
作者照技能写翻译包时,这两处标题会一直停在作者语言。
- 风险与回滚:只改技能文本、一页文档、一个 eval JSON、一行棘轮上限和一个 changeset;不动
schema、运行时或任何键。回滚即 revert 本 PR。
- 先看:`skills/objectstack-i18n/SKILL.md`(L162 字段行、L175–177 reports
句、L182–188
示例)、`skills/objectstack-i18n/evals/bundles-locales-coverage.json`(第 6
题删重复、第 8 题新增)、`scripts/check-skills-token-ratchet.mjs`(棘轮行 1451 →
1642,算式在注释里)。
- 两分钟验证:`node scripts/check-skills-token-ratchet.mjs`,预期
`objectstack-i18n/SKILL.md` ✓ 余量 877、`bundles-locales-coverage.json` ✓
余量 0,总行 `81 authored bundle file(s) within their ceilings`。
- 需要你做的:批准本 PR(`skills/**` 受管面,Tier H)。
## What changes
- **`skills/objectstack-i18n/SKILL.md`** (the group table a bundle
author picks keys from):
- the `fields.{field_name}` row names `inlineTitle` — the heading of the
inline child grid a `master_detail` field draws on its parent's form;
the field lives on the child object, so the key is the child's;
untranslated it keeps its authored text and never falls back to the
child's plural label (wording read off `FieldTranslationSchema`'s
docblock, `packages/spec/src/system/translation.zod.ts` L133–147 on
`origin/main` 0ea90c7);
- the sentence that said `reports`, `positions` and `permissions` hold
`label` + `description` by name now continues with
`reports.{report}.blocks.{block_name}.{label,description}`, keyed by the
block's required `name` (`JoinedReportBlockSchema.name`,
`packages/spec/src/ui/report.zod.ts`; the translation slot at
`translation.zod.ts` L1199);
- one example row each, after the `os i18n extract --no-objects-only`
sentence, spelled exactly as the shipped bundles spell them for `zh-CN`:
`objects.crm_opportunity_line_item.fields.opportunity.inlineTitle`
(`examples/app-crm/src/translations/crm.translation.ts` L99) and
`reports.showcase_task_overview.blocks.open_block.label`
(`examples/app-showcase/src/system/translations/index.ts` L1362). The
skill's own example bundle mirrors `examples/app-todo`, which has
neither a master-detail field nor a joined report, so the rows sit in a
two-line fragment fence instead of being invented into the todo bundle.
- **`content/docs/ui/translations.mdx`** (the card's hand-written-twin
item, named in the claim's file surface): a row for the inline
child-grid heading under the field row, and the report row gains the
`reports.NAME.blocks.BLOCK.label` / `description` spelling. Not
governed; it rides this PR because the claim's surface names it and the
card thread has one PR.
- **`skills/objectstack-i18n/evals/bundles-locales-coverage.json`**:
case 8 asks for the `Products` grid heading on the `crm_opportunity`
form and the `Open Tasks` block of the joined `showcase_task_overview`
report, and expects the two keys above; `must_contain` `inlineTitle` /
`crm_opportunity_line_item` / `blocks` / `open_block`,
`must_not_contain` `fields.opportunity_line_item` (the key on the
parent) and `components.open_block` (a page-component spelling). Paid
down first: case 6's `os i18n extract --no-objects-only` sentence and
its `--no-objects-only` assertion duplicated case 5's pin of the same
flag and were cut (77 bytes). Every name in the prompt and assertions is
a shipped example's or the Zod source's; none is invented.
- **`scripts/check-skills-token-ratchet.mjs`**: the eval row 1451 →
1642, pinned AT the measurement with the arithmetic and the standing
ruling quoted verbatim beside the sibling row: 「A:先削重复,余额按实测提高」. The
`SKILL.md` row does not move (5456 of 6333).
- **Changeset**
`.changeset/26759-i18n-skill-inline-title-report-blocks.md`:
`@objectstack/skills` patch, both declaration lines at line start.
- `packages/lint/src/validate-translation-references.ts` (round 2, claim
amendment 6449881440 — the card's "Stale header line" item): the Reports
header comment now lists `blocks.<block_name>.label` / `.description`,
keyed by the block's `name`, among a report's leaf keys. Comment only;
the validator reads the Zod shape.
**Skills readings** (`skills/**` touched; before = `origin/main`
0ea90c7, after = head; tokens = the ratchet's `ceil(bytes/4)`, stamp
line excluded):
| Reading | Before | After |
| --- | --- | --- |
| `skills/objectstack-i18n/SKILL.md` lines / tokens | 512 / 5282
(ceiling 6333, headroom 1051) | 520 / 5456 (ceiling 6333, headroom 877)
|
| `skills/objectstack-i18n/evals/bundles-locales-coverage.json` lines /
tokens | 75 / 1451 (ceiling 1451, headroom 0) | 85 / 1642 (ceiling 1642,
headroom 0) |
| all `SKILL.md` lines / tokens (whole package) | 4603 / 56079 | 4611 /
56253 |
## Why
An AI author who writes a translation bundle from this skill picks keys
off the group table; the two keys PR #26757 added were missing from it,
so a localized app kept a master-detail grid's heading and a joined
report's block headings in English even though the runtime serves both
translated (the business case on the card).
## Tests
- `node scripts/check-skills-token-ratchet.mjs` at head: `81 authored
bundle file(s) within their ceilings; 10 generator-owned file(s)
measured, not ratcheted`, exit 0; `objectstack-i18n/SKILL.md` ✓ (5456 /
6333), `bundles-locales-coverage.json` ✓ (1642 / 1642, headroom 0).
- `node scripts/check-skills-token-ratchet.mjs --self-test`: `79 cases
pass`, exit 0.
- The eval file parses, and no case has a `must_contain` string in its
`must_not_contain`.
- No test file edited; no forced test edit.
## Acceptance notes
- The eval is not run by any gate (the repo has no eval runner;
`check:skill-docs` / `check:skill-refs` / `check:skill-examples` read
`SKILL.md`, `references/` and the marked code fences). The new example
fence is a fragment and carries no `os:check` marker on purpose.
## Verification
- `node scripts/pm/dispatch-gates.mjs --tier --repo
objectstack-ai/objectstack`: MANDATORY — `skills/**`, clause ①, no
one-line exit; changed lines 51 vs the 3000 threshold.
- `node scripts/pm/dispatch-gates.mjs --commands --repo
objectstack-ai/objectstack` at head `4f490d8e` (the final commit)
derived 87 commands. All 87 ran in the worktree after that commit, each
exit code captured before any pipe: 87 of 87 exit 0 (70 source-reading
commands in one serial runner, the 17 dist-reading ones in a second
after the build) — among them `node
scripts/check-skills-token-ratchet.mjs` and its `--self-test`, `pnpm
--filter @objectstack/spec run check:skill-docs` /
`check:skill-examples` / `check:docs`, `pnpm check:pm-governed-merges`,
`pnpm check:pm-dispatch-gates`, `pnpm check:published-files`, `node
scripts/check-empty-changeset.mjs --base origin/main`, `node
scripts/check-adr-0087-registration.mjs --base origin/main`, `node
scripts/check-changeset-no-major.mjs --base origin/main`, `pnpm
check:skill-identifier-liveness`, `pnpm check:skill-frame-sync`, `pnpm
check:skill-compatibility`, `pnpm check:doc-authoring`, `pnpm
check:docs-spec-enumerations`, `pnpm check:ratchet-remedy-authority`,
`pnpm check:nul-bytes`.
- `dispatch-gates --ran`: `87 derived famil(ies) accounted for — 87 run,
0 NOT-MEASURED (a DERIVED zero — all 87 recorded an exit code and none
of them is 3)`, exit 0; no UNRUN family named on stderr.
- Build closure before the dist-reading gates: `turbo run build
--filter='./packages/**' --concurrency=2` under
`scripts/pm/os-verify-lock.sh`, `VERDICT command-exit 0` (held 8m20s).
- The edited gate script's own test suite is its `--self-test` (79
cases); no package source is touched, so no package `test` / `typecheck`
is owed; `pnpm lint` is CI's run.
## Human Minimum
- [x] 1. Schemas start as Zod; `packages/spec` holds no runtime logic.
(No schema touched.)
- [x] 2. Every name I added uses the casing for its kind.
- [x] 3. No formatter ran; `pnpm lint` passes (the repo-wide run is
CI's; no source file edited).
- [x] 4. One issue, one branch off an up-to-date `main`, one pull
request.
- [x] 5. A change that publishes carries a changeset, and both
declaration lines are filled in here and in the changeset.
- [x] 6. `packages/spec` touched: n/a, not touched.
- [x] 7. No hand edits to `content/docs/references/`,
`packages/*/CHANGELOG.md` or `content/docs/releases/`.
- [x] 8. Title, body and comments are in English.
- [x] The *Before Submitting* list in CONTRIBUTING.md is done.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_01ADHkmPqouEb6yELnSqBwRY
---
_Generated by [Claude
Code](https://claude.ai/code/session_01ADHkmPqouEb6yELnSqBwRY)_
---------
Co-authored-by: Claude <noreply@anthropic.com>fields.{field}.inlineTitle and a joined report's block headings (#26832)1 parent 912076f commit 4b8f8cd
6 files changed
Lines changed: 48 additions & 8 deletions
File tree
- .changeset
- content/docs/ui
- packages/lint/src
- scripts
- skills/objectstack-i18n
- evals
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
| 72 | + | |
72 | 73 | | |
73 | 74 | | |
74 | 75 | | |
| |||
82 | 83 | | |
83 | 84 | | |
84 | 85 | | |
85 | | - | |
| 86 | + | |
86 | 87 | | |
87 | 88 | | |
88 | 89 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
160 | 160 | | |
161 | 161 | | |
162 | 162 | | |
163 | | - | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
164 | 166 | | |
165 | 167 | | |
166 | 168 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
925 | 925 | | |
926 | 926 | | |
927 | 927 | | |
928 | | - | |
| 928 | + | |
| 929 | + | |
| 930 | + | |
| 931 | + | |
| 932 | + | |
| 933 | + | |
| 934 | + | |
| 935 | + | |
| 936 | + | |
929 | 937 | | |
930 | 938 | | |
931 | 939 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
159 | 159 | | |
160 | 160 | | |
161 | 161 | | |
162 | | - | |
| 162 | + | |
163 | 163 | | |
164 | 164 | | |
165 | 165 | | |
| |||
172 | 172 | | |
173 | 173 | | |
174 | 174 | | |
175 | | - | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
176 | 178 | | |
177 | 179 | | |
178 | 180 | | |
179 | 181 | | |
180 | | - | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
181 | 190 | | |
182 | 191 | | |
183 | 192 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
57 | | - | |
| 57 | + | |
58 | 58 | | |
59 | 59 | | |
60 | | - | |
| 60 | + | |
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
| |||
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
73 | 83 | | |
74 | 84 | | |
75 | 85 | | |
0 commit comments