Skip to content

[客户体验] zh/en locale 语义一致性审计(键位/漂移/插值) #2099

Description

@DeliciousBuding

基线

  • master commit: 4b3f236b (2026-08-29)
  • 审计范围: app/web/src/i18n/locales/{en,zh}/*.json (7 对) + app/desktop/src/i18n/locales/{en,zh}.json (1 对)
  • 方法: 结构对比由脚本 /tmp/locale-audit.mjs 产出;语义抽查覆盖 auth/error/toast/session/thread/empty 高价值组

一、结构对比结果(全量,脚本支撑)

检查项 结果
单边缺键 0 — 所有文件 zh/en 键集合完全一致
空值/纯空白值 0
{{var}} 插值变量集合不一致 0

嵌套展开后真实键数:agentSquare=83, common=385, groupWorkspace=135, privateChats=85, project=112, status=43, workbench=115, desktop=2180。

结论:结构层面完全对齐,无需补键或修插值。


二、语义漂移与翻译质量抽查清单

🔴 A. "thread" 概念翻译严重不一致(跨模块+跨产品)

同一英文概念 "thread" 在 ZH 中有 4 种译法混用:

位置 键名 ZH 值 译法
desktop home.newThread 新建 Thread ❌ 未翻译
desktop home.noRecentThreads 暂无最近 Thread ❌ 未翻译
desktop home.recentThreads 最近 Thread ❌ 未翻译
desktop settings.dataCategory.threadState Thread 状态 ❌ 未翻译
desktop settings.taskRecentRunsDesc 跨项目和 Thread 的 Local Edge 运行记录。 ❌ 未翻译
desktop shortcut.mention.detail 选择 Agent、附件入口或 Thread 引用 ❌ 未翻译
desktop thread.create 新建会话 会话
desktop thread.empty 暂无会话 会话
desktop menu.file.newThread 新建对话 对话
desktop thread.emptyAction 新建对话 对话
desktop prompt.mention.threadDesc 插入可发送的线程引用:{{id}} 线程
web/common webShell.sidebar.threads 会话 会话
web/status thread.title 线程 线程
web/status thread.empty 还没有线程 线程
web/workbench leftRail.threads 线程 线程
web/workbench header.thread 线程 线程

建议:统一为「会话」(与 desktop thread.* 主群体一致),消除未翻译的 "Thread"。

🟡 B. toast.error 跨产品语义分歧

产品 EN ZH
web toast.error Copy failed 复制失败
desktop toast.error An error occurred 发生错误

同一键路径在两产品中含义完全不同。Web 的 toast.error 实际只用于复制失败场景,应改键名为 toast.copyFailed 或拆出通用错误键。

🟡 C. ZH 残留英文技术串

EN ZH 问题
web/privateChats error.description ...Mock conversations remain hidden. ...mock 会话会继续隐藏。 "mock" 未翻译
web/agentSquare source.errorDetail ...Showing the labeled catalog fallback. ...显示带明确标签的 catalog fallback。 "catalog fallback" 未翻译

Desktop 中 "Runtime"/"Edge"/"Run" 大量保留英文,部分属产品术语可接受;但 "Thread" 不属于已确立的品牌术语,应翻译。

🟢 D. 尾部标点不一致(低优先级)

EN ZH
auth.error.tokenDanceUnavailable TokenDance ID sign-in is temporarily unavailable**.** TokenDance ID 登录暂时不可用(无标点)

其余 error 消息中英文均带句号/句号等价物,此条例外。

🟢 E. 开发者语言泄漏到用户面(低优先级)

以下设置描述读起来像内部 baseline 注释而非面向用户的文案:

EN ZH
settings.onlineIm.description Desktop Online IM section baseline for Hub sessions, presence, and notifications. Desktop 在线 IM 设置基线,覆盖 Hub 会话、在线状态和通知。
settings.account.description Desktop Account section baseline for Hub session, TokenDance ID, and device proof. Desktop 账号设置基线,覆盖 Hub 会话、TokenDance ID 和设备证明。

翻译本身忠实,但源文案可能需要重写为用户友好的描述。


三、修复切片建议(≤3 条)

  1. 【P1】统一 "thread" 译法:全局搜索替换 ZH 中的 "Thread"(未翻译)、"线程" → "会话";确认 prompt.mention.threadDesc 等边缘键同步更新。预计影响 ~25 个键。
  2. 【P2】拆分 toast.error 语义:Web 端将 toast.error 改为 toast.copyFailed(或新增 toast.copyFailed 并废弃旧键);Desktop 保持 toast.error = 通用错误。
  3. 【P3】清理 ZH 残留英文技术串:将 "mock 会话" → "模拟会话","catalog fallback" → "目录兜底" 或等效中文表述;审查 Desktop 中非品牌术语的英文残留。

四、未发现问题的维度

  • 键位齐整性 ✅
  • {{var}} 插值一致性 ✅
  • auth/error 核心流程语义对齐 ✅(OIDC 系列、token exchange、login timeout 等均准确对应)
  • retry 译法一致性 ✅(全部为「重试」)

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Medium prioritysize-MMedium effort前端Web 工作台、IM 交互、前端状态和 UI

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions