Skip to content

自定义系统页 page:header 未国际化 (Installed Apps / Cloud Connection / Connect an Agent) #3589

Description

@baozhoutao

问题

若干「自定义系统页」的标题/副标题直接写死在 metadata 的 page:header 组件 properties.title / properties.subtitle 里,在非英文 locale 下始终显示英文。当前 i18n-resolver 没有 page / 组件级解析链路:packages/spec/src/system/translation.zod.ts 已有 pages 命名空间({ title, description } keyed by page name),但没有任何 resolver 把它应用到 page metadata,console 也原样渲染 page:header 的 properties。

对应设置导航里的这几个页(截图均为中英混排):

页面 来源 写死文案
Installed Apps packages/cloud-connection/src/marketplace-ui.ts title Installed Apps / subtitle Marketplace packages currently installed into this runtime's kernel.
Cloud Connection packages/cloud-connection/src/cloud-connection-ui.ts title Cloud Connection + 一大段 subtitle
Connect an Agent packages/mcp/src/connect-ui.ts title Connect an Agent + 一大段 subtitle

注:这些页的左侧导航项 label 已走 app 翻译包(apps.setup.navigation.*)正常中文化;缺的是页内 page:header 的 title/subtitle。页正文 widget(InstalledListWidget / CloudConnectionPanel / ConnectAgentWidget)大多已 i18n。

方案(待设计)

page:header(或 pages 命名空间)补一条翻译解析链路,二选一或结合:

  • A. framework 通用解析:在 i18n-resolver 落地 pages / page:header 的 title/subtitle 解析(按 page name 或组件),补三页对应译文。通用,插件页也能受益;需动 spec/resolver + console 渲染,测试面较大。
  • B. console 本地化已知页:console 对这几个已知系统 page name 做定点翻译映射。快、风险低;不通用。

关联

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions