From d2426bd4ed35209feb4bbff8b76fb3b604928722 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 5 Nov 2026 12:35:18 +0000 Subject: [PATCH 1/2] =?UTF-8?q?fix(platform-objects):=20zh-CN=20metadata?= =?UTF-8?q?=20forms=20say=20=E4=BB=AA=E8=A1=A8=E7=9B=98=20for=20dashboard?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The served zh-CN dashboard authoring form still said 仪表板 on six leaves while the Console and Studio say 仪表盘. The generated bundle is the extract's merge baseline, so the leaves are corrected in place and the bundle regenerated; a test reads the served bundle. Co-Authored-By: Claude Claude-Session: https://claude.ai/code/session_01Utp6CZNuVoLVGgYU36KdYe --- .../zh-CN.metadata-forms.generated.ts | 12 +++---- .../zh-cn-dashboard-word.test.ts | 32 +++++++++++++++++++ 2 files changed, 38 insertions(+), 6 deletions(-) create mode 100644 packages/platform-objects/src/metadata-translations/zh-cn-dashboard-word.test.ts diff --git a/packages/platform-objects/src/apps/translations/zh-CN.metadata-forms.generated.ts b/packages/platform-objects/src/apps/translations/zh-CN.metadata-forms.generated.ts index 1af56185ef5..ab03233a6fe 100644 --- a/packages/platform-objects/src/apps/translations/zh-CN.metadata-forms.generated.ts +++ b/packages/platform-objects/src/apps/translations/zh-CN.metadata-forms.generated.ts @@ -1519,11 +1519,11 @@ export const zhCNMetadataForms: NonNullable = } }, dashboard: { - label: "仪表板", + label: "仪表盘", sections: { basics: { label: "基础信息", - description: "仪表板标识与描述" + description: "仪表盘标识与描述" }, layout: { label: "布局", @@ -1568,15 +1568,15 @@ export const zhCNMetadataForms: NonNullable = }, header: { label: "页眉", - helpText: "仪表板页眉配置(title、subtitle、actions)" + helpText: "仪表盘页眉配置(title、subtitle、actions)" }, "header.showTitle": { label: "显示标题", - helpText: "在页眉中显示仪表板标题" + helpText: "在页眉中显示仪表盘标题" }, "header.showDescription": { label: "显示描述", - helpText: "在页眉中显示仪表板描述" + helpText: "在页眉中显示仪表盘描述" }, "header.actions": { label: "操作按钮", @@ -1596,7 +1596,7 @@ export const zhCNMetadataForms: NonNullable = }, widgets: { label: "组件", - helpText: "包含位置和尺寸的仪表板组件" + helpText: "包含位置和尺寸的仪表盘组件" }, "widgets.id": { label: "组件 ID" diff --git a/packages/platform-objects/src/metadata-translations/zh-cn-dashboard-word.test.ts b/packages/platform-objects/src/metadata-translations/zh-cn-dashboard-word.test.ts new file mode 100644 index 00000000000..a2bd9329746 --- /dev/null +++ b/packages/platform-objects/src/metadata-translations/zh-cn-dashboard-word.test.ts @@ -0,0 +1,32 @@ +// Copyright (c) 2026 ObjectStack. Licensed under the Apache-2.0 license. +// +// zh-CN names a dashboard 仪表盘 everywhere (#30039 item 4): the Console and +// Studio already say it, so the metadata forms the platform serves must too. +// This reads the SERVED bundle (`MetadataFormsTranslations`, the one +// `/api/v1/meta/types` localizes forms with, after `withSourceFallback`), not +// the generated file alone, so a stale-source fallback cannot hide the word. + +import { describe, it, expect } from 'vitest'; +import { MetadataFormsTranslations } from './index.js'; + +/** Every string leaf under `node`, with its dotted path. */ +function leaves(node: unknown, path = ''): Array<[string, string]> { + if (typeof node === 'string') return [[path, node]]; + if (!node || typeof node !== 'object') return []; + return Object.entries(node as Record).flatMap(([k, v]) => + leaves(v, path ? `${path}.${k}` : k), + ); +} + +describe('#30164 — served zh-CN metadata forms say 仪表盘 for dashboard', () => { + const served = MetadataFormsTranslations['zh-CN']?.metadataForms as Record; + + it('the dashboard form title reads 仪表盘', () => { + expect(served?.dashboard?.label).toBe('仪表盘'); + }); + + it('no served zh-CN metadata-form string carries the retired spelling 仪表板', () => { + const offenders = leaves(served).filter(([, text]) => text.includes('仪表板')); + expect(offenders).toEqual([]); + }); +}); From df4de5fbd8875cd71ef1f613fc9242a01fe9eb70 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 5 Nov 2026 12:43:28 +0000 Subject: [PATCH 2/2] chore(changeset): platform-objects patch for the zh-CN dashboard word Co-Authored-By: Claude Claude-Session: https://claude.ai/code/session_01Utp6CZNuVoLVGgYU36KdYe --- .changeset/30164-zh-cn-dashboard-word.md | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 .changeset/30164-zh-cn-dashboard-word.md diff --git a/.changeset/30164-zh-cn-dashboard-word.md b/.changeset/30164-zh-cn-dashboard-word.md new file mode 100644 index 00000000000..f06325194be --- /dev/null +++ b/.changeset/30164-zh-cn-dashboard-word.md @@ -0,0 +1,10 @@ +--- +'@objectstack/platform-objects': patch +--- + +fix(platform-objects): zh-CN metadata forms say 仪表盘 for dashboard (#30164) + +Clause-②: no +Metadata-protocol: none + +The zh-CN dashboard authoring form the platform serves (`MetadataFormsTranslations`, which `/api/v1/meta/types` localizes forms with) still said 仪表板 on six strings: the form title, the basics section description, and the help text of the header, show-title, show-description and widgets fields. The Console and Studio say 仪表盘, so one object carried two names in one flow of work. All six now say 仪表盘. The generated bundle is the extract's merge baseline, so its leaves were corrected in place and the bundle regenerated (`pnpm i18n:extract` reproduces it byte for byte; `pnpm check:i18n` is green). en, ja-JP and es-ES are unchanged.