Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions docs/tasks/T-1200/T-1267-zh-auto-wording/brief.md
Original file line number Diff line number Diff line change
@@ -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。
- 英文界面不变。
3 changes: 3 additions & 0 deletions scripts/public-scan/allow-domains.txt
Original file line number Diff line number Diff line change
Expand Up @@ -74,3 +74,6 @@ update.error.network # 文案键名,不是域名。
email.security # 文案键名,不是域名。
homeLine.local # 文案键名,不是域名。
keys.boat.link # 文案键名,不是域名。
botAccess.cloud # 文案键名前缀,不是域名。
botOverview.preference.auto # 文案键名,不是域名。
place.auto # 文案键名,不是域名。
9 changes: 9 additions & 0 deletions src/locales/everyday-words.test.ts
Original file line number Diff line number Diff line change
@@ -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<string, string>;

Expand Down Expand Up @@ -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))
Expand Down
10 changes: 5 additions & 5 deletions src/locales/zh.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": "这个智能体当前的模型无法使用已连接的应用。",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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": "私有桌面",
Expand Down
Loading