Repository navigation
Commit 86ae2ca
fix(platform-objects): zh-CN metadata forms say 仪表盘 for dashboard (#30485)
<!-- claude-projects-attribution: {"github_login":"os-bill"} -->
_Requested by **Bill** · [project
thread](https://claude.ai/code/project/chan_016iMXWSZDzqWRWvWzdNo8wg?thread=cmsg_016iMXWSZDzqWRWvWzdNo8wgJQPdf6eHTz3X8GTdydYyJY)_
domain:server#6 · os-bill · session_01Utp6CXCS98uhsFQYk64epE
Fixes #30164
Clause-②: no
Metadata-protocol: none
Skills-docs: none (`git grep -n 仪表板 -- skills/` on the final tree: 0
hits)
## 维护者速读
- 改了什么:平台下发的中文仪表盘编辑表单里 6
处“仪表板”改为“仪表盘”(表单标题、基础信息说明、页眉及其显示标题/显示描述、组件的帮助文字)。
- 为什么改:控制台和 Studio 已统一叫“仪表盘”,只有平台下发的这张表单还叫“仪表板”,同一对象一个流程里两个名字。
- 风险与回滚:只改中文显示文字,不动任何键、结构或其他语言;回滚即还原这一个文件。
-
先看:`packages/platform-objects/src/apps/translations/zh-CN.metadata-forms.generated.ts`(6
行文字),再看新测试 `zh-cn-dashboard-word.test.ts`。
- 两分钟验证:`pnpm --filter @objectstack/platform-objects exec vitest run
src/metadata-translations/zh-cn-dashboard-word.test.ts`,预期 2 条通过。
- 需要你做的:无,席位落地。
## What changes
`zh-CN.metadata-forms.generated.ts` is the `os i18n extract` merge
baseline (`scripts/i18n-extract.config.ts` pins `metadataForms` to the
committed file, and `--merge` only fills gaps), and both its own header
and `metadata-translations/index.ts` say its leaves are edited in place.
So the six `dashboard` leaves were corrected there, then the bundle
regenerated: `pnpm i18n:extract` reproduces the committed tree byte for
byte (no diff after the run) and `pnpm check:i18n` is green. No other
source under `packages/` carries the zh-CN form text. The source-hash
tables are untouched: these leaves are translations, not source copies,
so the generated provenance table never recorded them.
## Tests
New
`packages/platform-objects/src/metadata-translations/zh-cn-dashboard-word.test.ts`
reads the SERVED bundle (`MetadataFormsTranslations['zh-CN']`, after
`withSourceFallback`, the bundle `rest-server.ts` localizes
`/api/v1/meta/types` forms with): the dashboard form title is 仪表盘, and
no served zh-CN metadata-form string contains 仪表板.
- Red on main's bundle: both tests fail, the second listing the six
strings.
- Green after the fix; ablation (one leaf put back via
`scripts/ablation-replace.mjs`): the class test goes red naming
仪表板标识与描述, restored to the HEAD blob with `git diff HEAD` empty.
- `pnpm --filter @objectstack/platform-objects test`: 112 files, 1523
tests passed. `typecheck` (includes `check:test-typecheck`): exit 0.
## Acceptance notes
- `packages/rest/src/meta-types-schema-titles.test.ts` and
`packages/runtime/src/domains/i18n-translations-served-groups.test.ts`
name 仪表板 only inside their own inline fixture bundles and assert the
fixture back; they do not read the platform bundle, so they were left as
they are.
- `packages/spec/src/marketplace/package-l10n.test.ts` and
`packages/spec/src/system/i18n-resolver.test.ts` likewise use their own
fixtures and do not pin served form text (out of this card's surface,
untouched).
## Verification
All local readings on head `df4de5fb` (after merging `origin/main`).
- `pnpm check:i18n`: exit 0, `check-i18n-bundles: OK (10 package(s) —
all bundles in sync, no undeclared authoring keys)`.
- `pnpm i18n:extract`: exit 0, 11 files written, `git status` clean
afterwards.
- `pnpm --filter @objectstack/platform-objects test`: exit 0 (112 files,
1523 tests). `typecheck`: exit 0.
- `pnpm lint`: exit 0.
- `dispatch-gates --commands`: 58 derived; `--ran` reconciliation: 58
accounted, 56 exit 0, 2 NOT MEASURED (exit 3, PREREQUISITE NOT MET):
- `node scripts/check-plugin-teardown-shape.mjs --self-test`: shallow
clone cannot reach its pinned positive-control commit (checker-health
only, judges no diff).
- `pnpm check:dual-build-cjs-loads`: needs every workspace package's
`dist/`; only the i18n build closure was built here. CI runs both.
<details><summary>Red on main, ablation</summary>
Red (main's bundle): `expected '仪表板' to be '仪表盘'`; offenders listed 仪表板,
仪表板标识与描述, 仪表板页眉配置(title、subtitle、actions), 在页眉中显示仪表板标题, 在页眉中显示仪表板描述,
包含位置和尺寸的仪表板组件. `Tests 2 failed (2)`.
Ablation: `ablation-replace: ok mutation landed: anchor 1 -> 0`, then `×
no served zh-CN metadata-form string carries the retired spelling 仪表板`,
`Tests 1 failed | 1 passed (2)`; `ablation-replace: ok restored: blob ==
HEAD (ab03233) and git diff HEAD is empty`.
</details>
---
_Generated by [Claude
Code](https://claude.ai/code/session_01Utp6CZNuVoLVGgYU36KdYe)_
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_01Utp6CZNuVoLVGgYU36KdYe
---------
Co-authored-by: Claude <noreply@anthropic.com>1 parent 75bbebb commit 86ae2ca
3 files changed
Lines changed: 48 additions & 6 deletions
File tree
- .changeset
- packages/platform-objects/src
- apps/translations
- metadata-translations
| 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 | |
|---|---|---|---|
| |||
1519 | 1519 | | |
1520 | 1520 | | |
1521 | 1521 | | |
1522 | | - | |
| 1522 | + | |
1523 | 1523 | | |
1524 | 1524 | | |
1525 | 1525 | | |
1526 | | - | |
| 1526 | + | |
1527 | 1527 | | |
1528 | 1528 | | |
1529 | 1529 | | |
| |||
1568 | 1568 | | |
1569 | 1569 | | |
1570 | 1570 | | |
1571 | | - | |
| 1571 | + | |
1572 | 1572 | | |
1573 | 1573 | | |
1574 | 1574 | | |
1575 | | - | |
| 1575 | + | |
1576 | 1576 | | |
1577 | 1577 | | |
1578 | 1578 | | |
1579 | | - | |
| 1579 | + | |
1580 | 1580 | | |
1581 | 1581 | | |
1582 | 1582 | | |
| |||
1596 | 1596 | | |
1597 | 1597 | | |
1598 | 1598 | | |
1599 | | - | |
| 1599 | + | |
1600 | 1600 | | |
1601 | 1601 | | |
1602 | 1602 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
0 commit comments