From 98d5b51f83180a85a7d4b25d329f928d28f878bf Mon Sep 17 00:00:00 2001 From: tangzhixiong613-jpg <340458552+tangzhixiong613-jpg@users.noreply.github.com> Date: Mon, 16 Nov 2026 00:18:41 +0000 Subject: [PATCH] =?UTF-8?q?T-1267=20=E4=B8=AD=E6=96=87=E7=95=8C=E9=9D=A2?= =?UTF-8?q?=EF=BC=9A=E5=B7=A5=E4=BD=9C=E4=BD=8D=E7=BD=AE=E3=80=8CAuto?= =?UTF-8?q?=E3=80=8D=E6=94=B9=E4=B8=BA=E3=80=8C=E8=87=AA=E5=8A=A8=E6=A8=A1?= =?UTF-8?q?=E5=BC=8F=E3=80=8D=E5=B9=B6=E8=A1=A5=E6=96=87=E6=A1=88=E6=B5=8B?= =?UTF-8?q?=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 5.5 --- .../T-1200/T-1267-zh-auto-wording/brief.md | 26 +++++++++++++++++++ scripts/public-scan/allow-domains.txt | 3 +++ src/locales/everyday-words.test.ts | 9 +++++++ src/locales/zh.json | 10 +++---- 4 files changed, 43 insertions(+), 5 deletions(-) create mode 100644 docs/tasks/T-1200/T-1267-zh-auto-wording/brief.md diff --git a/docs/tasks/T-1200/T-1267-zh-auto-wording/brief.md b/docs/tasks/T-1200/T-1267-zh-auto-wording/brief.md new file mode 100644 index 00000000..62a221be --- /dev/null +++ b/docs/tasks/T-1200/T-1267-zh-auto-wording/brief.md @@ -0,0 +1,26 @@ +## 运行环境(云沙箱,必读) +- 开工先在 worktree 根目录运行 依赖准备脚本(镜像自带,把预装依赖链进 node_modules),之后 `pnpm exec tsc` 才可用。 +- 这里没有 systemd、Docker,`systemd-run --scope ... --` 前缀一律去掉直接运行;一次只跑一个测试文件。 +- 报告只写三样:改了什么(文件列表与 git status 一致)、为什么、测试命令与结果摘要。 +- 不提交 git。 +- 本仓库是公开仓库:代码、注释、报告里不得出现内部域名、IP、邮箱、人名、真实钥匙、沙箱主目录绝对路径。 + +# T-1267:中文界面里工作位置「Auto」没翻译 + +## 现象 +智能体设置 →「访问」区,云端那块的标题显示「Auto 云端偏好。」,说明里也写「Auto 在任务中……」。中文界面里工作位置的「自动」模式已统一叫「自动」(见 `src/locales/zh.json` 的 `place.auto`「自动」、`place.view.auto.short`「自动为你选择」),这里却残留英文 Auto。 + +## 要改的(只改中文文案) +`src/locales/zh.json` 里指工作位置「自动」模式的 Auto 全部改成中文,与 `place.auto` 口径一致,读起来通顺: +- `botAccess.cloud.autoTitle`:「Auto 云端偏好。」→ 例如「自动模式的云端偏好。」 +- `botAccess.cloud.autoDescription`、`botAccess.cloud.startVpsDescription`、`botAccess.cloud.vpsAutoDescription`、`botOverview.preference.auto` 里的 Auto 同理改成「自动模式」/「自动」。 +- 顺带检查 `botAccess.cloud.*` 与 `botOverview.preference.*` 这两组 zh 文案里有没有别的未翻译英文普通词,一并改。产品名和专有名词保持原样:Cry Bot、Cloud(指 Cry Bot Cloud 产品时)、VPS、、Linux、Android、Starter/Team 方案名。 +- 不改 en.json,不改键名,不改代码逻辑。若仓库有中文文案相关的测试或哈希文件(如 `src/locales/source-hashes.json`、`src/locales/*.test.ts`)要求同步,按现有规矩同步。iOS 端若有同一键的中文文案,按仓库已有做法同步。 + +## 测试(沉淀进仓库) +- 在 `src/locales/` 现有的文案测试里(参照 `everyday-words.test.ts` 一类的写法)补一条:zh.json 中 `botAccess.cloud.*`、`botOverview.preference.*` 的值不含独立单词 `Auto`。 +- 跑改动相关的测试文件和 `pnpm exec tsc`,报告写结果摘要。 + +## 验收 +- 中文界面打开智能体设置「访问」区,云端偏好标题和说明不再出现英文 Auto。 +- 英文界面不变。 diff --git a/scripts/public-scan/allow-domains.txt b/scripts/public-scan/allow-domains.txt index 155d9b5a..47683bf4 100644 --- a/scripts/public-scan/allow-domains.txt +++ b/scripts/public-scan/allow-domains.txt @@ -74,3 +74,6 @@ update.error.network # 文案键名,不是域名。 email.security # 文案键名,不是域名。 homeLine.local # 文案键名,不是域名。 keys.boat.link # 文案键名,不是域名。 +botAccess.cloud # 文案键名前缀,不是域名。 +botOverview.preference.auto # 文案键名,不是域名。 +place.auto # 文案键名,不是域名。 diff --git a/src/locales/everyday-words.test.ts b/src/locales/everyday-words.test.ts index 28d6d1e7..8630d44e 100644 --- a/src/locales/everyday-words.test.ts +++ b/src/locales/everyday-words.test.ts @@ -1,6 +1,7 @@ import { describe, expect, it } from "vitest"; import en from "./en.json"; +import zh from "./zh.json"; const english = en as Record; @@ -103,6 +104,14 @@ const wordsIn = (text: string, words: readonly Word[] = INTERNAL_WORDS) => words.filter(({ pattern }) => pattern.test(prose(text))).map(({ word, say }) => `"${word}" (say ${say})`); describe("everyday screens", () => { + it("uses Chinese for Auto mode in cloud access and work location preferences", () => { + const offending = Object.entries(zh) + .filter(([key]) => key.startsWith("botAccess.cloud.") || key.startsWith("botOverview.preference.")) + .filter(([, text]) => /\bAuto\b/.test(text)) + .map(([key, text]) => `${key}: ${text}`); + expect(offending).toEqual([]); + }); + it("say what a person knows instead of the app's internal words", () => { const offending = Object.entries(english) .filter(([key]) => everyday(key) && !Object.hasOwn(ALLOWED, key)) diff --git a/src/locales/zh.json b/src/locales/zh.json index 07b09247..6e3a2b4f 100644 --- a/src/locales/zh.json +++ b/src/locales/zh.json @@ -6431,10 +6431,10 @@ "botAccess.folder.save": "保存", "botAccess.folder.pinned": "新任务将在这里开始。当前任务固定在 {path}。新建任务即可使用新文件夹。", "botAccess.folder.home": "主文件夹", - "botAccess.cloud.autoTitle": "Auto 云端偏好。", - "botAccess.cloud.autoDescription": "这决定 Auto 在任务中可复用哪些资源;仅查看设置不会创建或唤醒电脑。", + "botAccess.cloud.autoTitle": "自动模式的云端偏好。", + "botAccess.cloud.autoDescription": "这决定自动模式在任务中可复用哪些资源;仅查看设置不会创建或唤醒电脑。", "botAccess.cloud.startVps": "自动启动 VPS", - "botAccess.cloud.startVpsDescription": "允许 Auto 在需要时创建或唤醒这个智能体的托管容器。", + "botAccess.cloud.startVpsDescription": "允许自动模式在需要时创建或唤醒这个智能体的托管容器。", "botAccess.apps.title": "已连接的应用", "botAccess.apps.connectInSettings": "请先在应用设置中连接应用,再授予这个智能体访问权限。", "botAccess.apps.modelUnsupported": "这个智能体当前的模型无法使用已连接的应用。", @@ -6497,7 +6497,7 @@ "botAccess.cloud.backend": "云端后端", "botAccess.cloud.vpsDescription": "你自己的服务器,通过 SSH 连接。", "botAccess.cloud.hostedDescription": "由 InstaBox 托管的电脑。", - "botAccess.cloud.vpsAutoDescription": "Auto 会复用你 VPS 上正在运行的桌面。打开「自动启动 VPS」可让 Auto 创建或唤醒它,也可以直接选择 Cloud。可以从电脑面板安全地打开实时桌面。", + "botAccess.cloud.vpsAutoDescription": "自动模式会复用你 VPS 上正在运行的桌面。打开「自动启动 VPS」可让自动模式创建或唤醒它,也可以直接选择「云端桌面」。可以从电脑面板安全地打开实时桌面。", "botAccess.cloud.hostedBackendDescription": "InstaBox 是默认的托管电脑。选择自托管 VPS 可改用你在 SSH 中配置的 Linux Docker 主机。", "botAccess.cloud.selfHostedVps": "自托管 VPS", "botAccess.cloud.boat": "InstaBox", @@ -6683,7 +6683,7 @@ "botOverview.line.talksToOne": "可以与另一个智能体交谈。", "botOverview.line.talksToChosen": "只与为它选定的智能体交谈。", "botOverview.line.alsoInCharge": "另外负责这些部门:{departments}。", - "botOverview.preference.auto": "Auto;任务开始时检查可用性", + "botOverview.preference.auto": "自动模式;任务开始时检查可用性", "botOverview.preference.cloud": "云端桌面", "botOverview.preference.cloud.locked": "已配置的服务器", "botOverview.preference.vm": "私有桌面",