Skip to content
This repository was archived by the owner on Nov 4, 2026. It is now read-only.
This repository was archived by the owner on Nov 4, 2026. It is now read-only.

系统设置多页面未国际化 (Setup / 系统设置 i18n 缺口) #2851

Closed

Description

@baozhoutao

问题

在中文(zh)环境下打开「系统设置 / Setup」,多个页面出现英文未翻译文案,中英混排。用户截图涵盖:Installed Apps、Cloud Connection、Connect an Agent、Settings(设置总览 Hub)、认证(Auth)设置、功能开关、Datasources、审批相关空态等。

排查后发现根因分三类,横跨 objectui(console) 与 framework:


A. framework — 内置设置翻译包过时/缺项(解析器已就绪,只差译文)

console 的 apps/console/src/pages/settings/SettingsView.tsx + useSettingsLabel.ts 已经按约定解析 settings.<namespace>.keys.<key>.label/help 等;mail/branding 等能正常显示中文,说明管线是通的。缺的是 framework packages/services/service-settings/src/translations/{zh-CN,ja-JP,es-ES}.ts 未跟上 manifest 新增字段。

已核实 auth 缺口(对应「认证」页那批英文):

  • 缺分组:anti_abuse、multi_factor、network
  • 缺字段(约 15 个):password_reject_breached、password_require_complexity、password_min_classes、password_history_count、password_expiry_days、lockout_threshold、lockout_duration_minutes、rate_limit_max、rate_limit_window_seconds、mfa_required、mfa_grace_period_days、session_idle_timeout_minutes、session_absolute_max_hours、max_concurrent_sessions_per_user、allowed_ip_ranges(含各自 help)

待办:对 所有 namespace(ai / knowledge / storage / sms / localization / company / feature_flags / auth …)× 所有 locale 做一次 manifest↔译文 parity 审计,补齐缺口。可加脚本/测试防回归。

B. objectui(console) — 设置总览 Hub 与部分页面硬编码英文

apps/console/src/pages/settings/SettingsHub.tsx 未接 i18n:

  • L52 标题 Settings、L53 副标题 Configure your workspace, integrations, and feature flags. 硬编码
  • L82 分类小标题直接渲染 {category}(manifest 的英文 category:Workspace/Communication/Security/Infrastructure/Beta),无翻译
  • L98 卡片标题走 resolveLabel(m.label)(只取 defaultValue,非 i18n);L100 卡片描述 m.description 原样
  • L75 / L96(Beta) / L105 {n} setting(s) 等文案硬编码

apps/console/src/pages/settings/types.ts 的 resolveLabel 只回退到 defaultValue,未查 i18n。

其它 console 页面:

  • apps/console/src/pages/.../DatasourceResourcePage.tsx(数据源):"Datasources / Connect external databases… / No datasources yet…" 硬编码
  • 需复核各 SDUI widget(InstalledListWidget / CloudConnectionPanel / ConnectAgentWidget)正文,部分已 i18n。

C. framework — 自定义 Page 的 page:header 无 i18n 机制(需设计)

以下页面标题/副标题写死在 metadata 的 page:header 组件 properties 里,当前 i18n-resolver 无 pages/组件级解析(packages/spec/src/system/translation.zod.ts 有 pages 命名空间但无解析器落地):

  • packages/cloud-connection/src/marketplace-ui.ts — Installed Apps
  • packages/cloud-connection/src/cloud-connection-ui.ts — Cloud Connection
  • packages/mcp/src/connect-ui.ts — Connect an Agent

需决策:给 page:header(或 pages 命名空间)补一条翻译解析链路,或由 console 侧本地化已知系统页。


已在 framework main 修复、仅 console 过时(截图偏旧)

审批空态(sys_approval_request / sys_approval_action)与 feature_flags 各 key 的 zh 译文在 framework main 已存在(plugin-approvals 生成包、service-settings zh-CN),screenshot 的英文是旧 console 构建所致,随 console 重建即修复,不重复改。

方案 / 拆分

平台仓库:不往仓库塞截图/测试报告等杂物;验证走各仓库正式测试/CI。

Activity

  1. self-assigned this
    on Jul 27, 2026
  2. os-zhuang commented on Jul 27, 2026

    @os-zhuang
    Contributor

    补充:P3(objectstack#3589 自定义系统页 page:header i18n)已完成并合并 —— objectstack#3648(framework 通用解析)+ objectui#2865(CloudConnectionPanel 正文)+ objectstack#3679(drift 守卫测试)。

    做 P3 时顺带把最后一条未勾选项「复核其余 SDUI widget 正文 i18n 覆盖」做了一次全仓库排查,结论比本 issue 记录的严重,已拆成三个独立 issue 跟踪:

    Issue 内容 优先级
    #2870 RemediationOverlay 密码过期/强制 MFA 全屏拦截层未国际化,12 条硬编码英文 + AuthPageLayout 2 条 P0 — 可用性阻断
    #2871 14 个文件手搓 startsWith('zh') 判断绕开语言包,其余 8 语硬回退英文且无法翻译 P1
    #2872 语言包 key 缺口:8 语各缺 357–359 键、74 键只在 zh.ts、4 个 en 键 zh 缺失,且无 parity 测试 P1/P2(部分需决策)

    两点需要更正本 issue 的原始记录:

    1. 本 issue B 节写「需复核各 SDUI widget(InstalledListWidget / CloudConnectionPanel / ConnectAgentWidget)正文,部分已 i18n」——实测 InstalledListWidget 与 ConnectAgentWidget 是全的(10 语),CloudConnectionPanel 一处 i18n 都没有,10 个语言包里也没有 cloudConnection 命名空间。已在 objectui#2865 修复。
    2. 排查中发现的最严重问题(P0: 密码过期 / 强制 MFA 全屏拦截层未国际化,非英语用户无法通过 (RemediationOverlay) #2870)不在 SDUI widget 里,而是 console shell 的全屏拦截层——用户密码过期后只能读英文才能继续,没有绕过路径。这已超出「系统设置页面中英混排」的范畴。

    Generated by Claude Code

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