Skip to content

Commit 4d8095b

Browse files
refactor(i18n, plugin-designer)!: retire the unread designer.versionHistory key (#29616)
domain:ui#5 · zhuangjianguo · session_01QsR2jQjvWkZ7is6GXbC6DB <!-- claude-projects-attribution: {"github_login":"zhuangjianguo"} --> _Requested by **Steedos** · [project thread](https://claude.ai/code/project/chan_018ETKaNwMZCNRYD7D8Q9Ubb?thread=cmsg_018ETKaNwMZCNRYD7D8Q9UbbNE8dPMmLJuNbseKNWAA5ER)_ Part of #25921. This batch retires the `designer.versionHistory` i18n key that #29529 (`389de4aa`) left with no reader when it deleted the `VersionHistory` module from `@object-ui/plugin-designer`. It runs under claim 6587895888. The umbrella stays open; nothing else it lists is touched. Clause-②: no (narrowing) Metadata-protocol: none ## 维护者速读 - 改了什么:从十个语言包(ar、de、en、es、fr、ja、ko、pt、ru、zh)和设计器导出的英文兜底表 `DESIGNER_DEFAULT_TRANSLATIONS` 里删除 `designer.versionHistory` 这一条文案,共 11 行。 - 为什么改:#29529 已删除设计器的“版本历史”面板,这条文案从此没有任何界面读取,留着只会让翻译人员继续维护它,也让死键检查一直报它。 - 风险与回滚:界面不变,因为没有页面显示这条文案。对外只影响 TypeScript:导出的 `TranslationKeys` 类型少了这个键,外部若引用会编译报错;导出的兜底表读这一行会得到 undefined。changeset 为两个包写明了删掉引用即可。回滚即 revert 本 PR。 - 先看:`ui/packages/i18n/src/locales/en.ts`(类型来源)、`ui/packages/plugin-designer/src/hooks/useDesignerTranslation.ts`、`.changeset/25921-designer-version-history-key.md`。 - 两分钟验证:`git grep -n "designer.versionHistory" -- ui ':!**/CHANGELOG.md'`,预期无输出(退出码 1)。 - 需要你做的:无,席位落地(入队前欠一次契约复审档复审,由席位转总监)。 ## What changes - `ui/packages/i18n/src/locales/{ar,de,en,es,fr,ja,ko,pt,ru,zh}.ts`: the `versionHistory` entry under `designer` is deleted (one line each). `designer.undo`, `designer.redo` and `designer.canvasMinimap` stay. - `ui/packages/plugin-designer/src/hooks/useDesignerTranslation.ts`: the `'designer.versionHistory'` row leaves `DESIGNER_DEFAULT_TRANSLATIONS`. The map is exported from the package entry (`src/index.tsx`) and app-shell's mirror gate imports it, so a read of that row now yields `undefined`; the map's type is unchanged. - `.changeset/25921-designer-version-history-key.md`: `@object-ui/i18n` and `@object-ui/plugin-designer` patch, BREAKING (TypeScript only for i18n; the plugin-designer sentence names the exported map's lost row and #29529 as the predecessor), with the ADR-0087 marker `not-required (runtime-interface-only ui/packages/i18n/src/locales/en.ts#TranslationKeys)` beside a `| Removed key | Replacement |` table whose replacement is "none". ## Tests No test file changes. Neither i18n pin moves: `dead-key-batch-retired-4730.test.ts` does not list the key in its SURVIVING list, and the de value "Versionsverlauf" carries no quote pair, so the `de-quote-pairing-3876.test.ts` census is unchanged. ## Acceptance notes - **No reader remains.** On `origin/main` `50e35a28`, `git grep -n versionHistory -- ui ':!**/CHANGELOG.md'` found the 11 definitions above plus `ui/packages/types/src/designer.ts:1416` (`CollaborationConfig.versionHistory?: boolean`, a different symbol, not an i18n key). There is no `t('designer.versionHistory')`, no `designer.` template composition that could produce it (the only `designer.` template is `designer.object.reqPerms.op.OP` in `ObjectDefaultInspector.tsx`), and no test pin. After this PR the same grep returns only the `types` line. - **`CollaborationConfig.versionHistory`** (`ui/packages/types/src/designer.ts:1416`) has no reader either. It is a dead declared field, out of scope here and not filed (zero-pull, carrier: none). - **Seat 3's pending changeset** `.changeset/25921-plugin-designer-dead-collaboration-version-history.md` (from #29529, not yet released) says the key "stays in the locale packs for now, with no reader". Once this lands, that sentence is outdated. It is outside this PR's declared file surface, so it is left as is for the seat to decide. ## Verification Diff readings on head `1a4bf460`, tree `objectstack-ai/objectstack`. <details><summary>Dead-key report, suites, type-check, reverse check</summary> - `node scripts/check-i18n-dead-keys.mjs` (from `ui/`): `origin/main` 4120 pack keys, 318 candidates, `designer.versionHistory` listed as needs-review; this head 4119 pack keys, 317 candidates, key absent. Exit 0 both. - Prereq: `pnpm turbo run build --filter=@object-ui/app-shell^...` : 64/64 tasks, exit 0. - `pnpm --filter @object-ui/i18n test`: 95 files, 1443 passed, 13 skipped, exit 0. - `pnpm --filter @object-ui/plugin-designer test`: 49 files, 456 passed, exit 0. - `vitest run packages/app-shell/src/__tests__/defaults-maps-mirror-en-pack.test.tsx`: 15 passed, exit 0. - `type-check`: `@object-ui/i18n` exit 0, `@object-ui/plugin-designer` exit 0, `@object-ui/app-shell` exit 0, `turbo run type-check --filter=@object-ui/console` 71/71 tasks, exit 0. - Reverse check: a temporary `app-shell/src/__probe.ts` reading `TranslationKeys['designer']['versionHistory']` gives `TS2339: Property 'versionHistory' does not exist on type '{ readonly undo: "Undo"; readonly redo: "Redo"; readonly canvasMinimap: "Canvas minimap"; }'`; the control line reading `canvasMinimap` compiles. Probe deleted. </details> <details><summary>Derived gates and dogfood battery</summary> - `node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack` at `1a4bf460`: 28 commands, every one exit 0 (incl. `check-adr-0087-registration`, `check-changeset-no-major`, `check-empty-changeset`, `check-closing-keyword-parity`, `check-sdui-manifest` and their `--self-test`s, `check:published-files`, `check:nul-bytes`, `vitest run scripts/` in `ui/` 170 passed, 2 skipped files). `--ran`: 28 derived, 28 run, 0 NOT-MEASURED. `check-partof-closing-keyword` on this body: exit 0. - Dogfood battery on `8ad4e199` (closure `@objectstack/dogfood^...` built, 68/68 tasks): VERDICT command-exit 0, Test Files 398 passed, 3 skipped (401), Tests 3280 passed, 28 skipped (3308), no failures. - Head `9502086d` (contract-review fix: plugin-designer added to the changeset) touches only the changeset; `check-adr-0087-registration`, `check-changeset-no-major` and `check-empty-changeset` re-ran there, all exit 0. - Head `d3c179cd` only merges four `origin/main` commits outside this diff (lint, runtime, spec permission). The derived list is unchanged; the changeset, ADR-0087, closing-keyword, sdui-manifest and nul-byte gates re-ran there, all exit 0. </details> --- _Generated by [Claude Code](https://claude.ai/code/session_01QsR2jRTYHhqj3r6SiMnrkT)_ --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent 45b4922 commit 4d8095b

12 files changed

Lines changed: 23 additions & 11 deletions

File tree

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
'@object-ui/i18n': patch
3+
'@object-ui/plugin-designer': patch
4+
---
5+
6+
refactor(i18n, plugin-designer)!: the designer's version-history label leaves every pack
7+
8+
Clause-②: no (narrowing)
9+
Metadata-protocol: none
10+
11+
<!-- adr-0087: not-required (runtime-interface-only ui/packages/i18n/src/locales/en.ts#TranslationKeys) the key type of the console's own translation catalogue: no Zod schema, no spec declaration and no stored metadata reads it, so the compiler is the channel that reaches every caller -->
12+
13+
`@object-ui/plugin-designer` no longer ships a version-history panel (retired by #29529), so nothing reads `designer.versionHistory` any more. The key now leaves all ten packs (ar, de, en, es, fr, ja, ko, pt, ru, zh) and the designer's English fallback map.
14+
15+
**BREAKING** (`@object-ui/i18n`, TypeScript only): the exported `TranslationKeys` (`typeof en`) loses `designer.versionHistory`. A `t()` call that names it still compiles, since its key is a `string`, and reads the key back. Nothing replaces it; the fix is to delete the reference.
16+
17+
`@object-ui/plugin-designer`: the exported `DESIGNER_DEFAULT_TRANSLATIONS` map loses its `designer.versionHistory` row, so a read of that row now yields `undefined`; the map's type (`Record<string, string>`) is unchanged.
18+
19+
| Removed key | Replacement |
20+
|:---|:---|
21+
| `designer.versionHistory` | none: the version-history panel is retired |
22+
23+
The other `designer.*` keys (`undo`, `redo`, `canvasMinimap`) are unchanged.

‎ui/packages/i18n/src/locales/ar.ts‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1256,7 +1256,6 @@ const ar = {
12561256
undo: "تراجع",
12571257
redo: "إعادة",
12581258
canvasMinimap: "الخريطة المصغرة للوحة",
1259-
versionHistory: "سجل الإصدارات",
12601259
},
12611260
detail: {
12621261
editInlineHint: "انقر نقرًا مزدوجًا للتحرير",

‎ui/packages/i18n/src/locales/de.ts‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1135,7 +1135,6 @@ const de = {
11351135
undo: "Rückgängig",
11361136
redo: "Wiederholen",
11371137
canvasMinimap: "Minikarte der Arbeitsfläche",
1138-
versionHistory: "Versionsverlauf",
11391138
},
11401139
detail: {
11411140
editInlineHint: "Zum Bearbeiten doppelklicken",

‎ui/packages/i18n/src/locales/en.ts‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1861,7 +1861,6 @@ const en = {
18611861
undo: 'Undo',
18621862
redo: 'Redo',
18631863
canvasMinimap: 'Canvas minimap',
1864-
versionHistory: 'Version history',
18651864
},
18661865
dashboard: {
18671866
total: 'Total',

‎ui/packages/i18n/src/locales/es.ts‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1168,7 +1168,6 @@ const es = {
11681168
undo: "Deshacer",
11691169
redo: "Rehacer",
11701170
canvasMinimap: "Minimapa del lienzo",
1171-
versionHistory: "Historial de versiones",
11721171
},
11731172
detail: {
11741173
editInlineHint: "Haga doble clic para editar",

‎ui/packages/i18n/src/locales/fr.ts‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1163,7 +1163,6 @@ const fr = {
11631163
undo: "Annuler",
11641164
redo: "Rétablir",
11651165
canvasMinimap: "Mini-carte du canevas",
1166-
versionHistory: "Historique des versions",
11671166
},
11681167
detail: {
11691168
editInlineHint: "Double-cliquez pour modifier",

‎ui/packages/i18n/src/locales/ja.ts‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1135,7 +1135,6 @@ const ja = {
11351135
undo: "元に戻す",
11361136
redo: "やり直す",
11371137
canvasMinimap: "キャンバスのミニマップ",
1138-
versionHistory: "バージョン履歴",
11391138
},
11401139
detail: {
11411140
editInlineHint: "ダブルクリックで編集",

‎ui/packages/i18n/src/locales/ko.ts‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1135,7 +1135,6 @@ const ko = {
11351135
undo: "실행 취소",
11361136
redo: "다시 실행",
11371137
canvasMinimap: "캔버스 미니맵",
1138-
versionHistory: "버전 기록",
11391138
},
11401139
detail: {
11411140
editInlineHint: "더블클릭하여 편집",

‎ui/packages/i18n/src/locales/pt.ts‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1163,7 +1163,6 @@ const pt = {
11631163
undo: "Desfazer",
11641164
redo: "Refazer",
11651165
canvasMinimap: "Minimapa da tela",
1166-
versionHistory: "Histórico de versões",
11671166
},
11681167
detail: {
11691168
editInlineHint: "Clique duas vezes para editar",

‎ui/packages/i18n/src/locales/ru.ts‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1197,7 +1197,6 @@ const ru = {
11971197
undo: "Отменить",
11981198
redo: "Повторить",
11991199
canvasMinimap: "Миникарта холста",
1200-
versionHistory: "История версий",
12011200
},
12021201
detail: {
12031202
editInlineHint: "Дважды щёлкните для редактирования",

0 commit comments

Comments
 (0)