Consider it done. The open-source AI agent that works out of the box · 想到,就能做到。开源、开箱即用的 AI Agent。
TypeScript agentai-agentai-assistantandroidclaude-codecodexelectroniosllmmacosreact-nativetypescriptwindows
feat(i18n): 建立术语表体系,统一 19 个产品术语
Dash2080c69f53f8
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.ymlindex f894013e4a..052ffc94a3 100644--- a/.github/workflows/ci.yml+++ b/.github/workflows/ci.yml@@ -70,6 +70,17 @@ jobs:- name: Check endpoint literalsrun: pnpm check:endpoints+ # i18n 三道静态门禁:key 结构一致性、品牌名收口、术语表一致性。+ # 都是纯文件扫描、秒级返回,放在耗时的 typecheck / 单测之前快速失败。+ - name: Check i18n key consistency+ run: pnpm check:i18n++ - name: Check brand terminology+ run: pnpm check:brand-terminology++ - name: Check i18n glossary+ run: pnpm check:i18n-glossary+- name: Typecheck desktoprun: pnpm --filter desktop typecheckdiff --git a/AGENTS.md b/AGENTS.mdindex 40e818d798..c8623849a1 100644--- a/AGENTS.md+++ b/AGENTS.md@@ -41,6 +41,10 @@- 新增或修改任何界面、组件、布局、样式、动效或 UI 文案前,必须先读权威设计规范`docs/design-rules/DESIGN.md`;设计文档索引见`docs/design-rules/cindy-design-system.md`。+- 新增或修改任何 UI 文案里的**产品术语**前,必须先查术语表 `i18n/GLOSSARY.md`:已裁决+ 的术语照用,不自造译法;表里没有或拿不准的,在 `i18n/glossary.json` 加+ `status: "proposed"` 条目再讨论。门禁为 `pnpm check:i18n-glossary`,规则见+ `docs/dev-rules/engineering-conventions.md` §5.1。- 所有新增或修改的 UI 必须同时完成 Light 与 Dark 两种模式;只实现或只验证一种模式,视为未完成。具体实现与验收要求以 `docs/design-rules/DESIGN.md` 的双模式交付门槛为准。diff --git a/apps/desktop/src/renderer/__tests__/automationGeneratedSessions.test.ts b/apps/desktop/src/renderer/__tests__/automationGeneratedSessions.test.tsindex a11d69fd9a..f3ba09c8e0 100644--- a/apps/desktop/src/renderer/__tests__/automationGeneratedSessions.test.ts+++ b/apps/desktop/src/renderer/__tests__/automationGeneratedSessions.test.ts@@ -959,11 +959,11 @@ describe('automation-generated sessions', () => {expect(runHistoryCardSource).toContain("run.costAttribution === 'legacy'");expect(zh.scheduler.cell.totalCost).toBe('开销 {{cost}}');expect(zh.scheduler.cell.totalValue).toBe('价值 {{value}}');- expect(zh.scheduler.runs.sessionCost).toBe('会话开销 {{cost}}');- expect(zh.scheduler.runs.sessionValue).toBe('会话价值 {{value}}');+ expect(zh.scheduler.runs.sessionCost).toBe('对话开销 {{cost}}');+ expect(zh.scheduler.runs.sessionValue).toBe('对话价值 {{value}}');expect(zh.scheduler.runs.runCost).toBe('本次开销 {{cost}}');expect(zh.scheduler.runs.legacyCostUnavailable).toBe('历史费用无法拆分');- expect(zh.scheduler.runs.persistentSessionGroup).toBe('持续会话 {{session}} · {{count}} 次运行');+ expect(zh.scheduler.runs.persistentSessionGroup).toBe('持续对话 {{session}} · {{count}} 次运行');expect(zh.scheduler.runs.expandRemainingRuns).toBe('展开另外 {{count}} 次');});diff --git a/apps/desktop/src/renderer/__tests__/builtinToolsCollabDescriptionI18n.test.ts b/apps/desktop/src/renderer/__tests__/builtinToolsCollabDescriptionI18n.test.tsindex 88eda21188..cdccd5b6a3 100644--- a/apps/desktop/src/renderer/__tests__/builtinToolsCollabDescriptionI18n.test.ts+++ b/apps/desktop/src/renderer/__tests__/builtinToolsCollabDescriptionI18n.test.ts@@ -4,7 +4,7 @@ import { resolve } from 'node:path';import { describe, expect, it } from 'vitest';const expectedDescriptions = {- 'zh-CN': '关闭后仅影响后续新建的会话,不会中止当前 Worker;用于多 Worker 团队编排',+ 'zh-CN': '关闭后仅影响后续新建的对话,不会中止当前 Worker;用于多 Worker 团队编排',en: 'Turning it off only affects newly created sessions and does not stop active workers; supports multi-worker team orchestration',ja: 'オフにしても今後作成するセッションにのみ反映され、現在の Worker は停止しません。マルチ Worker のチーム編成に使用します',ko: '끄면 이후 새로 만드는 세션에만 적용되며 현재 Worker는 중지되지 않습니다. 멀티 Worker 팀 편성에 사용합니다',diff --git a/apps/desktop/src/renderer/i18n/locales/ja/common.json b/apps/desktop/src/renderer/i18n/locales/ja/common.jsonindex 16987cf528..3316e7b3d7 100644--- a/apps/desktop/src/renderer/i18n/locales/ja/common.json+++ b/apps/desktop/src/renderer/i18n/locales/ja/common.json@@ -2018,7 +2018,7 @@"prefs": {"agentLabel": "Agent","modelLabel": "モデル",- "effortLabel": "思考強度",+ "effortLabel": "推論強度","permissionLabel": "権限モード","providerSlack": "Slack","providerTelegram": "Telegram",@@ -5705,7 +5705,7 @@"modelListAria": "モデル一覧","modelSelectorAria": "モデルセレクター","categoryListAria": "{{category}} モデル",- "effortListAria": "Effort レベル"+ "effortListAria": "推論強度"}},"toast": {@@ -6609,7 +6609,7 @@"workingDirPlaceholder": "右のボタンでディレクトリを選択","selectButton": "選択…","modelLabel": "モデル:",- "effortLabel": "強度:",+ "effortLabel": "推論強度:","permissionLabel": "権限:","warningHint": "⚠ マークのモード(ask/default/plan/acceptEdits)はステージ 1 で UI 承認ポップアップ未接続、実験ページの hook はツール呼び出しを自動 deny します — 実テストには auto / bypassPermissions のみ推奨。","createSession": "セッションを作成",@@ -6750,7 +6750,7 @@"agentLabel": "Agent","modelLabel": "モデル","noAvailableModels": "利用可能な {{agent}} モデルがありません。設定でプロバイダーの接続と認証情報を確認してください。",- "effortLabel": "Effort",+ "effortLabel": "推論強度","initialTaskLabel": "初期タスク","optional": "(任意)","initialTaskPlaceholder": "この Worker に渡す任意の最初のタスク",diff --git a/apps/desktop/src/renderer/i18n/locales/ko/common.json b/apps/desktop/src/renderer/i18n/locales/ko/common.jsonindex e5292f91d8..e2d2a4a96f 100644--- a/apps/desktop/src/renderer/i18n/locales/ko/common.json+++ b/apps/desktop/src/renderer/i18n/locales/ko/common.json@@ -2018,7 +2018,7 @@"prefs": {"agentLabel": "Agent","modelLabel": "모델",- "effortLabel": "사고 강도",+ "effortLabel": "추론 강도","permissionLabel": "권한 모드","providerSlack": "Slack","providerTelegram": "Telegram",@@ -5705,7 +5705,7 @@"modelListAria": "모델 목록","modelSelectorAria": "모델 선택기","categoryListAria": "{{category}} 모델",- "effortListAria": "Effort 레벨"+ "effortListAria": "추론 강도"}},"toast": {@@ -6609,7 +6609,7 @@"workingDirPlaceholder": "오른쪽 버튼으로 디렉토리 선택","selectButton": "선택…","modelLabel": "모델:",- "effortLabel": "강도:",+ "effortLabel": "추론 강도:","permissionLabel": "권한:","warningHint": "⚠ 표시된 모드 (ask/default/plan/acceptEdits) 는 1단계에서 UI 승인 팝업이 연결되지 않았으며, 실험 페이지 hook 이 자동으로 도구 호출을 deny 합니다 — 실제 테스트에는 auto / bypassPermissions 만 권장됩니다.","createSession": "세션 만들기",@@ -6750,7 +6750,7 @@"agentLabel": "Agent","modelLabel": "모델","noAvailableModels": "사용 가능한 {{agent}} 모델이 없습니다. 설정에서 공급자 연결과 자격 증명을 확인하세요.",- "effortLabel": "Effort",+ "effortLabel": "추론 강도","initialTaskLabel": "초기 작업","optional": "(선택)","initialTaskPlaceholder": "이 Worker 에게 보낼 선택적 첫 작업",diff --git a/apps/mobile/src/__tests__/newSession.test.ts b/apps/mobile/src/__tests__/newSession.test.tsindex ba556b95b1..ec2430206f 100644--- a/apps/mobile/src/__tests__/newSession.test.ts+++ b/apps/mobile/src/__tests__/newSession.test.ts@@ -546,7 +546,7 @@ describe('new session model', () => {model: 'claude-sonnet-4-6',}, 'Carol Mac')).toMatchObject({title: '准备创建并发送',- subtitle: '确认后会在被控电脑创建会话,并把首条消息加入队列。',+ subtitle: '确认后会在被控电脑创建对话,并把首条消息加入队列。',details: ['电脑: Carol Mac','位置: 对话工作区',diff --git a/apps/mobile/src/__tests__/sessionMenu.test.ts b/apps/mobile/src/__tests__/sessionMenu.test.tsindex cf2f29fa5c..3e0818b0a3 100644--- a/apps/mobile/src/__tests__/sessionMenu.test.ts+++ b/apps/mobile/src/__tests__/sessionMenu.test.ts@@ -53,7 +53,7 @@ describe('sessionMenu header', () => {it('falls back to workspace name when the session has no title', () => {expect(buildSessionMenuHeader(session({ title: '' }), {}).title).toBe('xdt-maker');- expect(buildSessionMenuHeader(session({ title: '', workingDir: null }), {}).title).toBe('远程会话');+ expect(buildSessionMenuHeader(session({ title: '', workingDir: null }), {}).title).toBe('远程对话');});it('prefers the worktree name in the meta line', () => {diff --git a/apps/mobile/src/__tests__/sessionTailBannerModel.test.ts b/apps/mobile/src/__tests__/sessionTailBannerModel.test.tsindex 16cef97f99..c3e11ed6fa 100644--- a/apps/mobile/src/__tests__/sessionTailBannerModel.test.ts+++ b/apps/mobile/src/__tests__/sessionTailBannerModel.test.ts@@ -88,7 +88,7 @@ describe('resolveSessionTailBanner — error-tail', () => {})],}));expect(stale).toMatchObject({ kind: 'error-tail', retryable: false });- expect((stale as { text: string }).text).toContain('新建会话');+ expect((stale as { text: string }).text).toContain('新建对话');const encrypted = resolveSessionTailBanner(baseInput({messages: [errorRow('e2', '2026-01-01T00:00:02.000Z', {diff --git a/apps/mobile/src/i18n/locales/zh-CN/composer.json b/apps/mobile/src/i18n/locales/zh-CN/composer.jsonindex f4b7b8c67a..8c777ed062 100644--- a/apps/mobile/src/i18n/locales/zh-CN/composer.json+++ b/apps/mobile/src/i18n/locales/zh-CN/composer.json@@ -32,7 +32,7 @@"mediaFetchCancelled": "远程媒体取件已取消","fileMenu": {"openBrowser": "打开文件浏览器",- "sendToSession": "发送到会话",+ "sendToSession": "发送到对话","copyPath": "复制路径","quickPreview": "快速预览","revealInBrowser": "在文件浏览器中查看",@@ -81,7 +81,7 @@"refineStreamFailed": "语音润色流式返回失败。","refineNoContent": "语音润色没有返回有效内容。","refineInvalidJson": "语音润色返回了无效 JSON: {{snippet}}",- "invalidSession": "语音服务返回了无效会话。",+ "invalidSession": "语音服务返回了无效对话。","managedRefineUnsupported": "当前 {{appName}} 语音服务暂不支持托管润色。","sessionNotConnected": "语音识别会话尚未连接。","loginRequired": "请先登录 {{appName}} 后再使用语音输入。",@@ -95,7 +95,7 @@"volcengineMissingResourceId": "Volcengine ASR 配置缺少 resourceId。","sessionExpiredOrForbidden": "{{appName}} 语音会话已失效或没有权限(WebSocket {{status}})。请确认登录状态后重试。","incomplete": "语音输入未完成,请重试。",- "missingRefinerTargetProvider": "手机版语音润色需要 {{appName}} 语音会话(缺少 refinerTargetProvider)。",+ "missingRefinerTargetProvider": "手机版语音润色需要 {{appName}} 语音对话(缺少 refinerTargetProvider)。","emptyTranscript": "检测到语音但未识别出文本,请重试。","micPermission": "麦克风权限未开启,请在系统设置里允许 {{appName}} 使用麦克风。","realtimeAudioUnavailable": "当前安装包不支持实时语音输入,请安装包含原生录音模块的测试版。"diff --git a/apps/mobile/src/i18n/locales/zh-CN/devices.json b/apps/mobile/src/i18n/locales/zh-CN/devices.jsonindex 1fa286d9eb..f6a74404bb 100644--- a/apps/mobile/src/i18n/locales/zh-CN/devices.json+++ b/apps/mobile/src/i18n/locales/zh-CN/devices.json@@ -19,7 +19,7 @@"disconnected": "连接断开"},"error": {- "sessionDeviceNotFound": "找不到这个会话所属电脑,请重新同步后再试。",+ "sessionDeviceNotFound": "找不到这个对话所属电脑,请重新同步后再试。","taskDeviceNotFound": "找不到这个任务所属电脑,请重新同步后再试。","noDevice": "没有可用电脑。请先打开桌面端远程控制,然后重新同步。"},@@ -38,9 +38,9 @@"newRemoteConversation": "新建远程对话","renameDevice": "重命名 {{label}}","project": "项目 {{title}}",- "openAutomationLatest": "打开自动化任务 {{title}} 的最新会话",+ "openAutomationLatest": "打开自动化任务 {{title}} 的最新对话","automationTask": "自动化任务 {{title}}",- "openConversation": "打开会话 {{title}}",+ "openConversation": "打开对话 {{title}}","collapse": "收起 {{title}}","expand": "展开 {{title}}","taskError": "任务出错",@@ -86,7 +86,7 @@"automation": "自动化","archived": "归档","all": "全部",- "a11y": "筛选{{label}}会话"+ "a11y": "筛选{{label}}对话"},"group": {"project": "项目",@@ -98,15 +98,15 @@"active": "活动","waiting": "待处理","automation": "自动化",- "activeA11y": "筛选活动会话",- "waitingA11y": "筛选待处理会话",- "automationA11y": "筛选自动化会话"+ "activeA11y": "筛选活动对话",+ "waitingA11y": "筛选待处理对话",+ "automationA11y": "筛选自动化对话"},"plan": "计划","automationsButtonA11y": "打开远程自动化","search": {- "openA11y": "搜索远程会话",- "closeA11y": "关闭搜索远程会话",+ "openA11y": "搜索远程对话",+ "closeA11y": "关闭搜索远程对话","label": "搜索","placeholder": "搜索标题、项目、模型、消息","clearA11y": "清除搜索",@@ -115,15 +115,15 @@"close": "关闭"},"filters": {- "collapseA11y": "收起会话筛选",- "expandA11y": "展开会话筛选",+ "collapseA11y": "收起对话筛选",+ "expandA11y": "展开对话筛选","label": "筛选"},"selection": {- "count": "已选择 {{count}} 个会话",+ "count": "已选择 {{count}} 个对话","canAct": "可执行操作","cannotAct": "没有可执行操作",- "clearA11y": "取消选择会话"+ "clearA11y": "取消选择对话"},"bulk": {"pinning": "置顶中",@@ -131,24 +131,24 @@"archiving": "归档中","restoring": "恢复中","deleting": "删除中",- "pinA11y": "批量置顶选中会话",- "unpinA11y": "批量取消置顶选中会话",- "archiveA11y": "批量归档选中会话",- "restoreA11y": "批量恢复选中会话",- "deleteA11y": "批量删除选中会话",+ "pinA11y": "批量置顶选中对话",+ "unpinA11y": "批量取消置顶选中对话",+ "archiveA11y": "批量归档选中对话",+ "restoreA11y": "批量恢复选中对话",+ "deleteA11y": "批量删除选中对话","cancelA11y": "取消批量操作","partialFailure": "已处理 {{done}} 个,{{failed}} 个失败(已还原,可重试)。",- "noArchivable": "当前选择里没有可归档的活跃会话。",- "noPinnable": "当前选择里没有可置顶的活跃会话。",- "noRestorable": "当前选择里没有可恢复的归档会话。",- "noUnpinnable": "当前选择里没有已置顶的会话。",- "noDeletable": "当前选择里没有可删除的会话。",- "noneModifiable": "当前选择的会话都不能修改。"+ "noArchivable": "当前选择里没有可归档的活跃对话。",+ "noPinnable": "当前选择里没有可置顶的活跃对话。",+ "noRestorable": "当前选择里没有可恢复的归档对话。",+ "noUnpinnable": "当前选择里没有已置顶的对话。",+ "noDeletable": "当前选择里没有可删除的对话。",+ "noneModifiable": "当前选择的对话都不能修改。"},"automationScope": {"eyebrow": "自动化任务","title": "自动化任务",- "emptyCopy": "任务运行后,每次运行的会话都会出现在这里。",+ "emptyCopy": "任务运行后,每次运行的对话都会出现在这里。","emptyTitle": "这个任务还没有运行记录"},"projectScope": {@@ -157,12 +157,12 @@"emptyTitle": "这个项目还没有对话"},"subtitle": {- "deviceActive": "{{deviceName}} · {{count}} 个活动会话",- "activeAndProjects": "{{count}} 个活动会话 · {{projects}} 个项目"+ "deviceActive": "{{deviceName}} · {{count}} 个活动对话",+ "activeAndProjects": "{{count}} 个活动对话 · {{projects}} 个项目"},"row": {- "a11yAutomationGroup": "自动化会话组 {{title}}",- "a11ySession": "会话 {{title}}",+ "a11yAutomationGroup": "自动化对话组 {{title}}",+ "a11ySession": "对话 {{title}}","a11yCollapse": "收起 {{title}}","a11yExpand": "展开 {{title}}","collapse": "收起",@@ -171,20 +171,20 @@"badge": {"waiting": "待处理 {{count}}","automationPrefix": "自动化",- "sessionCount": "{{count}} 个会话",+ "sessionCount": "{{count}} 个对话","aggregate": "聚合","running": "执行中","unread": "未读 {{count}}"},"child": {- "openA11y": "打开自动化会话 {{title}}"+ "openA11y": "打开自动化对话 {{title}}"},"viewAllRuns": "查看全部 {{count}} 次运行"},"automations": {"error": {"projectMissingConfig": "项目自动化缺少 projectConfigId,请在桌面端删除",- "deletePartial": "自动化已删除,但 {{count}} 个生成会话未能更新状态。请在桌面端检查这些会话。"+ "deletePartial": "自动化已删除,但 {{count}} 个生成对话未能更新状态。请在桌面端检查这些对话。"},"subtitle": "{{active}} 个运行中 · {{total}} 个任务","metric": {@@ -193,8 +193,8 @@"executing": "执行中"},"summary": {- "paused": "{{count}} 个任务已暂停。选择任务后可以运行、暂停、编辑或打开最近会话。",- "default": "选择任务后可以运行、暂停、编辑或打开最近会话。"+ "paused": "{{count}} 个任务已暂停。选择任务后可以运行、暂停、编辑或打开最近对话。",+ "default": "选择任务后可以运行、暂停、编辑或打开最近对话。"},"empty": {"copy": "可以直接从手机创建第一条自动化任务,或在桌面端创建后同步到这里。",@@ -212,16 +212,16 @@"edit": "编辑自动化"},"sessionMode": {- "bound": "绑定已有会话后,目录、worktree、Agent 和 Fast 模式跟随该会话。",- "persistent": "首次触发会创建持续会话,后续触发继续接在同一会话里。",- "fresh": "每次触发都会创建新的会话。"+ "bound": "绑定已有对话后,目录、worktree、Agent 和 Fast 模式跟随该对话。",+ "persistent": "首次触发会创建持续对话,后续触发继续接在同一对话里。",+ "fresh": "每次触发都会创建新的对话。"},"field": {"name": "名称","prompt": "提示词","trigger": "触发方式",- "runSession": "运行会话",- "boundSession": "绑定会话",+ "runSession": "运行对话",+ "boundSession": "绑定对话","intervalMinutes": "间隔分钟","workspace": "工作区","projectDir": "项目目录",@@ -237,18 +237,18 @@"manual": "手动"},"session": {- "fresh": "新会话",+ "fresh": "新对话","persistent": "持续","bound": "绑定"},- "boundSessionA11y": "绑定会话 {{name}}",+ "boundSessionA11y": "绑定对话 {{name}}","intervalPlaceholder": "留空则使用 cron","workspace": {"project": "项目","dialogue": "对话"},"useWorktree": "使用 worktree",- "modelPlaceholderBound": "跟随会话",+ "modelPlaceholderBound": "跟随对话","fastMode": "Fast 模式","notifyDesktop": "桌面通知","notifyFeishu": "飞书通知",@@ -257,19 +257,19 @@"cancelA11y": "取消编辑自动化"},"delete": {- "counting": "正在统计由这条自动化生成的会话...",- "confirmDeleteBoth": "删除任务和会话",- "confirmArchive": "删除任务并归档会话",+ "counting": "正在统计由这条自动化生成的对话...",+ "confirmDeleteBoth": "删除任务和对话",+ "confirmArchive": "删除任务并归档对话","confirmTaskOnly": "只删除任务","title": "删除 {{name}}",- "copy": "删除自动化任务不会中断已经开始的执行。生成过的会话按下面的选项处理,和桌面端保持一致。",- "optionsA11y": "选择生成会话处理方式",- "keepDesc": "只删除这条自动化任务,历史会话继续保留在原列表里。",- "keepLabel": "保留生成会话",- "archiveDesc": "删除任务后,把由它生成的会话移到归档,后续仍可搜索。",- "archiveLabel": "归档生成会话",- "deleteDesc": "删除任务后,把由它生成的会话也标记为删除。这个操作不可从手机端撤销。",- "deleteLabel": "删除生成会话",+ "copy": "删除自动化任务不会中断已经开始的执行。生成过的对话按下面的选项处理,和桌面端保持一致。",+ "optionsA11y": "选择生成对话处理方式",+ "keepDesc": "只删除这条自动化任务,历史对话继续保留在原列表里。",+ "keepLabel": "保留生成对话",+ "archiveDesc": "删除任务后,把由它生成的对话移到归档,后续仍可搜索。",+ "archiveLabel": "归档生成对话",+ "deleteDesc": "删除任务后,把由它生成的对话也标记为删除。这个操作不可从手机端撤销。",+ "deleteLabel": "删除生成对话","cancelA11y": "取消删除自动化","confirmA11y": "确认删除自动化"},@@ -284,7 +284,7 @@},"runDelete": {"title": "删除这条执行记录",- "copy": "只会删除这条自动化执行记录,不会删除它打开过的会话,也不会影响后续自动触发。",+ "copy": "只会删除这条自动化执行记录,不会删除它打开过的对话,也不会影响后续自动触发。","confirmA11y": "确认删除执行记录","confirm": "删除记录","cancelA11y": "取消删除执行记录"@@ -313,9 +313,9 @@"edit": "编辑"},"run": {- "openSessionA11y": "打开自动化会话",+ "openSessionA11y": "打开自动化对话","opening": "打开中",- "session": "会话",+ "session": "对话","restartA11y": "重新执行自动化","restarting": "重跑中","restart": "重跑",diff --git a/apps/mobile/src/i18n/locales/zh-CN/files.json b/apps/mobile/src/i18n/locales/zh-CN/files.jsonindex 8886cac1fb..11aaec1034 100644--- a/apps/mobile/src/i18n/locales/zh-CN/files.json+++ b/apps/mobile/src/i18n/locales/zh-CN/files.json@@ -5,10 +5,10 @@"footerOnline": "已连接 · 实时同步","footerConnecting": "连接中…","folderEmpty": "文件夹为空。",- "noWorkdir": "该会话没有工作目录,无法浏览文件。",+ "noWorkdir": "该对话没有工作目录,无法浏览文件。","rootDir": "(根目录)","copyPath": "复制路径",- "sendToSession": "发送到会话",+ "sendToSession": "发送到对话","exportShare": "导出 / 分享","preview": "快速预览","copiedPath": "已复制路径",@@ -50,7 +50,7 @@"done": "完成","a11yShare": "导出分享","copyPath": "复制路径",- "sendToSession": "发送到会话",+ "sendToSession": "发送到对话","copiedPath": "已复制路径","exporting": "正在从电脑导出…","downloadFailed": "下载失败",diff --git a/apps/mobile/src/i18n/locales/zh-CN/interaction.json b/apps/mobile/src/i18n/locales/zh-CN/interaction.jsonindex cc5e03c19e..5a6a262705 100644--- a/apps/mobile/src/i18n/locales/zh-CN/interaction.json+++ b/apps/mobile/src/i18n/locales/zh-CN/interaction.json@@ -13,9 +13,9 @@"kind": "权限确认","deny": "拒绝","denyAccessibility": "拒绝权限请求",- "alwaysAllow": "本会话总是允许",- "alwaysAllowAccessibility": "本会话总是允许权限请求",- "alwaysAllowConfirm": "确认本会话允许",+ "alwaysAllow": "本对话总是允许",+ "alwaysAllowAccessibility": "本对话总是允许权限请求",+ "alwaysAllowConfirm": "确认本对话允许","allowOnce": "允许一次","allowOnceAccessibility": "允许一次权限请求","allowOnceConfirm": "确认允许一次",diff --git a/apps/mobile/src/i18n/locales/zh-CN/message.json b/apps/mobile/src/i18n/locales/zh-CN/message.jsonindex 4b511d24a7..e97b1ed9fa 100644--- a/apps/mobile/src/i18n/locales/zh-CN/message.json+++ b/apps/mobile/src/i18n/locales/zh-CN/message.json@@ -54,10 +54,10 @@"subagentSummary": "子 agent 小结","agentSwitchLabel": "已从 {{from}} 切换到 {{to}}","agentSwitchViewHandoff": "{{label}},查看交接内容",- "sessionResumedPill": "已续接原会话",+ "sessionResumedPill": "已续接原对话","handoffContentDesc": "交接内容——切换时发送给新引擎的上下文摘要(不会出现在你的消息里)","openDiagramDetail": "打开图表详情",- "sessionChipFallback": "会话 {{id}}",+ "sessionChipFallback": "对话 {{id}}","imageFallbackTitle": "图片","mermaidExportFailedTitle": "导出失败","mermaidRenderIncompleteBody": "图表尚未渲染完成或导出出错,请稍后重试。",@@ -171,7 +171,7 @@"goalResumed": "用量已恢复,继续目标","autoResume": "连接中断,已自动继续","modelLabel": "模型",- "sessionLabel": "会话",+ "sessionLabel": "对话","sessionResumed": "已续接","agentSwitch": "已从 {{from}} 切换到 {{to}}","learnStarted": "技能学习已启动",diff --git a/apps/mobile/src/i18n/locales/zh-CN/models.json b/apps/mobile/src/i18n/locales/zh-CN/models.jsonindex 047486650e..8e279996a8 100644--- a/apps/mobile/src/i18n/locales/zh-CN/models.json+++ b/apps/mobile/src/i18n/locales/zh-CN/models.json@@ -29,7 +29,7 @@"agentSwitch": {"browseAccessibility": "浏览 {{agent}} 模型","confirmTitle": "切换到 {{agent}}?",- "confirmMessage": "下一条消息发送时,{{appName}} 会把当前会话交接给 {{agent}}。两个 Agent 对上下文和工具的理解可能不同,请确认后再选择目标模型。",+ "confirmMessage": "下一条消息发送时,{{appName}} 会把当前对话交接给 {{agent}}。两个 Agent 对上下文和工具的理解可能不同,请确认后再选择目标模型。","cancel": "取消","confirm": "继续选择"}diff --git a/apps/mobile/src/i18n/locales/zh-CN/session.json b/apps/mobile/src/i18n/locales/zh-CN/session.jsonindex cc7475efb0..37758f6e3e 100644--- a/apps/mobile/src/i18n/locales/zh-CN/session.json+++ b/apps/mobile/src/i18n/locales/zh-CN/session.json@@ -25,12 +25,12 @@"capabilitiesUnsupported": "远程能力返回格式不支持"},"screen": {- "composerSyncing": "正在同步会话数据,同步完成后即可发送。",- "composerCreating": "会话创建中,首条消息发出后即可继续发送。",+ "composerSyncing": "正在同步对话数据,同步完成后即可发送。",+ "composerCreating": "对话创建中,首条消息发出后即可继续发送。","nextAgentSwitch": "下条切到 {{agent}} · {{model}}",- "createFailedTitle": "会话创建失败",- "createFailedDefault": "会话创建失败。",- "createFailedNotice": "会话创建失败:{{message}}",+ "createFailedTitle": "对话创建失败",+ "createFailedDefault": "对话创建失败。",+ "createFailedNotice": "对话创建失败:{{message}}","backToEdit": "返回编辑","retry": "重试","firstMessageNotSent": "首条消息没有发出,内容已还原到输入框。",@@ -44,17 +44,17 @@"voiceStopAndSend": "结束语音输入并发送","sendMessage": "发送远程消息","voiceStartInput": "开始语音输入",- "stopSession": "停止远程会话",- "sessionNotFoundResync": "未找到当前远程会话,请重新同步后再发送。",- "missingWorkingDir": "当前会话缺少工作目录,不能发送消息。",+ "stopSession": "停止远程对话",+ "sessionNotFoundResync": "未找到当前远程对话,请重新同步后再发送。",+ "missingWorkingDir": "当前对话缺少工作目录,不能发送消息。","queueMessageGone": "这条排队消息已不在队列里,修改未保存。","editQueueUnsupported": "电脑端版本过旧,还不支持安全修改排队引用、附件或清空文本。请升级电脑端,或仅修改普通文字。",- "sessionNotSyncedRetry": "会话尚未同步完成,请稍后再试。",+ "sessionNotSyncedRetry": "对话尚未同步完成,请稍后再试。","savingPreviousQueueEdit": "正在保存上一条排队消息的修改,完成后再编辑。","attachmentsUploadingBeforeEdit": "还有附件正在上传,等上传完成后再编辑排队消息。",- "goalAlreadyActive": "该会话已有进行中的目标,请先在此处理它。",+ "goalAlreadyActive": "该对话已有进行中的目标,请先在此处理它。","resetReconfirmTitle": "请重新确认",- "resetOfferExpired": "重置凭证已过期,请确认刷新后的额度信息。",+ "resetOfferExpired": "重置凭证已过期,请确认刷新后的配额信息。","resetOutcomeReset": "Codex 用量窗口已重置。","resetOutcomeNothing": "当前没有需要重置的用量窗口。","resetOutcomeNoCredit": "当前没有可用的重置次数。",@@ -63,7 +63,7 @@"resetResultTitle": "重置结果","resetFailedTitle": "重置失败","operationFailed": "操作失败",- "sessionDeviceNotFound": "未找到这个会话所属的电脑,请确认对应设备已连接后重试。",+ "sessionDeviceNotFound": "未找到这个对话所属的电脑,请确认对应设备已连接后重试。","deleteMessageTitle": "删除本条对话?","deleteMessageBody": "用户消息只删除本条;AI 消息会删除上一次用户输入之后产生的整轮输出。之后的对话继续保留。下次发送时,AI 上下文会从剩余记录重建。","deleteMessageAction": "删除本条对话",@@ -73,21 +73,21 @@"discardQueueEdit": "放弃编辑排队消息","savingHint": "正在保存修改,完成后再操作。","composerPlaceholder": "输入远程消息",- "openSessionMenu": "打开会话菜单",- "searchTitle": "搜索当前会话",- "searchPlaceholder": "搜索当前会话消息",+ "openSessionMenu": "打开对话菜单",+ "searchTitle": "搜索当前对话",+ "searchPlaceholder": "搜索当前对话消息","searchEnterKeyword": "输入关键词","searchNoMatch": "没有匹配的消息","searchPrevious": "上一条搜索结果","searchNext": "下一条搜索结果",- "syncingSession": "正在同步会话",- "awaitingSync": "等待会话同步",- "resync": "重新同步远程会话",+ "syncingSession": "正在同步对话",+ "awaitingSync": "等待对话同步",+ "resync": "重新同步远程对话","collapseHistory": "收起历史消息","expandHistory": "查看历史消息","readOnlyMode": "只读模式","accessRevokedShort": "访问已撤销",- "sessionNotSynced": "会话未同步",+ "sessionNotSynced": "对话未同步","conversationFallback": "对话","accessRevoked": "访问权限已被被控电脑撤销","syncing": "正在同步",@@ -102,18 +102,18 @@"selectProject": "选择项目","composerPlaceholder": "今天我们做点什么呢~","voiceSelectDeviceFirst": "请选择电脑后再使用语音输入。",- "creatingSession": "正在创建会话",- "createAndSend": "创建会话并发送首条消息",+ "creatingSession": "正在创建对话",+ "createAndSend": "创建对话并发送首条消息","modelAccessibility": "模型:{{model}}","voiceInput": "语音输入","selectDeviceError": "请选择电脑。","enterProjectPath": "请输入电脑端项目路径。","enterModel": "请输入模型。","enterFirstMessageOrAttachment": "请输入首条消息或添加附件。",- "noSessionIdReturned": "被控端没有返回新会话 id。",- "sessionIdNotAdopted": "被控端未采用预生成会话 id(电脑端版本异常),请更新电脑端后重试。",- "firstMessageMissingConfirm": "首条消息没有发出,内容已还原到输入框;发送前请确认会话里没有这条消息。",- "firstMessageUnconfirmed": "首条消息发送状态未确认,内容已还原到输入框,请先确认会话里是否已有这条消息再发送。",+ "noSessionIdReturned": "被控端没有返回新对话 id。",+ "sessionIdNotAdopted": "被控端未采用预生成对话 id(电脑端版本异常),请更新电脑端后重试。",+ "firstMessageMissingConfirm": "首条消息没有发出,内容已还原到输入框;发送前请确认对话里没有这条消息。",+ "firstMessageUnconfirmed": "首条消息发送状态未确认,内容已还原到输入框,请先确认对话里是否已有这条消息再发送。","selectControlledDevice": "选择被控电脑","selectDeviceNamed": "选择电脑 {{name}}","selectAgent": "选择 Agent",@@ -149,20 +149,20 @@"previewAttachments": "附件: {{num}} 个","previewReadyTitle": "准备创建并发送","previewNotReadyTitle": "还不能创建",- "previewReadySubtitle": "确认后会在被控电脑创建会话,并把首条消息加入队列。"+ "previewReadySubtitle": "确认后会在被控电脑创建对话,并把首条消息加入队列。"},"menu": {"chipPinned": "已置顶","chipArchived": "已归档","chipReadOnly": "只读",- "titleFallback": "远程会话",+ "titleFallback": "远程对话","renameAction": "重命名对话","copyLinkAction": "复制对话链接","unpin": "取消置顶","pin": "置顶","restore": "恢复","archive": "归档",- "deleteAction": "删除会话",+ "deleteAction": "删除对话","deleteConversation": "删除对话","workingDir": "工作目录","aiRenameUnsupported": "被控电脑版本过旧,暂不支持自动起名。",@@ -171,28 +171,28 @@"contextUsageSummary": "上下文 {{percent}}%","copied": "已复制","copyFailed": "复制失败",- "deleteConfirmTitle": "删除会话?",+ "deleteConfirmTitle": "删除对话?","deleteConfirmBody": "删除后不可恢复。","dirAlreadyAdded": "这个目录已经在列表里。","resetCodexTitle": "重置 Codex 用量?",- "resetCodexBody": "将为 {{account}} 消耗 1 次重置。额度窗口会立即重开,此操作不能撤销。",+ "resetCodexBody": "将为 {{account}} 消耗 1 次重置。配额窗口会立即重开,此操作不能撤销。","currentCodexAccount": "当前 Codex 账号","resetConsumeOnce": "消耗 1 次重置",- "titlePlaceholder": "会话标题",+ "titlePlaceholder": "对话标题","aiRenameLabel": "AI 自动起名",- "viewUsageDetail": "查看会话用量详情",+ "viewUsageDetail": "查看对话用量详情","linkCopied": "链接已复制",- "sessionInfo": "会话信息",+ "sessionInfo": "对话信息","usageSection": "用量","refreshContextUsage": "刷新上下文用量",- "currentSessionSpend": "本次会话",- "noSessionSpend": "暂无会话用量",+ "currentSessionSpend": "本次对话",+ "noSessionSpend": "暂无对话用量","contextLabel": "上下文","accountLimits": "账号限额",- "quotaExhaustedResettable": "当前额度已耗尽。重置会立即消耗 1 次,且不能撤销。",+ "quotaExhaustedResettable": "当前配额已耗尽。重置会立即消耗 1 次,且不能撤销。","resetting": "正在重置…","resetCodexUsage": "重置 Codex 用量",- "quotaExhaustedNoCredit": "当前额度已耗尽,但没有可用重置次数。",+ "quotaExhaustedNoCredit": "当前配额已耗尽,但没有可用重置次数。","openDir": "打开目录","copyPath": "复制路径","extraDirsSection": "附加引用目录",@@ -210,20 +210,20 @@"confirmRename": "确认重命名","confirm": "确定","cancelRename": "取消重命名",- "backToMenu": "返回会话菜单"+ "backToMenu": "返回对话菜单"},"tail": {"interrupted": "任务执行到一半时应用退出,已被中断。","continueTask": "继续任务","retry": "重试","ignore": "忽略",- "codexThreadLost": "Codex 鉴权模式已切换,当前会话无法继续 —— 请新建会话后生效。",- "encryptedContentInvalid": "由于更换供应商导致加密不可用,本会话只能在原供应商下使用;请回到电脑端处理(可 Fork 丢弃协议加密内容后在新会话继续)。"+ "codexThreadLost": "Codex 鉴权模式已切换,当前对话无法继续 —— 请新建对话后生效。",+ "encryptedContentInvalid": "由于更换供应商导致加密不可用,本对话只能在原供应商下使用;请回到电脑端处理(可 Fork 丢弃协议加密内容后在新对话继续)。"},"row": {"moreOptions": "更多选项","archiveConversation": "归档对话",- "closeActionMenu": "关闭会话操作菜单",+ "closeActionMenu": "关闭对话操作菜单","referenceAroundAnchor": "链接附近","referenceRecent": "最近消息","referenceCount": "{{num}} 条",diff --git a/apps/mobile/src/i18n/locales/zh-CN/settings.json b/apps/mobile/src/i18n/locales/zh-CN/settings.jsonindex df19ff592e..c887a26460 100644--- a/apps/mobile/src/i18n/locales/zh-CN/settings.json+++ b/apps/mobile/src/i18n/locales/zh-CN/settings.json@@ -52,8 +52,8 @@"connecting": "正在连接 Relay","stopped": "Relay 未连接","lastSynced": "上次同步 {{time}}",- "canSync": "可以同步远程会话。",- "reconnectHint": "网络恢复后会自动重新订阅远程会话。",+ "canSync": "可以同步远程对话。",+ "reconnectHint": "网络恢复后会自动重新订阅远程对话。","resumeHint": "回到前台或重新登录后会恢复连接。"},"header": {@@ -89,7 +89,7 @@"appFilingNumber": "App 备案号"},"account": {- "logoutHint": "退出只会清除这台手机上的登录态和本地远程镜像,不会影响电脑端会话。",+ "logoutHint": "退出只会清除这台手机上的登录态和本地远程镜像,不会影响电脑端对话。","logout": "退出登录","loggingOut": "退出中","loggingOutAccessibility": "正在退出登录"diff --git a/docs/dev-rules/engineering-conventions.md b/docs/dev-rules/engineering-conventions.mdindex 457ad87ebe..b16c305c8c 100644--- a/docs/dev-rules/engineering-conventions.md+++ b/docs/dev-rules/engineering-conventions.md@@ -25,6 +25,8 @@ UI 文案的语气与措辞另见 [`DESIGN.md`](../design-rules/DESIGN.md) 的 V| 支持的语言与默认语言 | `apps/desktop/src/shared/locale.ts`(`SUPPORTED_LOCALES`、`DEFAULT_LOCALE`) || i18n 资源 | `apps/desktop/src/renderer/i18n/locales/<locale>/common.json` || i18n key 一致性门禁 | `scripts/check-i18n.mjs`(`pnpm check:i18n`) |+| **术语表(唯一事实源)** | `i18n/glossary.json`,人读版 `i18n/GLOSSARY.md` |+| 术语一致性门禁 | `scripts/check-i18n-glossary.mjs`(`pnpm check:i18n-glossary`) |## 1. 日志@@ -93,9 +95,43 @@ UI 文案的语气与措辞另见 [`DESIGN.md`](../design-rules/DESIGN.md) 的 V- **删除**:删 UI 时把对应 key 从全部 locale 一起删掉,不留孤儿 key。- **翻译准确性**:`fallbackLng = 'en'`,缺 key 会静默回退英文。4 种语言都必须补齐并给出**准确**翻译,不留空、占位或“待校对”;ja / ko 没把握时先查证再写。-- **门禁**:`pnpm check:i18n` 校验 key 一致性——缺 key、孤儿 key、跨 locale 类型冲突会- 报错阻断;空值与“与默认语言完全相同”只发警告。它保证 key 结构齐整,但**翻译是否- 准确仍需人核**,改完至少跑一次 `pnpm check:i18n`。+- **术语一致性**:写任何术语前先查 `i18n/GLOSSARY.md`。同一个概念在不同界面译法不一致+ 是用户直接可见的质量问题(引入术语表时实测:162 个英文短语存在多种中文译法,反向+ 227 条)。表里已裁决的术语**必须照用**,拿不准或表里没有的先在+ `i18n/glossary.json` 加 `status: "proposed"` 条目,别自己临时造一个译法。++### 5.1 术语表与门禁++- **数据正本**:`i18n/glossary.json`;人读版 `i18n/GLOSSARY.md` 由+ `pnpm i18n:glossary-doc` 生成,**不要手改**。+- **两级状态**:`decided` 违反即阻断 CI;`proposed` 只告警,用于承载「已知不一致但+ 尚未拍板」的术语——让清单可见可讨论,而不是靠脚本替产品做裁决。+- **三类规则**:禁用译法、保留英文术语的大小写形态、zh-CN 半角标点与三语省略号。+ 标点规则的适用范围由现状数据定,不靠直觉——例如日文 UI 惯例本就用半角冒号,+ ja 不套用中文的全角规则。+- **存量**:`i18n/glossary-baseline.json` 冻结引入时的既有违规,**只减不增**;修好一条+ 就从账上删一条,已修复却仍挂账会报错。新增违规一律阻断。+- **误报处理**:guard 已剥离 `{{插值}}`、URL、文件名,并把连字符视作词边界+ (`ssh-agent` 不会被判成产品 `Agent`)。仍需放行时用 `exempt`——完整路径精确匹配,+ 或以 `.` 结尾的子树前缀;同形异义必须在 `note` 里写明理由。+- **门禁**:+ - `pnpm check:i18n` 校验 key 结构——缺 key、孤儿 key、跨 locale 类型冲突报错阻断;+ 空值与“与默认语言完全相同”只发警告。+ - `pnpm check:i18n-glossary` 校验译文术语与标点,并检查 `GLOSSARY.md` 是否与术语表同步。+ - 两者互补:前者管「key 齐不齐」,后者管「词译得一不一致」,谁也替代不了谁。改+ i18n 后两个都要跑(CI 已强制)。+- **已知盲区**:mobile 存在 i18next 之外的手写四语 catalog(`src/auth/loginMessages.ts`+ 等 `.ts` 文件),guard 只扫 locale JSON,不解析这些 TS。改动它们时需人工对照术语表。+- **批量改术语时必须跑全量 `pnpm test:unit`**:仓库里有若干测试直接断言中文文案+ (`automationGeneratedSessions.test.ts`、`builtinToolsCollabDescriptionI18n.test.ts`、+ mobile 的 `sessionMenu.test.ts` 等)。它们是有意的文案锁,改词后要同步更新期望值,+ 不能靠 guard 绿灯就认为改完了。反过来这也是一层兜底——Session→对话 那轮正是+ `mobileCindyVoiceSession.test.ts` 暴露了漏网的「语音识别会话」(ASR WebSocket+ 连接,不是产品对话)。+- **同形异义靠人判断,不靠词表**:中文同一个词常对应多个英文概念,机械替换必错。+ 已登记的几组:ssh-agent ≠ 产品 Agent;Computer Use 的「自动操作」≠ scheduler 的+ 「自动化」;SSO 的「身份提供方」≠「模型供应商」;登录态 / WebSocket 的 session+ ≠ 产品「对话」。批量替换前先按 key 前缀分组抽查语境,把例外写进 `exempt`。## 6. 注释@@ -134,10 +170,12 @@ UI 文案的语气与措辞另见 [`DESIGN.md`](../design-rules/DESIGN.md) 的 V依赖、便于免 Electron 测试?4. 路径、子进程、FS、性能、快捷键是否在 macOS / Windows 两端都成立?未实测平台是否标注?-5. UI 文案是否全部走 `t()`、4 种语言齐全且翻译准确、无孤儿 key?是否跑过 `pnpm check:i18n`?+5. UI 文案是否全部走 `t()`、4 种语言齐全且翻译准确、无孤儿 key?术语是否照 `i18n/GLOSSARY.md`+ 写、没有自造译法?是否跑过 `pnpm check:i18n` 与 `pnpm check:i18n-glossary`?6. 新增类/核心逻辑是否有职责注释?7. 新增常驻动画是否 compositor-only(HTML 元素 + `transform`/`opacity` + wrapper)、响应 `prefers-reduced-motion`?界面切换是否无跳变/空白帧、未引入不必要的 loading 态?验证按 [`desktop-development.md`](desktop-development.md) 的分层选择:改 TypeScript 至少跑相关-类型检查与定向测试;改 i18n 跑 `pnpm check:i18n`;跨模块或高风险改动再扩大验证范围。+类型检查与定向测试;改 i18n 跑 `pnpm check:i18n` 与 `pnpm check:i18n-glossary`;跨模块或+高风险改动再扩大验证范围。diff --git a/i18n/GLOSSARY.md b/i18n/GLOSSARY.mdnew file mode 100644index 0000000000..35e64fbcd1--- /dev/null+++ b/i18n/GLOSSARY.md@@ -0,0 +1,99 @@+<!-- 本文件由 scripts/generate-glossary-doc.mjs 自动生成,请勿手改。 -->+<!-- 修改术语请编辑 i18n/glossary.json,然后运行 pnpm i18n:glossary-doc。 -->++# Cindy 术语表++产品术语的唯一事实源。**新增或修改任何 UI 文案前先查这里**——同一个概念在不同界面译法不一致,是用户能直接看见的质量问题。++- 数据正本:`i18n/glossary.json`(本文件由它生成)+- 自动门禁:`pnpm check:i18n-glossary`(随 CI 阻断)+- 存量豁免:`i18n/glossary-baseline.json`(只减不增)++## 已裁决术语++这些术语的译法已定,**违反会阻断 CI**。++| 英文 | zh-CN | ja | ko | 禁用译法 |+| --- | --- | --- | --- | --- |+| **Agent** | `Agent`(保留英文) | エージェント | 에이전트 | zh-CN: 智能体 |+| **Automation** | 自动化 | オートメーション | 자동화 | — |+| **Balance** | 余额 | 残高 | 잔액 | — |+| **Chat** | 对话 | チャット | 채팅 | zh-CN: 聊天 |+| **Credits** | 点数 | クレジット | 크레딧 | zh-CN: 额度 |+| **Effort** | 推理强度 | 推論強度 | 추론 강도 | zh-CN: 思考强度;zh-CN: 思考深度;zh-CN: 推理深度;zh-CN: 努力程度;zh-CN: 推理力度 |+| **Issue** | `Issue`(保留英文) | `Issue`(保留英文) | `Issue`(保留英文) | zh-CN: 工单;zh-CN: 议题 |+| **Plugin** | 插件 | プラグイン | 플러그인 | zh-CN: Plugin;zh-CN: plugin |+| **Project** | 项目 | プロジェクト | 프로젝트 | zh-CN: Project |+| **Provider** | 供应商 | プロバイダー | 제공업체 | zh-CN: 提供方;zh-CN: 提供商 |+| **Proxy** | `Proxy`(保留英文) | プロキシ | 프록시 | zh-CN: 代理 |+| **Quota** | 配额 | クォータ | 쿼터 | — |+| **Session** | 对话 | セッション | 세션 | zh-CN: 会话 |+| **Skill** | 技能 | スキル | 스킬 | — |+| **SkillHub** | `SkillHub`(保留英文) | `SkillHub`(保留英文) | `SkillHub`(保留英文) | — |+| **Subagent** | `Subagent`(保留英文) | サブエージェント | 하위 에이전트 | — |+| **Thread** | 对话 | スレッド | 스레드 | zh-CN: 线程 |+| **Usage** | 用量 | 使用量 | 사용량 | zh-CN: 使用情况;zh-CN: 使用表现 |+| **Worker** | `Worker`(保留英文) | `Worker`(保留英文) | `Worker`(保留英文) | — |++### 分场合译法++同一个词在不同语境下有不同说法。下面这些是**允许的**,按场合选,不会被门禁拦截。++| 英文 | 语言 | 译法 | 什么场合 |+| --- | --- | --- | --- |+| **Automation** | zh-CN | 自动化 | 默认 |+| Automation | zh-CN | 自动任务 | 指单条自动化实例(一个定时跑的任务)时 |+| Automation | zh-CN | 自动化任务 | 需要与模块名区分、强调它是一条任务时 |+| Automation | zh-CN | 自动操作 | Computer Use 语境——「自动操作电脑 / 浏览器」,指代操控设备而非定时任务 |+| **Credits** | zh-CN | 点数 | 默认 |+| Credits | zh-CN | credits | 指第三方服务自身的 credits(如 Codex / ChatGPT 订阅余量),保留其原生叫法 |+| Credits | zh-CN | 重置次数 | reset credits——指可用的配额重置次数,与计费点数无关 |+| **Provider** | zh-CN | 供应商 | 默认 |+| Provider | zh-CN | 模型供应商 | 首次出现或需要消歧时用全称,如设置页标题 |+| **Skill** | zh-CN | 技能 | 默认 |+| Skill | zh-CN | Skill | 技术语境下指代具体的 skill 文件 / 目录结构时,可保留英文 |+| **Thread** | zh-CN | 对话 | 默认 |+| Thread | zh-CN | thread | 指 Codex 的 thread 这一外部系统概念时(导入历史、thread 上下文),保留英文 |+| Thread | zh-CN | 评论 | 指 GitHub PR 的 review thread 时,用「review 评论」 |++### 裁决理由++- **Agent** — 产品一级概念,中文保留英文原词(现状 44:5 已是主流)。「代理」一词在中文 UI 里整体废弃——Agent 与 Proxy 都保留英文,不共用这个译名(2026-07 裁决);该词的 forbidden 规则统一登记在 proxy 条目下,避免同一处违规被两个术语重复报告。引入术语表时全仓仅 9 处「代理」,已全部清理为 Agent / Subagent / Proxy。ja / ko 沿用既有片假名 / 한글 音译,不受本条约束。豁免 settings.remote 整段:那里的 agent 指 ssh-agent(英文原文即 "SSH agent" / "probe agent"),是与产品 Agent 同形的另一个概念。+ - 豁免范围:`desktop:settings.remote.`+- **Automation** — 模块名 / 能力名用「自动化」(现状 88 处主流);指单条实例时用「自动任务」,这是刻意保留的场景差异——一刀切会写出「查看你的自动化」这类别扭中文。特别注意 Automation 在本产品里指两个不同概念:scheduler 的定时任务,以及 settings.computerUse 的操控电脑能力;后者用「自动操作电脑 / 浏览器」,改成「自动化电脑」反而不通。因此不设 forbidden。+- **Balance** — 账户余额用「余额」。原先被并入「额度」(可用额度 / 额度更新于 / 剩余额度),与 Credits、Quota 混同。Balance 是「账上还剩多少」,Credits 是「可购买消耗的计数单位」,Quota 是「周期内上限」——三者是不同层面的量,中文必须分开。+- **Chat** — 在本产品里 Chat 与 Session 指同一个东西,中文统一叫「对话」(2026-07 裁决),不再区分「聊天 / 会话 / 对话」三套说法。原先 22 处「聊天」(聊天正文、聊天区、聊天记录…)已一并改为「对话」。ja / ko 保留各自既有译法,两语没有中文这种三词混用问题。+- **Credits** — 计费点数用「点数」。清理前中文「额度」同时对应 Balance / Credits / Quota 三个英文概念,是计费面板里最容易误导用户的一处:同一个 billing 页面里「点数」和「额度」并存,而「额度」在别处又指配额。裁决把三者拆开——Credits =「点数」、Quota =「配额」、Balance =「余额」,「额度」整体退出。第三方原生 credits 与 reset credits 属不同概念,走 alsoAllowed。+- **Effort** — 模型的推理投入档位(low/medium/high/…)。用「推理强度」有三重依据:①同类工具 i18n 里断层第一(GitHub 代码搜索共现量级 1452,第二名「思考强度」431);②OpenAI 简中帮助中心即用此词;③跨 provider 中立——Cindy 的 create_worker 用一个 effort 同时映射 Codex reasoning effort 与 Claude thinking 预算,而 Anthropic 官方简中叫「努力程度」、OpenAI 叫「推理强度」,需要不偏向任一方的词。禁用项各有硬理由:「思考深度」「推理深度」会与国内产品普遍的「深度思考」开关撞车,且语义错误(低 effort 是想得少,不是想得浅);「努力程度」在中文里强烈指向人的绩效评价;「推理等级/级别」未入禁用但不推荐——Cindy 已有 model tier 概念,「等级」易被读成模型档位。+- **Issue** — 保留英文(2026-07 裁决)。现状「工单」32 /「议题」4 是既有 bug 的来源:列表按钮写「新建议题」、点进去页面标题写「新建工单」。「问题」不入 forbidden——它在「修复问题和失败」这类泛指语境下是正常中文,不是 Issue 的误译。checkCase 关闭:issue 同时是常用英语单词,prompt 模板里的 "fix the issue" 是正常用法,做大小写约束会制造 9 处假阳性。+- **Plugin** — 中文一律「插件」,不保留英文原词(现状 94:4)。历史上 Ghost / Plugin 两种叫法并存,对外统一为「插件」。+- **Project** — 中文一律「项目」(现状 119:15)。同一个侧边栏里筛选叫「项目」、批量操作提示叫「Project」是既有 bug。小写 project 不入 forbidden——它常出现在路径与文件名里(project.json)。+- **Provider** — 中文用「供应商」(现状 36:18 领先简称)。全称「模型供应商」在需要消歧的位置仍可用。「提供商」「提供方」是同义漂移,禁用——设置页标题写「模型供应商」、它自己的表单写「提供商」是既有 bug。豁免 login.ssoVerificationSubtitle:那里的「身份提供方」是 SSO / SAML 领域 Identity Provider 的标准中文术语,与模型供应商是两个概念。+ - 豁免范围:`desktop:login.ssoVerificationSubtitle`+- **Proxy** — 网络代理,中文保留英文原词(2026-07 裁决:Agent 与 Proxy 都不叫「代理」)。这条 forbidden 同时兜住 Agent / Subagent 的误译——「代理」在 zh-CN 文案里一律视为违规,无论它来自哪个英文词。ja / ko 沿用既有音译。不设 exempt:本条只禁中文「代理」,settings.remote 里的 ssh-agent 是英文、不会命中,加豁免只会平白削弱门禁。+- **Quota** — 周期内的使用上限用「配额」(现状已有 3 处这么写)。与 credits 条目一起裁决:「额度」原先同时表示 Balance / Credits / Quota,三个概念在计费与限额提示里互相污染。「额度」的 forbidden 统一登记在 credits 条目下,不在这里重复——一个词只归属一个术语,否则同一处违规会被两个术语各报一次。+- **Session** — 面向用户一律叫「对话」——「会话」太生硬难懂(2026-07 裁决)。代码与内部标识仍用 Session,本条只约束 UI 文案。Chat 合并到同一个词,见 chat 条目。落地时把 440 处「会话」+ 22 处「聊天」统一改为「对话」。ja / ko 沿用既有音译,不受本条约束。豁免的 4 处是同形异义的技术 session(登录态、WebSocket 语音连接),与产品对话无关——注意 login.errors 的「绑定会话」指账号绑定态,scheduler 的「绑定对话」才是产品对话,两者同名不同义,靠 key 精确区分。+ - 豁免范围:`desktop:login.errors.INVALID_LOGIN_TICKET`、`desktop:login.errors.INVALID_BIND_TICKET`、`mobile/composer:voice.missingConnectionProvider`、`mobile/composer:voice.sessionExpiredOrForbidden`、`mobile/composer:voice.sessionNotConnected`+- **Skill** — 中文用「技能」(现状 32:26 领先)。偶尔保留英文 Skill 是允许的,因此不设 forbidden——硬性禁用会逼出别扭的中文。SkillHub 作为产品名保留英文,单独登记在 skillhub 条目。+- **SkillHub** — 产品名,四语一律保留英文原样(暂定保留,未来若做中文名再改)。注意与 skill 条目区分:侧边栏 tab 现在叫「技能」但实际指 SkillHub,创建面板的「技能」指 Skills——这是既有 bug,两者不是一个东西不该同名,清理存量时需一并处理。+- **Subagent** — Agent 的派生概念,中文跟随 Agent 保留英文原词,不译「子代理」——「代理」在中文 UI 已整体废弃。「子代理」含「代理」,由 proxy 条目的 forbidden 统一拦截,这里不重复登记。ja / ko 沿用既有音译。+- **Thread** — 全仓仅 8 处,按语境分四类,是「同一个词必须分场合翻译」的典型:①指产品内的对话 → 跟随 session 叫「对话」(已落地 3 处);②Codex 外部概念 → 保留 thread;③GitHub PR review thread →「review 评论」;④比喻用法 "persistent work thread" → 原译「工作线程」,中文有 OS 线程歧义,已改写为「持续推进的工作对话」。「线程」一律禁用。+- **Usage** — 中文用「用量」(现状 37:6 压倒性)。「使用情况」「使用表现」是同义漂移,禁用。注意 usage 在英文里也有「用法」义(如 CLI usage),那属于另一个概念,不在本条约束范围。+- **Worker** — Orca 协同角色名,四语统一保留英文。这里只钉大小写形态:首字母大写 Worker。小写 worker 由 guard 的大小写规则单独覆盖(desktop 26:13 混用、mobile 一律小写)。++## 待讨论术语++(暂无——所有已登记术语都已裁决)+## 怎么加一条术语++1. 在 `i18n/glossary.json` 的 `terms` 里加条目,`note` 必填——写清楚**为什么**这么定,+ 否则后人会反复推翻它。+2. 拿不准时先设 `status: "proposed"`,让 guard 把现状规模统计出来再讨论。+3. 跑 `pnpm i18n:glossary-doc` 重新生成本文件。+4. 跑 `pnpm check:i18n-glossary` 看新规则命中多少存量;确认无误报后再+ `node scripts/check-i18n-glossary.mjs --update-baseline` 冻结。++**误报排查**:guard 已剥离 `{{插值}}`、URL、文件名,并把连字符视作词边界+(`ssh-agent` 不会被判成产品 `Agent`)。仍需放行时用 `exempt`:完整路径精确匹配,+或以 `.` 结尾的子树前缀。同形异义(SSH agent vs 产品 Agent)走 `exempt` 并在 `note` 里写明。+diff --git a/i18n/glossary-baseline.json b/i18n/glossary-baseline.jsonnew file mode 100644index 0000000000..b742d69773--- /dev/null+++ b/i18n/glossary-baseline.json@@ -0,0 +1,571 @@+{+ "_comment": "存量违规冻结清单(仅 status=decided 的术语与标点规则)。只减不增:修好一条就从这里删一条,新增违规一律阻断 CI。重新生成: node scripts/check-i18n-glossary.mjs --update-baseline",+ "_generatedFrom": "glossary.json version 1",+ "entries": [+ "ja\tdesktop:ccAgent.common.loading\tpunct-ellipsis\t...",+ "ja\tdesktop:ccAgent.layout.chatPlaceholder\tpunct-ellipsis\t...",+ "ja\tdesktop:ccAgent.search.placeholder\tpunct-ellipsis\t...",+ "ja\tdesktop:ccAgent.search.searching\tpunct-ellipsis\t...",+ "ja\tdesktop:ccAgent.workdirBrowse.docSearch.placeholder\tpunct-ellipsis\t...",+ "ja\tdesktop:chat.errorBanner.forkStripEncryptedRunning\tpunct-ellipsis\t...",+ "ja\tdesktop:chat.rewind.dialog.calculating\tpunct-ellipsis\t...",+ "ja\tdesktop:chat.systemCard.context.loading\tpunct-ellipsis\t...",+ "ja\tdesktop:chat.textLightbox.loading\tpunct-ellipsis\t...",+ "ja\tdesktop:chat.upgradeBanner.upgrading\tpunct-ellipsis\t...",+ "ja\tdesktop:commonUi.crossAgentConvert.running.title\tpunct-ellipsis\t...",+ "ja\tdesktop:findInPage.placeholder\tpunct-ellipsis\t...",+ "ja\tdesktop:login.localModeOpening\tpunct-ellipsis\t...",+ "ja\tdesktop:login.verifying\tpunct-ellipsis\t...",+ "ja\tdesktop:login.working\tpunct-ellipsis\t...",+ "ja\tdesktop:newChat.addRemoteProject.existingLoading\tpunct-ellipsis\t...",+ "ja\tdesktop:newChat.addRemoteProject.loading\tpunct-ellipsis\t...",+ "ja\tdesktop:newChat.collaboration.archiveWorkerConfirmConfirm\tterm-case\tworker:worker",+ "ja\tdesktop:newChat.collaboration.archiveWorkerConfirmDesc\tterm-case\tworker:worker",+ "ja\tdesktop:newChat.collaboration.archiveWorkerConfirmTitle\tterm-case\tworker:worker",+ "ja\tdesktop:newChat.collaboration.archiveWorkerConfirmTitleName\tterm-case\tworker:worker",+ "ja\tdesktop:newChat.modelSelector.search.placeholder\tpunct-ellipsis\t...",+ "ja\tdesktop:newChat.modelSelector.search.placeholderAll\tpunct-ellipsis\t...",+ "ja\tdesktop:newChat.pendingQueue.steeringAction\tpunct-ellipsis\t...",+ "ja\tdesktop:orca.rolePill.layoutMenuLabel\tterm-case\tworker:worker",+ "ja\tdesktop:settings.agentIsland.soundOptions.custom\tpunct-ellipsis\t...",+ "ja\tdesktop:settings.collaboration.loading\tpunct-ellipsis\t...",+ "ja\tdesktop:settings.computerUse.android.adb.preparing\tpunct-ellipsis\t...",+ "ja\tdesktop:settings.computerUse.android.status.checking\tpunct-ellipsis\t...",+ "ja\tdesktop:settings.computerUse.android.status.preparing\tpunct-ellipsis\t...",+ "ja\tdesktop:settings.computerUse.directControl.installing\tpunct-ellipsis\t...",+ "ja\tdesktop:settings.discordBot.connectingAction\tpunct-ellipsis\t...",+ "ja\tdesktop:settings.discordBot.disconnectingAction\tpunct-ellipsis\t...",+ "ja\tdesktop:settings.discordBot.status.connecting\tpunct-ellipsis\t...",+ "ja\tdesktop:settings.feishuBot.status.connecting\tpunct-ellipsis\t...",+ "ja\tdesktop:settings.feishuBot.status.reconnecting\tpunct-ellipsis\t...",+ "ja\tdesktop:settings.remote.keys.nameHint\tpunct-ellipsis\t...",+ "ja\tdesktop:settings.remote.silentInstall.installingAgent\tpunct-ellipsis\t...",+ "ja\tdesktop:settings.remote.silentInstall.preparingRuntime\tpunct-ellipsis\t...",+ "ja\tdesktop:settings.remote.silentInstall.starting\tpunct-ellipsis\t...",+ "ja\tdesktop:settings.remote.status.authenticating\tpunct-ellipsis\t...",+ "ja\tdesktop:settings.remote.status.connecting\tpunct-ellipsis\t...",+ "ja\tdesktop:settings.remote.status.reconnecting\tpunct-ellipsis\t...",+ "ja\tdesktop:skillhub.market.loading\tpunct-ellipsis\t...",+ "ja\tdesktop:skillhub.publishDialog.categoryLoading\tpunct-ellipsis\t...",+ "ja\tdesktop:splash.tips.checkingEnv\tpunct-ellipsis\t...",+ "ja\tdesktop:splash.tips.checkingUpdate\tpunct-ellipsis\t...",+ "ja\tdesktop:splash.tips.updateDone\tpunct-ellipsis\t...",+ "ja\tdesktop:splash.tips.updating\tpunct-ellipsis\t...",+ "ja\tdesktop:splash.tips.waking\tpunct-ellipsis\t...",+ "ja\tdesktop:voiceInputOverlay.placeholder\tpunct-ellipsis\t...",+ "ja\tmobile/devices:automations.delete.counting\tpunct-ellipsis\t...",+ "ja\tmobile/interaction:collab.batchBodyFallback\tterm-case\tworker:worker",+ "ja\tmobile/interaction:collab.batchTitle\tterm-case\tworker:worker",+ "ja\tmobile/interaction:collab.batchTitleGeneric\tterm-case\tworker:worker",+ "ja\tmobile/interaction:collab.dispatchBodyFallback\tterm-case\tworker:worker",+ "ja\tmobile/interaction:collab.dispatchTitle\tterm-case\tworker:worker",+ "ja\tmobile/interaction:collab.reportTitle\tterm-case\tworker:worker",+ "ja\tmobile/interaction:collab.sendTitle\tterm-case\tworker:worker",+ "ja\tmobile/interaction:panel.customAnswerButtonText\tpunct-ellipsis\t...",+ "ja\tmobile/models:picker.searchPlaceholder\tpunct-ellipsis\t...",+ "ja\tmobile/session:new.readingRemoteDir\tpunct-ellipsis\t...",+ "ko\tdesktop:ccAgent.common.loading\tpunct-ellipsis\t...",+ "ko\tdesktop:ccAgent.layout.chatPlaceholder\tpunct-ellipsis\t...",+ "ko\tdesktop:ccAgent.search.placeholder\tpunct-ellipsis\t...",+ "ko\tdesktop:ccAgent.search.searching\tpunct-ellipsis\t...",+ "ko\tdesktop:ccAgent.workdirBrowse.docSearch.placeholder\tpunct-ellipsis\t...",+ "ko\tdesktop:chat.errorBanner.forkStripEncryptedRunning\tpunct-ellipsis\t...",+ "ko\tdesktop:chat.rewind.dialog.calculating\tpunct-ellipsis\t...",+ "ko\tdesktop:chat.systemCard.context.loading\tpunct-ellipsis\t...",+ "ko\tdesktop:chat.textLightbox.loading\tpunct-ellipsis\t...",+ "ko\tdesktop:chat.upgradeBanner.upgrading\tpunct-ellipsis\t...",+ "ko\tdesktop:commonUi.crossAgentConvert.running.title\tpunct-ellipsis\t...",+ "ko\tdesktop:findInPage.placeholder\tpunct-ellipsis\t...",+ "ko\tdesktop:login.localModeOpening\tpunct-ellipsis\t...",+ "ko\tdesktop:login.verifying\tpunct-ellipsis\t...",+ "ko\tdesktop:login.working\tpunct-ellipsis\t...",+ "ko\tdesktop:newChat.addRemoteProject.existingLoading\tpunct-ellipsis\t...",+ "ko\tdesktop:newChat.addRemoteProject.loading\tpunct-ellipsis\t...",+ "ko\tdesktop:newChat.collaboration.archiveWorkerConfirmConfirm\tterm-case\tworker:worker",+ "ko\tdesktop:newChat.collaboration.archiveWorkerConfirmDesc\tterm-case\tworker:worker",+ "ko\tdesktop:newChat.collaboration.archiveWorkerConfirmTitle\tterm-case\tworker:worker",+ "ko\tdesktop:newChat.collaboration.archiveWorkerConfirmTitleName\tterm-case\tworker:worker",+ "ko\tdesktop:newChat.modelSelector.search.placeholder\tpunct-ellipsis\t...",+ "ko\tdesktop:newChat.modelSelector.search.placeholderAll\tpunct-ellipsis\t...",+ "ko\tdesktop:newChat.pendingQueue.steeringAction\tpunct-ellipsis\t...",+ "ko\tdesktop:orca.rolePill.layoutMenuLabel\tterm-case\tworker:worker",+ "ko\tdesktop:settings.agentIsland.soundOptions.custom\tpunct-ellipsis\t...",+ "ko\tdesktop:settings.collaboration.loading\tpunct-ellipsis\t...",+ "ko\tdesktop:settings.computerUse.android.adb.preparing\tpunct-ellipsis\t...",+ "ko\tdesktop:settings.computerUse.android.status.checking\tpunct-ellipsis\t...",+ "ko\tdesktop:settings.computerUse.android.status.preparing\tpunct-ellipsis\t...",+ "ko\tdesktop:settings.computerUse.directControl.installing\tpunct-ellipsis\t...",+ "ko\tdesktop:settings.discordBot.connectingAction\tpunct-ellipsis\t...",+ "ko\tdesktop:settings.discordBot.disconnectingAction\tpunct-ellipsis\t...",+ "ko\tdesktop:settings.discordBot.status.connecting\tpunct-ellipsis\t...",+ "ko\tdesktop:settings.feishuBot.status.connecting\tpunct-ellipsis\t...",+ "ko\tdesktop:settings.feishuBot.status.reconnecting\tpunct-ellipsis\t...",+ "ko\tdesktop:settings.remote.keys.nameHint\tpunct-ellipsis\t...",+ "ko\tdesktop:settings.remote.silentInstall.installingAgent\tpunct-ellipsis\t...",+ "ko\tdesktop:settings.remote.silentInstall.preparingRuntime\tpunct-ellipsis\t...",+ "ko\tdesktop:settings.remote.silentInstall.starting\tpunct-ellipsis\t...",+ "ko\tdesktop:settings.remote.status.authenticating\tpunct-ellipsis\t...",+ "ko\tdesktop:settings.remote.status.connecting\tpunct-ellipsis\t...",+ "ko\tdesktop:settings.remote.status.reconnecting\tpunct-ellipsis\t...",+ "ko\tdesktop:skillhub.market.loading\tpunct-ellipsis\t...",+ "ko\tdesktop:skillhub.publishDialog.categoryLoading\tpunct-ellipsis\t...",+ "ko\tdesktop:splash.tips.checkingEnv\tpunct-ellipsis\t...",+ "ko\tdesktop:splash.tips.checkingUpdate\tpunct-ellipsis\t...",+ "ko\tdesktop:splash.tips.updateDone\tpunct-ellipsis\t...",+ "ko\tdesktop:splash.tips.updating\tpunct-ellipsis\t...",+ "ko\tdesktop:splash.tips.waking\tpunct-ellipsis\t...",+ "ko\tdesktop:voiceInputOverlay.placeholder\tpunct-ellipsis\t...",+ "ko\tmobile/devices:automations.delete.counting\tpunct-ellipsis\t...",+ "ko\tmobile/interaction:collab.batchBodyFallback\tterm-case\tworker:worker",+ "ko\tmobile/interaction:collab.batchTitle\tterm-case\tworker:worker",+ "ko\tmobile/interaction:collab.batchTitleGeneric\tterm-case\tworker:worker",+ "ko\tmobile/interaction:collab.dispatchBodyFallback\tterm-case\tworker:worker",+ "ko\tmobile/interaction:collab.dispatchTitle\tterm-case\tworker:worker",+ "ko\tmobile/interaction:collab.reportTitle\tterm-case\tworker:worker",+ "ko\tmobile/interaction:collab.sendTitle\tterm-case\tworker:worker",+ "ko\tmobile/interaction:panel.customAnswerButtonText\tpunct-ellipsis\t...",+ "ko\tmobile/models:picker.searchPlaceholder\tpunct-ellipsis\t...",+ "ko\tmobile/session:new.readingRemoteDir\tpunct-ellipsis\t...",+ "zh-CN\tdesktop:appError.description\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:billing.planChange.scheduledBody\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:ccAgent.common.loading\tpunct-ellipsis\t...",+ "zh-CN\tdesktop:ccAgent.gitContext.pr.needsToken\tterm-case\tagent:agent",+ "zh-CN\tdesktop:ccAgent.layout.chatPlaceholder\tpunct-ellipsis\t...",+ "zh-CN\tdesktop:ccAgent.layout.contextRing.codexAutoHint\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:ccAgent.layout.contextRing.confirmDescription\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:ccAgent.layout.contextRing.confirmDescription\tterm-case\tagent:agent",+ "zh-CN\tdesktop:ccAgent.remoteSession.actionsUnavailable\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:ccAgent.remoteSession.hostOffline\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:ccAgent.remoteSession.reconnecting\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:ccAgent.remoteSession.suspectStall\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:ccAgent.search.placeholder\tpunct-ellipsis\t...",+ "zh-CN\tdesktop:ccAgent.search.searching\tpunct-ellipsis\t...",+ "zh-CN\tdesktop:ccAgent.sidebar.archiveAll.allPinned\tforbidden-term\tproject:Project",+ "zh-CN\tdesktop:ccAgent.sidebar.archiveAll.allPinnedOrRunning\tforbidden-term\tproject:Project",+ "zh-CN\tdesktop:ccAgent.sidebar.archiveAll.allRunning\tforbidden-term\tproject:Project",+ "zh-CN\tdesktop:ccAgent.sidebar.archiveAll.description\tforbidden-term\tproject:Project",+ "zh-CN\tdesktop:ccAgent.sidebar.archiveAll.descriptionWithSkip\tforbidden-term\tproject:Project",+ "zh-CN\tdesktop:ccAgent.sidebar.archiveAll.empty\tforbidden-term\tproject:Project",+ "zh-CN\tdesktop:ccAgent.sidebar.unarchiveAll.description\tforbidden-term\tproject:Project",+ "zh-CN\tdesktop:ccAgent.sidebar.unarchiveAll.empty\tforbidden-term\tproject:Project",+ "zh-CN\tdesktop:ccAgent.workdirBrowse.docSearch.placeholder\tpunct-ellipsis\t...",+ "zh-CN\tdesktop:ccAgent.workdirBrowse.fileBody.cachedStaleNotice\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:ccAgent.workdirBrowse.mermaidEditor.renderFailedPrefix\tpunct-halfwidth\t:",+ "zh-CN\tdesktop:ccAgent.workdirBrowse.mermaidEditor.targetMissing\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:chat.errorBanner.forkStripEncryptedRunning\tpunct-ellipsis\t...",+ "zh-CN\tdesktop:chat.errorBanner.invalidEncryptedContent\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:chat.ghostHook.blockedFallback\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:chat.ghostHook.fused\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:chat.ghostNotify.oauthConnected\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:chat.ghostNotify.oauthConnectedNoLabel\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:chat.modelMismatch.notice\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:chat.planReviewBubble.feedbackLabel\tpunct-halfwidth\t:",+ "zh-CN\tdesktop:chat.remoteError.DEVICE_LINK_CONTROL_DISABLED\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:chat.remoteError.DEVICE_LINK_MEDIA_TRANSFER_FAILED\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:chat.remoteError.REMOTE_COMPAT_MODE_UNSUPPORTED\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:chat.remoteError.REMOTE_GATEWAY_ENDPOINT_UNAVAILABLE\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:chat.remoteFile.outsideWorkdir\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:chat.remoteFile.staleCopy\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:chat.rewind.dialog.calculating\tpunct-ellipsis\t...",+ "zh-CN\tdesktop:chat.upgradeBanner.upgrading\tpunct-ellipsis\t...",+ "zh-CN\tdesktop:chat.workflowTree.agentsCount\tterm-case\tagent:agent",+ "zh-CN\tdesktop:commands.toast.remoteUnsupported\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:commonUi.crossAgentConvert.running.title\tpunct-ellipsis\t...",+ "zh-CN\tdesktop:findInPage.placeholder\tpunct-ellipsis\t...",+ "zh-CN\tdesktop:ghostGrant.confirm.descriptionAttachments\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:ghostGrant.confirm.descriptionDir\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:ghostGrant.confirm.descriptionFsWrite\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:ghostGrant.confirm.descriptionSaveDir\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:issueAgent.command.detailsPrefix\tpunct-halfwidth\t:",+ "zh-CN\tdesktop:issueAgent.command.instruction\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:issueAgent.confirm.envLine\tpunct-halfwidth\t:",+ "zh-CN\tdesktop:issueAgent.confirm.identityGithubUser\tpunct-halfwidth\t:",+ "zh-CN\tdesktop:issueAgent.confirm.identityPlatform\tpunct-halfwidth\t:",+ "zh-CN\tdesktop:issueAgent.redirect.descriptionAfter\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:issueTracker.create.submitterLabel\tpunct-halfwidth\t:",+ "zh-CN\tdesktop:issueTracker.create.versionLabel\tpunct-halfwidth\t:",+ "zh-CN\tdesktop:learn.card.continueHint\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:logic.errors.emptyResponse\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:login.localModeOpening\tpunct-ellipsis\t...",+ "zh-CN\tdesktop:login.verifying\tpunct-ellipsis\t...",+ "zh-CN\tdesktop:login.working\tpunct-ellipsis\t...",+ "zh-CN\tdesktop:newChat.addRemoteProject.confirmCreate.description\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:newChat.addRemoteProject.empty\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:newChat.addRemoteProject.existingEmpty\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:newChat.addRemoteProject.existingLoading\tpunct-ellipsis\t...",+ "zh-CN\tdesktop:newChat.addRemoteProject.hint\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:newChat.addRemoteProject.loading\tpunct-ellipsis\t...",+ "zh-CN\tdesktop:newChat.addRemoteProject.toast.pathIsFile\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:newChat.branchChip.loadFailed\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:newChat.chatInput.agentSwitch.confirmation.description\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:newChat.chatInput.agentSwitch.deferred\tpunct-halfwidth\t:",+ "zh-CN\tdesktop:newChat.chatInput.agentSwitch.engineNotReady\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:newChat.chatInput.agentSwitch.failed\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:newChat.chatInput.remoteSwitchFailed\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:newChat.chatInput.switchFailed\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:newChat.collaboration.archiveWorkerConfirmConfirm\tterm-case\tworker:worker",+ "zh-CN\tdesktop:newChat.collaboration.archiveWorkerConfirmDesc\tterm-case\tworker:worker",+ "zh-CN\tdesktop:newChat.collaboration.archiveWorkerConfirmTitle\tterm-case\tworker:worker",+ "zh-CN\tdesktop:newChat.collaboration.archiveWorkerConfirmTitleName\tterm-case\tworker:worker",+ "zh-CN\tdesktop:newChat.collaboration.stopConfirmDesc\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:newChat.collaboration.toggleOffAria\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:newChat.collaboration.toggleOnAria\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:newChat.modelSelector.search.placeholder\tpunct-ellipsis\t...",+ "zh-CN\tdesktop:newChat.modelSelector.search.placeholderAll\tpunct-ellipsis\t...",+ "zh-CN\tdesktop:newChat.pendingQueue.steeringAction\tpunct-ellipsis\t...",+ "zh-CN\tdesktop:newChat.planReview.saveFailed\tpunct-halfwidth\t:",+ "zh-CN\tdesktop:onboarding.connectProvider.banner.text\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:onboarding.connectProvider.cindy.loginDesc\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:onboarding.connectProvider.oauthSub\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:onboarding.connectProvider.title\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:orca.rolePill.layoutMenuLabel\tterm-case\tworker:worker",+ "zh-CN\tdesktop:remoteDevice.connectError\tpunct-halfwidth\t:",+ "zh-CN\tdesktop:remoteDevice.sendFailed\tpunct-halfwidth\t:",+ "zh-CN\tdesktop:remoteDevice.versionMismatch\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:renameSessions.confirm.from\tpunct-halfwidth\t:",+ "zh-CN\tdesktop:renameSessions.confirm.to\tpunct-halfwidth\t:",+ "zh-CN\tdesktop:rightSidebar.browser.crash.crashedDesc\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:rightSidebar.browser.crash.navigationLoopDesc\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:rightSidebar.browser.crash.unresponsiveDesc\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:rightSidebar.fileBrowser.filterTruncated\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:rightSidebar.fileBrowser.noWorkdir\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:rightSidebar.review.actions.disabledWriteGateWithReasons\tpunct-halfwidth\t:",+ "zh-CN\tdesktop:rightSidebar.review.actions.partialFailure\tpunct-halfwidth\t:",+ "zh-CN\tdesktop:rightSidebar.review.branch.baseMissing\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:rightSidebar.review.branch.baseTooltip\tpunct-halfwidth\t:",+ "zh-CN\tdesktop:rightSidebar.review.branch.mergeBaseMissing\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:rightSidebar.review.branch.tooManyFiles\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:rightSidebar.review.branch.unborn\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:rightSidebar.review.capped.notice\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:rightSidebar.review.discard.confirm.section.descWithUntracked\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:rightSidebar.review.emptyDesc\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:rightSidebar.review.emptyDesc\tterm-case\tagent:agent",+ "zh-CN\tdesktop:rightSidebar.review.kindNotice.too-large\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:rightSidebar.review.loadingDesc\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:rightSidebar.review.moreMenu.copyGitApplyFailed\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:rightSidebar.review.noCommitsDesc\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:rightSidebar.review.openFileFailed\tpunct-halfwidth\t:",+ "zh-CN\tdesktop:rightSidebar.review.push.disabledWriteGateWithReasons\tpunct-halfwidth\t:",+ "zh-CN\tdesktop:rightSidebar.review.push.forceDesc_one\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:rightSidebar.review.push.forceDesc_other\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:rightSidebar.review.push.forceStillRejected\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:rightSidebar.review.push.leaseExpired\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:rightSidebar.review.push.noRemote\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:rightSidebar.review.push.readyForceCandidate_one\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:rightSidebar.review.push.readyForceCandidate_other\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:rightSidebar.review.push.synced\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:rightSidebar.review.sessionRunningWriteBlocked\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:rightSidebar.review.sessionRunningWriteBlocked\tterm-case\tagent:agent",+ "zh-CN\tdesktop:rightSidebar.review.stagedEmptyDesc\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:rightSidebar.review.staleDiff\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:rightSidebar.review.topAction.disabledWriteGateWithReasons\tpunct-halfwidth\t:",+ "zh-CN\tdesktop:rightSidebar.review.writeDisabledNotice\tpunct-halfwidth\t:",+ "zh-CN\tdesktop:rightSidebar.review.writeDisabledReasons.agent-running\tterm-case\tagent:agent",+ "zh-CN\tdesktop:rightSidebar.tabs.empty.desc\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:rightSidebar.tabs.empty.pluginSub\tforbidden-term\tplugin:Plugin",+ "zh-CN\tdesktop:scheduler.editor.preRunHook.tooltip\tterm-case\tagent:agent",+ "zh-CN\tdesktop:scheduler.editor.script.capabilityWarn.ghostAsleep\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:scheduler.editor.script.capabilityWarn.ghostMissing\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:sessionShare.export.tooLarge\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:settings.about.debugLogDescription\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:settings.about.storage.cleanupDescription\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:settings.about.storage.cleanupResult\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:settings.about.storage.legacyUsage\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:settings.about.storage.reconcileDescription\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:settings.about.storage.reconcileHealthy\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:settings.about.storage.reconcileIssues\tpunct-halfwidth\t:",+ "zh-CN\tdesktop:settings.about.storage.reportCache\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:settings.about.storage.reportProtected\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:settings.about.storage.usageValue\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:settings.agentIsland.soundOptions.custom\tpunct-ellipsis\t...",+ "zh-CN\tdesktop:settings.agentIsland.soundOptions.customSelected\tpunct-halfwidth\t:",+ "zh-CN\tdesktop:settings.builtinTools.plugins.memory.description\tterm-case\tagent:agent",+ "zh-CN\tdesktop:settings.builtinTools.plugins.xdt_helper.description\tterm-case\tagent:agent",+ "zh-CN\tdesktop:settings.builtinTools.toggleHint\tterm-case\tagent:agent",+ "zh-CN\tdesktop:settings.chatEmbedding.cell.description\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:settings.compaction.card.hint\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:settings.compatMode.description\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:settings.computerUse.android.adb.preparing\tpunct-ellipsis\t...",+ "zh-CN\tdesktop:settings.computerUse.android.description\tterm-case\tagent:agent",+ "zh-CN\tdesktop:settings.computerUse.android.status.checking\tpunct-ellipsis\t...",+ "zh-CN\tdesktop:settings.computerUse.android.status.multipleDevices\tterm-case\tagent:agent",+ "zh-CN\tdesktop:settings.computerUse.android.status.preparing\tpunct-ellipsis\t...",+ "zh-CN\tdesktop:settings.computerUse.android.toggleHint\tterm-case\tagent:agent",+ "zh-CN\tdesktop:settings.computerUse.browser.description\tterm-case\tagent:agent",+ "zh-CN\tdesktop:settings.computerUse.browser.openForLoginHint\tterm-case\tagent:agent",+ "zh-CN\tdesktop:settings.computerUse.browser.toggleHint\tterm-case\tagent:agent",+ "zh-CN\tdesktop:settings.computerUse.browserBackend.description\tterm-case\tagent:agent",+ "zh-CN\tdesktop:settings.computerUse.browserBackend.external.description\tterm-case\tagent:agent",+ "zh-CN\tdesktop:settings.computerUse.browserBackend.rsbWebview.description\tterm-case\tagent:agent",+ "zh-CN\tdesktop:settings.computerUse.description\tterm-case\tagent:agent",+ "zh-CN\tdesktop:settings.computerUse.directControl.description\tterm-case\tagent:agent",+ "zh-CN\tdesktop:settings.computerUse.directControl.installing\tpunct-ellipsis\t...",+ "zh-CN\tdesktop:settings.computerUse.directControl.permissions.windowsHint\tterm-case\tagent:agent",+ "zh-CN\tdesktop:settings.computerUse.directControl.toggleHint\tterm-case\tagent:agent",+ "zh-CN\tdesktop:settings.connections.xai.logoutConfirm.description\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:settings.connections.xai.toast.loginFailed\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:settings.connections.xai.toast.logoutFailed\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:settings.contacts.deleteConfirm.description\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:settings.contacts.description\tpunct-halfwidth\t:",+ "zh-CN\tdesktop:settings.contacts.description\tterm-case\tagent:agent",+ "zh-CN\tdesktop:settings.contacts.detail.agentNotes\tterm-case\tagent:agent",+ "zh-CN\tdesktop:settings.contacts.detail.agentNotesPlaceholder\tpunct-halfwidth\t:",+ "zh-CN\tdesktop:settings.contacts.detail.pendingBanner\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:settings.contacts.detail.pendingBanner\tterm-case\tagent:agent",+ "zh-CN\tdesktop:settings.contacts.enable.description\tterm-case\tagent:agent",+ "zh-CN\tdesktop:settings.contacts.guide.hint\tpunct-halfwidth\t:",+ "zh-CN\tdesktop:settings.contacts.guide.prompt\tpunct-halfwidth\t:",+ "zh-CN\tdesktop:settings.contacts.import.doneSummary\tpunct-halfwidth\t:",+ "zh-CN\tdesktop:settings.contacts.import.groupPlaceholder\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:settings.contacts.import.needsReview\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:settings.contacts.import.permissionDenied\tpunct-halfwidth\t:",+ "zh-CN\tdesktop:settings.contacts.import.sourceSystemDesc\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:settings.contacts.list.empty\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:settings.contacts.list.empty\tterm-case\tagent:agent",+ "zh-CN\tdesktop:settings.contacts.merge.confirmDescription\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:settings.contacts.merge.hint\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:settings.devices.allowControlHint\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:settings.devices.description\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:settings.devices.empty\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:settings.devices.keepAwakeHint\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:settings.devices.keepAwakeHint\tterm-case\tagent:agent",+ "zh-CN\tdesktop:settings.devices.toast.deleteOnline\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:settings.devices.toast.keepAwakeOn\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:settings.discordBot.connectingAction\tpunct-ellipsis\t...",+ "zh-CN\tdesktop:settings.discordBot.disconnectingAction\tpunct-ellipsis\t...",+ "zh-CN\tdesktop:settings.discordBot.status.connecting\tpunct-ellipsis\t...",+ "zh-CN\tdesktop:settings.feishuBot.status.connecting\tpunct-ellipsis\t...",+ "zh-CN\tdesktop:settings.feishuBot.status.reconnecting\tpunct-ellipsis\t...",+ "zh-CN\tdesktop:settings.ghosts.connections.confirmDetail\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:settings.ghosts.detail.cindyPrefs.desc\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:settings.ghosts.detail.customSlotAsleep\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:settings.ghosts.detail.moreActions\tforbidden-term\tplugin:Plugin",+ "zh-CN\tdesktop:settings.ghosts.detail.permissionsDialogDescription\tforbidden-term\tplugin:Plugin",+ "zh-CN\tdesktop:settings.ghosts.detail.useDisabled\tforbidden-term\tplugin:Plugin",+ "zh-CN\tdesktop:settings.ghosts.errors.commandConflict\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:settings.ghosts.errors.generic\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:settings.ghosts.installConfirm.meta\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:settings.ghosts.installConfirm.metaWithAuthor\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:settings.ghosts.panelError.fused\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:settings.ghosts.perm.agentBackgroundDetail\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:settings.ghosts.perm.agentUserAction\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:settings.ghosts.perm.agentUserActionDetail\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:settings.ghosts.perm.cardExternalLink\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:settings.ghosts.perm.cardExternalLinkDetail\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:settings.ghosts.perm.cindyImageEdit\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:settings.ghosts.perm.cindyVideoEdit\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:settings.ghosts.perm.codeDetail\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:settings.ghosts.perm.codeDetailNetwork\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:settings.ghosts.perm.fsWriteDetail\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:settings.ghosts.perm.grantsTitle\tpunct-halfwidth\t:",+ "zh-CN\tdesktop:settings.ghosts.perm.networkConnectionsDetail\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:settings.ghosts.perm.networkSecretGhostInputDetail\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:settings.ghosts.perm.networkSecretIdentityDetail\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:settings.ghosts.perm.networkSecretOauthDetail\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:settings.ghosts.perm.nodeRuntimeDetail\tpunct-halfwidth\t:",+ "zh-CN\tdesktop:settings.ghosts.perm.nodeSecretDetail\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:settings.ghosts.perm.notifyDetail\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:settings.ghosts.perm.pickDetail\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:settings.ghosts.perm.resident\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:settings.ghosts.perm.sessionContextDetail\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:settings.ghosts.perm.subscribeAssistantReplyDetail\tpunct-halfwidth\t:",+ "zh-CN\tdesktop:settings.ghosts.perm.subscribeHooksDetail\tpunct-halfwidth\t:",+ "zh-CN\tdesktop:settings.ghosts.perm.subscribeTopics\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:settings.ghosts.projectBanner.desc\tpunct-halfwidth\t:",+ "zh-CN\tdesktop:settings.ghosts.toast.installedAsleep\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:settings.ghosts.trust.signedUnverified\tpunct-halfwidth\t:",+ "zh-CN\tdesktop:settings.ghosts.trust.verifiedPublisher\tpunct-halfwidth\t:",+ "zh-CN\tdesktop:settings.ghosts.uninstallConfirm.description\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:settings.help.workflows.item1\tterm-case\tagent:agent",+ "zh-CN\tdesktop:settings.help.workflows.item2\tterm-case\tagent:agent",+ "zh-CN\tdesktop:settings.imBot.tips.cindy\tpunct-halfwidth\t:",+ "zh-CN\tdesktop:settings.imBot.tips.personal\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:settings.imBot.tips.personalFeishuOnly\tpunct-halfwidth\t:",+ "zh-CN\tdesktop:settings.mcp.dialog.desc\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:settings.mcp.fields.tokenHelp\tpunct-halfwidth\t:",+ "zh-CN\tdesktop:settings.notifications.feishuHint\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:settings.personalization.placeholder\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:settings.providers.custom.deleteConfirm.description\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:settings.providers.custom.fields.apiKeyHelp\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:settings.providers.custom.protocol.claudeDesc\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:settings.providers.detail.emptyModelsConnected\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:settings.providers.detect.hintLoggedIn\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:settings.providers.models.refreshAria\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:settings.providers.models.refreshFailed\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:settings.providers.models.refreshNoNew\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:settings.providers.subtitle\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:settings.providers.wizard.authorizeFailed\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:settings.providers.wizard.createFailed\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:settings.providers.wizard.fetchFailed\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:settings.providers.wizard.modelsHint\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:settings.providers.wizard.oauthDesc\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:settings.providers.wizard.pickHint\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:settings.providers.xd.rotateConfirm.description\tpunct-halfwidth\t:",+ "zh-CN\tdesktop:settings.providers.xd.rotateFailed\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:settings.providers.xd.sync.modelsFetchFailed\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:settings.providers.xdSignin.desc\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:settings.remote.add.auth.keyHint\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:settings.remote.button.autoConnectTip\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:settings.remote.button.setupKeyTip\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:settings.remote.codexSync.warnShared\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:settings.remote.detail.button.syncAuthTip\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:settings.remote.empty.hint\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:settings.remote.keys.afterInstallHint\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:settings.remote.keys.agentTrouble.cmd.listAgent\tpunct-halfwidth\t:",+ "zh-CN\tdesktop:settings.remote.keys.agentTrouble.cmd.verifySock\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:settings.remote.keys.agentTrouble.fallbackBody\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:settings.remote.keys.agentTrouble.reason.agent_unavailable\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:settings.remote.keys.agentTrouble.reason.other\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:settings.remote.keys.encryptHint\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:settings.remote.keys.loading\tpunct-ellipsis\t...",+ "zh-CN\tdesktop:settings.remote.keys.nameHint\tpunct-ellipsis\t...",+ "zh-CN\tdesktop:settings.remote.keys.notInAgentTip\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:settings.remote.keys.passStorageNote\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:settings.remote.keys.pickOrGenerate\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:settings.remote.keys.runFromPowerShell\tpunct-halfwidth\t:",+ "zh-CN\tdesktop:settings.remote.keys.runFromTerminal\tpunct-halfwidth\t:",+ "zh-CN\tdesktop:settings.remote.keys.toast.generatedNotLoadedShort\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:settings.remote.keys.toast.unlockBadPassphrase\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:settings.remote.keys.unlockHint\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:settings.remote.silentInstall.failed\tpunct-halfwidth\t:",+ "zh-CN\tdesktop:settings.remote.silentInstall.installingAgent\tpunct-ellipsis\t...",+ "zh-CN\tdesktop:settings.remote.silentInstall.preparingRuntime\tpunct-ellipsis\t...",+ "zh-CN\tdesktop:settings.remote.silentInstall.starting\tpunct-ellipsis\t...",+ "zh-CN\tdesktop:settings.remote.startSession.confirmCreateDescription\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:settings.remote.startSession.confirmCreateTitle\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:settings.remote.startSession.errorWorkdirIsFile\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:settings.remote.startSession.hint\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:settings.remote.status.authenticating\tpunct-ellipsis\t...",+ "zh-CN\tdesktop:settings.remote.status.connecting\tpunct-ellipsis\t...",+ "zh-CN\tdesktop:settings.remote.status.reconnecting\tpunct-ellipsis\t...",+ "zh-CN\tdesktop:settings.remote.toast.codexSyncDoneDaemonRestartFailed\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:settings.remoteControl.accessRevokedByPeer\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:settings.remoteControl.description\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:settings.remoteControl.hook.form.aliasPlaceholder\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:settings.remoteControl.hook.loginRequired\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:settings.remoteControl.hook.multi.removeDisplacedConfirmDescription\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:settings.remoteControl.hook.notInstalled.hint\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:settings.remoteControl.hook.notInstalled.waitingHint\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:settings.remoteControl.revokeConfirm.description\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:settings.shortcuts.items.close-tab-or-window.description\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:settings.silentEncryptedRetry.cell.description\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:settings.tina.prefs.serverUnsupported\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:settings.userProfile.edit.saveFailed\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:settings.userProfile.edit.syncHint\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:settings.windowBehavior.swallowActivationClickHint\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:sidebar.user.reopenUpdateBanner\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:sidebar.user.settingsLink\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:skillhub.detail.uninstallFailed\tpunct-halfwidth\t:",+ "zh-CN\tdesktop:skillhub.diffPanel.binarySizeChanged\tpunct-halfwidth\t:",+ "zh-CN\tdesktop:skillhub.diffPanel.binarySizeNew\tpunct-halfwidth\t:",+ "zh-CN\tdesktop:skillhub.diffPanel.binarySizeRemoved\tpunct-halfwidth\t:",+ "zh-CN\tdesktop:skillhub.market.categoryLabel\tpunct-halfwidth\t:",+ "zh-CN\tdesktop:skillhub.market.loadFailed\tpunct-halfwidth\t:",+ "zh-CN\tdesktop:skillhub.market.loading\tpunct-ellipsis\t...",+ "zh-CN\tdesktop:skillhub.publishDialog.categoryLoading\tpunct-ellipsis\t...",+ "zh-CN\tdesktop:skillhub.publishDialog.renameFailed\tpunct-halfwidth\t:",+ "zh-CN\tdesktop:skillhub.publishDialog.skillNameFormat\tpunct-halfwidth\t:",+ "zh-CN\tdesktop:skillhub.welcome.emptyTitle\tterm-case\tagent:agent",+ "zh-CN\tdesktop:splash.tips.checkingEnv\tpunct-ellipsis\t...",+ "zh-CN\tdesktop:splash.tips.checkingUpdate\tpunct-ellipsis\t...",+ "zh-CN\tdesktop:splash.tips.updateDone\tpunct-ellipsis\t...",+ "zh-CN\tdesktop:splash.tips.updating\tpunct-ellipsis\t...",+ "zh-CN\tdesktop:splash.tips.waking\tpunct-ellipsis\t...",+ "zh-CN\tdesktop:titleBar.updateCheckToast.downloadFailed\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:titleBar.updateCheckToast.downloading\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:titleBar.updateCheckToast.manifestFailed\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:titleBar.updateCheckToast.ready\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:todaySpend.claude.limitRejected\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:todaySpend.codex.limitReached\tpunct-halfwidth\t:",+ "zh-CN\tdesktop:todaySpend.tooltip.nextReset\tpunct-halfwidth\t:",+ "zh-CN\tdesktop:todaySpend.tooltip.softLimitFormula\tpunct-halfwidth\t:",+ "zh-CN\tdesktop:todaySpend.xai.noQuotaDetail\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:update.banner.dismissAria\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:usageDashboard.anomalyTooltip\tpunct-halfwidth\t,",+ "zh-CN\tdesktop:voiceInputOverlay.placeholder\tpunct-ellipsis\t...",+ "zh-CN\tmobile/composer:upload.failedHttp\tpunct-halfwidth\t:",+ "zh-CN\tmobile/composer:upload.failedNetwork\tpunct-halfwidth\t:",+ "zh-CN\tmobile/composer:upload.incompleteRead\tpunct-halfwidth\t:",+ "zh-CN\tmobile/composer:upload.invalidSize\tpunct-halfwidth\t,",+ "zh-CN\tmobile/composer:upload.sizeChanged\tpunct-halfwidth\t:",+ "zh-CN\tmobile/composer:upload.timeout\tpunct-halfwidth\t,",+ "zh-CN\tmobile/composer:voice.uploadFailed\tpunct-halfwidth\t:",+ "zh-CN\tmobile/devices:automations.delete.archiveDesc\tpunct-halfwidth\t,",+ "zh-CN\tmobile/devices:automations.delete.copy\tpunct-halfwidth\t,",+ "zh-CN\tmobile/devices:automations.delete.counting\tpunct-ellipsis\t...",+ "zh-CN\tmobile/devices:automations.delete.deleteDesc\tpunct-halfwidth\t,",+ "zh-CN\tmobile/devices:automations.delete.keepDesc\tpunct-halfwidth\t,",+ "zh-CN\tmobile/devices:automations.detail.promptScriptFallback\tpunct-halfwidth\t,",+ "zh-CN\tmobile/devices:automations.form.scriptHint\tpunct-halfwidth\t,",+ "zh-CN\tmobile/devices:automations.form.sessionMode.bound\tpunct-halfwidth\t,",+ "zh-CN\tmobile/devices:automations.form.sessionMode.persistent\tpunct-halfwidth\t,",+ "zh-CN\tmobile/devices:automations.runDelete.copy\tpunct-halfwidth\t,",+ "zh-CN\tmobile/files:browser.noWorkdir\tpunct-halfwidth\t,",+ "zh-CN\tmobile/files:browser.shareFailed\tpunct-halfwidth\t,",+ "zh-CN\tmobile/files:export.exportTimeout\tpunct-halfwidth\t,",+ "zh-CN\tmobile/files:export.leftPage\tpunct-halfwidth\t,",+ "zh-CN\tmobile/files:preview.binaryFile\tpunct-halfwidth\t,",+ "zh-CN\tmobile/files:preview.fetchAvFailed\tpunct-halfwidth\t:",+ "zh-CN\tmobile/files:preview.fetchOriginalFailed\tpunct-halfwidth\t:",+ "zh-CN\tmobile/files:preview.fetchPdfFailed\tpunct-halfwidth\t:",+ "zh-CN\tmobile/files:preview.originalFailedThumb\tpunct-halfwidth\t,",+ "zh-CN\tmobile/interaction:collab.batchBodyFallback\tterm-case\tworker:worker",+ "zh-CN\tmobile/interaction:collab.batchTitle\tterm-case\tworker:worker",+ "zh-CN\tmobile/interaction:collab.batchTitleGeneric\tterm-case\tworker:worker",+ "zh-CN\tmobile/interaction:collab.dispatchBodyFallback\tterm-case\tworker:worker",+ "zh-CN\tmobile/interaction:collab.dispatchTitle\tterm-case\tworker:worker",+ "zh-CN\tmobile/interaction:collab.reportTitle\tterm-case\tworker:worker",+ "zh-CN\tmobile/interaction:collab.sendTitle\tterm-case\tworker:worker",+ "zh-CN\tmobile/interaction:contextSheet.goalPlaceholder\tterm-case\tagent:agent",+ "zh-CN\tmobile/interaction:contextSheet.icloudTimeout\tpunct-halfwidth\t,",+ "zh-CN\tmobile/interaction:panel.customAnswerButtonText\tpunct-ellipsis\t...",+ "zh-CN\tmobile/interaction:panel.queueSwitchTo\tpunct-halfwidth\t:",+ "zh-CN\tmobile/message:queue.aborting\tpunct-halfwidth\t,",+ "zh-CN\tmobile/message:queue.paused\tpunct-halfwidth\t,",+ "zh-CN\tmobile/message:queue.sendFailedMessage\tpunct-halfwidth\t:",+ "zh-CN\tmobile/message:queue.sendingMessage\tpunct-halfwidth\t:",+ "zh-CN\tmobile/message:queue.steeringLabel\tpunct-halfwidth\t:",+ "zh-CN\tmobile/message:renderer.mediaDownloadUrl\tpunct-halfwidth\t:",+ "zh-CN\tmobile/message:renderer.mediaErrorLine\tpunct-halfwidth\t:",+ "zh-CN\tmobile/message:renderer.mediaExpiresAt\tpunct-halfwidth\t:",+ "zh-CN\tmobile/message:renderer.mediaSize\tpunct-halfwidth\t:",+ "zh-CN\tmobile/message:renderer.mediaSourceUrl\tpunct-halfwidth\t:",+ "zh-CN\tmobile/message:renderer.mermaidRenderIncompleteBody\tpunct-halfwidth\t,",+ "zh-CN\tmobile/message:renderer.modelMismatch\tpunct-halfwidth\t,",+ "zh-CN\tmobile/message:renderer.newMessagesToBottom\tpunct-halfwidth\t,",+ "zh-CN\tmobile/message:renderer.subagent\tterm-case\tagent:agent",+ "zh-CN\tmobile/message:renderer.subagentSummary\tterm-case\tagent:agent",+ "zh-CN\tmobile/message:renderer.subagentTyped\tterm-case\tagent:agent",+ "zh-CN\tmobile/message:systemCard.learnBusyBody\tpunct-halfwidth\t,",+ "zh-CN\tmobile/message:systemCard.learnFailedBody\tpunct-halfwidth\t:",+ "zh-CN\tmobile/message:systemCard.learnStartedBody\tpunct-halfwidth\t,",+ "zh-CN\tmobile/models:picker.permissionModeAccessibility\tpunct-halfwidth\t:",+ "zh-CN\tmobile/models:picker.searchPlaceholder\tpunct-ellipsis\t...",+ "zh-CN\tmobile/session:menu.noExtraDirs\tterm-case\tagent:agent",+ "zh-CN\tmobile/session:new.modelAccessibility\tpunct-halfwidth\t:",+ "zh-CN\tmobile/session:new.previewAttachments\tpunct-halfwidth\t:",+ "zh-CN\tmobile/session:new.previewDevice\tpunct-halfwidth\t:",+ "zh-CN\tmobile/session:new.previewFirstAttachmentOnly\tpunct-halfwidth\t:",+ "zh-CN\tmobile/session:new.previewFirstEmpty\tpunct-halfwidth\t:",+ "zh-CN\tmobile/session:new.previewFirstMessage\tpunct-halfwidth\t:",+ "zh-CN\tmobile/session:new.previewLocation\tpunct-halfwidth\t:",+ "zh-CN\tmobile/session:new.previewRuntime\tpunct-halfwidth\t:",+ "zh-CN\tmobile/session:new.readingRemoteDir\tpunct-ellipsis\t...",+ "zh-CN\tmobile/session:row.attachmentUploadFailed\tpunct-halfwidth\t,",+ "zh-CN\tmobile/session:screen.attachmentsUploadingBeforeEdit\tpunct-halfwidth\t,",+ "zh-CN\tmobile/session:screen.editQueueUnsupported\tpunct-halfwidth\t,",+ "zh-CN\tmobile/session:screen.goalAlreadyActive\tpunct-halfwidth\t,",+ "zh-CN\tmobile/session:screen.queueMessageGone\tpunct-halfwidth\t,",+ "zh-CN\tmobile/session:screen.savingHint\tpunct-halfwidth\t,",+ "zh-CN\tmobile/session:screen.savingPreviousQueueEdit\tpunct-halfwidth\t,",+ "zh-CN\tmobile/session:screen.sessionDeviceNotFound\tpunct-halfwidth\t,",+ "zh-CN\tmobile/session:screen.shareUnsupported\tpunct-halfwidth\t,",+ "zh-CN\tmobile/settings:notifications.taskDoneHint\tpunct-halfwidth\t,",+ "zh-CN\tmobile/settings:notifications.unregisterQueued\tpunct-halfwidth\t,",+ "zh-CN\tmobile/update:bundleAvailableBody\tpunct-halfwidth\t,",+ "zh-CN\tmobile/update:checkFailedBody\tpunct-halfwidth\t,",+ "zh-CN\tmobile/update:installHintBody\tpunct-halfwidth\t,",+ "zh-CN\tmobile/update:latestRequestFailed\tpunct-halfwidth\t:",+ "zh-CN\tmobile/update:releaseNotes\tpunct-halfwidth\t:"+ ]+}diff --git a/i18n/glossary.json b/i18n/glossary.jsonnew file mode 100644index 0000000000..22bf5ca2f0--- /dev/null+++ b/i18n/glossary.json@@ -0,0 +1,313 @@+{+ "$schema": "./glossary.schema.json",+ "version": 1,+ "locales": ["en", "zh-CN", "ja", "ko"],+ "sourceLocale": "en",+ "terms": [+ {+ "id": "agent",+ "status": "decided",+ "en": "Agent",+ "translations": {+ "zh-CN": "Agent",+ "ja": "エージェント",+ "ko": "에이전트"+ },+ "forbidden": {+ "zh-CN": ["智能体"]+ },+ "note": "产品一级概念,中文保留英文原词(现状 44:5 已是主流)。「代理」一词在中文 UI 里整体废弃——Agent 与 Proxy 都保留英文,不共用这个译名(2026-07 裁决);该词的 forbidden 规则统一登记在 proxy 条目下,避免同一处违规被两个术语重复报告。引入术语表时全仓仅 9 处「代理」,已全部清理为 Agent / Subagent / Proxy。ja / ko 沿用既有片假名 / 한글 音译,不受本条约束。豁免 settings.remote 整段:那里的 agent 指 ssh-agent(英文原文即 \"SSH agent\" / \"probe agent\"),是与产品 Agent 同形的另一个概念。",+ "exempt": [+ "desktop:settings.remote."+ ]+ },+ {+ "id": "subagent",+ "status": "decided",+ "en": "Subagent",+ "translations": {+ "zh-CN": "Subagent",+ "ja": "サブエージェント",+ "ko": "하위 에이전트"+ },+ "forbidden": {},+ "note": "Agent 的派生概念,中文跟随 Agent 保留英文原词,不译「子代理」——「代理」在中文 UI 已整体废弃。「子代理」含「代理」,由 proxy 条目的 forbidden 统一拦截,这里不重复登记。ja / ko 沿用既有音译。"+ },+ {+ "id": "proxy",+ "status": "decided",+ "en": "Proxy",+ "translations": {+ "zh-CN": "Proxy",+ "ja": "プロキシ",+ "ko": "프록시"+ },+ "forbidden": {+ "zh-CN": ["代理"]+ },+ "note": "网络代理,中文保留英文原词(2026-07 裁决:Agent 与 Proxy 都不叫「代理」)。这条 forbidden 同时兜住 Agent / Subagent 的误译——「代理」在 zh-CN 文案里一律视为违规,无论它来自哪个英文词。ja / ko 沿用既有音译。不设 exempt:本条只禁中文「代理」,settings.remote 里的 ssh-agent 是英文、不会命中,加豁免只会平白削弱门禁。"+ },+ {+ "id": "plugin",+ "status": "decided",+ "en": "Plugin",+ "translations": {+ "zh-CN": "插件",+ "ja": "プラグイン",+ "ko": "플러그인"+ },+ "forbidden": {+ "zh-CN": ["Plugin", "plugin"]+ },+ "note": "中文一律「插件」,不保留英文原词(现状 94:4)。历史上 Ghost / Plugin 两种叫法并存,对外统一为「插件」。",+ "exempt": []+ },+ {+ "id": "project",+ "status": "decided",+ "en": "Project",+ "translations": {+ "zh-CN": "项目",+ "ja": "プロジェクト",+ "ko": "프로젝트"+ },+ "forbidden": {+ "zh-CN": ["Project"]+ },+ "note": "中文一律「项目」(现状 119:15)。同一个侧边栏里筛选叫「项目」、批量操作提示叫「Project」是既有 bug。小写 project 不入 forbidden——它常出现在路径与文件名里(project.json)。",+ "exempt": []+ },+ {+ "id": "worker",+ "status": "decided",+ "en": "Worker",+ "translations": {+ "zh-CN": "Worker",+ "ja": "Worker",+ "ko": "Worker"+ },+ "forbidden": {},+ "note": "Orca 协同角色名,四语统一保留英文。这里只钉大小写形态:首字母大写 Worker。小写 worker 由 guard 的大小写规则单独覆盖(desktop 26:13 混用、mobile 一律小写)。"+ },++ {+ "id": "session",+ "status": "decided",+ "en": "Session",+ "translations": {+ "zh-CN": "对话",+ "ja": "セッション",+ "ko": "세션"+ },+ "checkCase": false,+ "forbidden": {+ "zh-CN": ["会话"]+ },+ "note": "面向用户一律叫「对话」——「会话」太生硬难懂(2026-07 裁决)。代码与内部标识仍用 Session,本条只约束 UI 文案。Chat 合并到同一个词,见 chat 条目。落地时把 440 处「会话」+ 22 处「聊天」统一改为「对话」。ja / ko 沿用既有音译,不受本条约束。豁免的 4 处是同形异义的技术 session(登录态、WebSocket 语音连接),与产品对话无关——注意 login.errors 的「绑定会话」指账号绑定态,scheduler 的「绑定对话」才是产品对话,两者同名不同义,靠 key 精确区分。",+ "exempt": [+ "desktop:login.errors.INVALID_LOGIN_TICKET",+ "desktop:login.errors.INVALID_BIND_TICKET",+ "mobile/composer:voice.missingConnectionProvider",+ "mobile/composer:voice.sessionExpiredOrForbidden",+ "mobile/composer:voice.sessionNotConnected"+ ]+ },+ {+ "id": "chat",+ "status": "decided",+ "en": "Chat",+ "translations": {+ "zh-CN": "对话",+ "ja": "チャット",+ "ko": "채팅"+ },+ "checkCase": false,+ "forbidden": {+ "zh-CN": ["聊天"]+ },+ "note": "在本产品里 Chat 与 Session 指同一个东西,中文统一叫「对话」(2026-07 裁决),不再区分「聊天 / 会话 / 对话」三套说法。原先 22 处「聊天」(聊天正文、聊天区、聊天记录…)已一并改为「对话」。ja / ko 保留各自既有译法,两语没有中文这种三词混用问题。"+ },+ {+ "id": "thread",+ "status": "decided",+ "en": "Thread",+ "translations": {+ "zh-CN": "对话",+ "ja": "スレッド",+ "ko": "스레드"+ },+ "checkCase": false,+ "alsoAllowed": {+ "zh-CN": [+ { "text": "thread", "when": "指 Codex 的 thread 这一外部系统概念时(导入历史、thread 上下文),保留英文" },+ { "text": "评论", "when": "指 GitHub PR 的 review thread 时,用「review 评论」" }+ ]+ },+ "forbidden": {+ "zh-CN": ["线程"]+ },+ "note": "全仓仅 8 处,按语境分四类,是「同一个词必须分场合翻译」的典型:①指产品内的对话 → 跟随 session 叫「对话」(已落地 3 处);②Codex 外部概念 → 保留 thread;③GitHub PR review thread →「review 评论」;④比喻用法 \"persistent work thread\" → 原译「工作线程」,中文有 OS 线程歧义,已改写为「持续推进的工作对话」。「线程」一律禁用。"+ },+ {+ "id": "skill",+ "status": "decided",+ "en": "Skill",+ "translations": {+ "zh-CN": "技能",+ "ja": "スキル",+ "ko": "스킬"+ },+ "alsoAllowed": {+ "zh-CN": [+ { "text": "Skill", "when": "技术语境下指代具体的 skill 文件 / 目录结构时,可保留英文" }+ ]+ },+ "forbidden": {},+ "note": "中文用「技能」(现状 32:26 领先)。偶尔保留英文 Skill 是允许的,因此不设 forbidden——硬性禁用会逼出别扭的中文。SkillHub 作为产品名保留英文,单独登记在 skillhub 条目。",+ "exempt": []+ },+ {+ "id": "skillhub",+ "status": "decided",+ "en": "SkillHub",+ "translations": {+ "zh-CN": "SkillHub",+ "ja": "SkillHub",+ "ko": "SkillHub"+ },+ "forbidden": {},+ "note": "产品名,四语一律保留英文原样(暂定保留,未来若做中文名再改)。注意与 skill 条目区分:侧边栏 tab 现在叫「技能」但实际指 SkillHub,创建面板的「技能」指 Skills——这是既有 bug,两者不是一个东西不该同名,清理存量时需一并处理。"+ },+ {+ "id": "issue",+ "status": "decided",+ "en": "Issue",+ "translations": {+ "zh-CN": "Issue",+ "ja": "Issue",+ "ko": "Issue"+ },+ "checkCase": false,+ "forbidden": {+ "zh-CN": ["工单", "议题"]+ },+ "note": "保留英文(2026-07 裁决)。现状「工单」32 /「议题」4 是既有 bug 的来源:列表按钮写「新建议题」、点进去页面标题写「新建工单」。「问题」不入 forbidden——它在「修复问题和失败」这类泛指语境下是正常中文,不是 Issue 的误译。checkCase 关闭:issue 同时是常用英语单词,prompt 模板里的 \"fix the issue\" 是正常用法,做大小写约束会制造 9 处假阳性。"+ },+ {+ "id": "provider",+ "status": "decided",+ "en": "Provider",+ "translations": {+ "zh-CN": "供应商",+ "ja": "プロバイダー",+ "ko": "제공업체"+ },+ "alsoAllowed": {+ "zh-CN": [+ { "text": "模型供应商", "when": "首次出现或需要消歧时用全称,如设置页标题" }+ ]+ },+ "forbidden": {+ "zh-CN": ["提供方", "提供商"]+ },+ "note": "中文用「供应商」(现状 36:18 领先简称)。全称「模型供应商」在需要消歧的位置仍可用。「提供商」「提供方」是同义漂移,禁用——设置页标题写「模型供应商」、它自己的表单写「提供商」是既有 bug。豁免 login.ssoVerificationSubtitle:那里的「身份提供方」是 SSO / SAML 领域 Identity Provider 的标准中文术语,与模型供应商是两个概念。",+ "exempt": [+ "desktop:login.ssoVerificationSubtitle"+ ]+ },+ {+ "id": "effort",+ "status": "decided",+ "en": "Effort",+ "translations": {+ "zh-CN": "推理强度",+ "ja": "推論強度",+ "ko": "추론 강도"+ },+ "forbidden": {+ "zh-CN": ["思考强度", "思考深度", "推理深度", "努力程度", "推理力度"]+ },+ "note": "模型的推理投入档位(low/medium/high/…)。用「推理强度」有三重依据:①同类工具 i18n 里断层第一(GitHub 代码搜索共现量级 1452,第二名「思考强度」431);②OpenAI 简中帮助中心即用此词;③跨 provider 中立——Cindy 的 create_worker 用一个 effort 同时映射 Codex reasoning effort 与 Claude thinking 预算,而 Anthropic 官方简中叫「努力程度」、OpenAI 叫「推理强度」,需要不偏向任一方的词。禁用项各有硬理由:「思考深度」「推理深度」会与国内产品普遍的「深度思考」开关撞车,且语义错误(低 effort 是想得少,不是想得浅);「努力程度」在中文里强烈指向人的绩效评价;「推理等级/级别」未入禁用但不推荐——Cindy 已有 model tier 概念,「等级」易被读成模型档位。"+ },+ {+ "id": "credits",+ "status": "decided",+ "en": "Credits",+ "translations": {+ "zh-CN": "点数",+ "ja": "クレジット",+ "ko": "크레딧"+ },+ "checkCase": false,+ "alsoAllowed": {+ "zh-CN": [+ { "text": "credits", "when": "指第三方服务自身的 credits(如 Codex / ChatGPT 订阅余量),保留其原生叫法" },+ { "text": "重置次数", "when": "reset credits——指可用的配额重置次数,与计费点数无关" }+ ]+ },+ "forbidden": {+ "zh-CN": ["额度"]+ },+ "note": "计费点数用「点数」。清理前中文「额度」同时对应 Balance / Credits / Quota 三个英文概念,是计费面板里最容易误导用户的一处:同一个 billing 页面里「点数」和「额度」并存,而「额度」在别处又指配额。裁决把三者拆开——Credits =「点数」、Quota =「配额」、Balance =「余额」,「额度」整体退出。第三方原生 credits 与 reset credits 属不同概念,走 alsoAllowed。"+ },+ {+ "id": "quota",+ "status": "decided",+ "en": "Quota",+ "translations": {+ "zh-CN": "配额",+ "ja": "クォータ",+ "ko": "쿼터"+ },+ "checkCase": false,+ "forbidden": {},+ "note": "周期内的使用上限用「配额」(现状已有 3 处这么写)。与 credits 条目一起裁决:「额度」原先同时表示 Balance / Credits / Quota,三个概念在计费与限额提示里互相污染。「额度」的 forbidden 统一登记在 credits 条目下,不在这里重复——一个词只归属一个术语,否则同一处违规会被两个术语各报一次。"+ },+ {+ "id": "balance",+ "status": "decided",+ "en": "Balance",+ "translations": {+ "zh-CN": "余额",+ "ja": "残高",+ "ko": "잔액"+ },+ "checkCase": false,+ "forbidden": {},+ "note": "账户余额用「余额」。原先被并入「额度」(可用额度 / 额度更新于 / 剩余额度),与 Credits、Quota 混同。Balance 是「账上还剩多少」,Credits 是「可购买消耗的计数单位」,Quota 是「周期内上限」——三者是不同层面的量,中文必须分开。"+ },+ {+ "id": "automation",+ "status": "decided",+ "en": "Automation",+ "translations": {+ "zh-CN": "自动化",+ "ja": "オートメーション",+ "ko": "자동화"+ },+ "alsoAllowed": {+ "zh-CN": [+ { "text": "自动任务", "when": "指单条自动化实例(一个定时跑的任务)时" },+ { "text": "自动化任务", "when": "需要与模块名区分、强调它是一条任务时" },+ { "text": "自动操作", "when": "Computer Use 语境——「自动操作电脑 / 浏览器」,指代操控设备而非定时任务" }+ ]+ },+ "forbidden": {},+ "note": "模块名 / 能力名用「自动化」(现状 88 处主流);指单条实例时用「自动任务」,这是刻意保留的场景差异——一刀切会写出「查看你的自动化」这类别扭中文。特别注意 Automation 在本产品里指两个不同概念:scheduler 的定时任务,以及 settings.computerUse 的操控电脑能力;后者用「自动操作电脑 / 浏览器」,改成「自动化电脑」反而不通。因此不设 forbidden。"+ },+ {+ "id": "usage",+ "status": "decided",+ "en": "Usage",+ "translations": {+ "zh-CN": "用量",+ "ja": "使用量",+ "ko": "사용량"+ },+ "forbidden": {+ "zh-CN": ["使用情况", "使用表现"]+ },+ "note": "中文用「用量」(现状 37:6 压倒性)。「使用情况」「使用表现」是同义漂移,禁用。注意 usage 在英文里也有「用法」义(如 CLI usage),那属于另一个概念,不在本条约束范围。"+ }+ ]+}diff --git a/i18n/glossary.schema.json b/i18n/glossary.schema.jsonnew file mode 100644index 0000000000..15ee271bdc--- /dev/null+++ b/i18n/glossary.schema.json@@ -0,0 +1,96 @@+{+ "$schema": "http://json-schema.org/draft-07/schema#",+ "$id": "https://github.com/makecindy/cindy/i18n/glossary.schema.json",+ "title": "Cindy i18n Glossary",+ "description": "产品术语表正本。desktop / mobile / 脚本 / AI agent 共用的唯一事实源。",+ "type": "object",+ "required": ["version", "locales", "sourceLocale", "terms"],+ "additionalProperties": false,+ "properties": {+ "version": {+ "type": "integer",+ "description": "schema 版本;破坏性结构调整时 +1,guard 会拒绝不认识的版本。"+ },+ "locales": {+ "type": "array",+ "description": "术语表覆盖的语言,必须与 SUPPORTED_LOCALES 一致。",+ "items": { "type": "string" },+ "minItems": 1+ },+ "sourceLocale": {+ "type": "string",+ "description": "源语言(术语的 en 字段所属语言),当前为 en。"+ },+ "terms": {+ "type": "array",+ "items": { "$ref": "#/definitions/term" }+ }+ },+ "definitions": {+ "term": {+ "type": "object",+ "required": ["id", "status", "en", "translations", "note"],+ "additionalProperties": false,+ "properties": {+ "id": {+ "type": "string",+ "pattern": "^[a-z0-9-]+$",+ "description": "稳定标识,kebab-case。baseline 用它做锚点,改名会让 baseline 失效。"+ },+ "status": {+ "enum": ["decided", "proposed"],+ "description": "decided = 已裁决,forbidden 命中即阻断 CI。proposed = 待讨论,只输出警告,用于承载尚未拍板的术语。"+ },+ "en": {+ "type": "string",+ "description": "英文标准形态(源语言)。"+ },+ "translations": {+ "type": "object",+ "description": "各语言的首选译法(默认场景用它)。值为空字符串表示「保留英文原词」。",+ "additionalProperties": { "type": "string" }+ },+ "alsoAllowed": {+ "type": "object",+ "description": "场景化译法:同一个词在特定语境下允许的其他说法。翻译要贴合语境,一刀切的强制映射会写出别扭的中文——例如 Automation 作模块名是「自动化」,指单条实例时是「自动任务」。这些词不会被 guard 拦截;每条必须写明 when(什么场合用),否则等于没有约束力。",+ "additionalProperties": {+ "type": "array",+ "items": {+ "type": "object",+ "required": ["text", "when"],+ "additionalProperties": false,+ "properties": {+ "text": { "type": "string", "description": "该场景下的译法" },+ "when": { "type": "string", "description": "适用场合,写具体——「指单条自动化实例时」而非「视情况」" }+ }+ }+ }+ },+ "forbidden": {+ "type": "object",+ "description": "各语言的禁用译法。命中即违规(decided 阻断 / proposed 警告)。",+ "additionalProperties": {+ "type": "array",+ "items": { "type": "string" }+ }+ },+ "note": {+ "type": "string",+ "description": "裁决理由。必填——没有理由的术语裁决会被后人反复推翻。"+ },+ "checkCase": {+ "type": "boolean",+ "description": "是否检查大小写形态,默认 true。对同时是常用英语单词的术语(Issue、Session、Chat)必须设 false:英文句子里的 \"fix the issue\" 是正常用法,强行要求大写会在 prompt 模板和英文文案里制造大批假阳性。只有 Worker、Agent 这类「在文案里出现即指产品概念」的词才适合做大小写约束。"+ },+ "exempt": {+ "type": "array",+ "description": "豁免的 key 路径。两种形式:完整路径精确匹配(desktop:settings.x.y),或以 . 结尾的子树前缀(desktop:settings.remote.)用于整段同形异义场景。绝不支持按末段 key 名匹配——那会让任意同名嵌套 key 被静默放过。每条豁免都应在 note 里说明理由。",+ "items": {+ "type": "string",+ "pattern": "^(desktop|mobile/[a-zA-Z]+):.+$"+ }+ }+ }+ }+ }+}diff --git a/package.json b/package.jsonindex dc888edb4c..d27dde8442 100644--- a/package.json+++ b/package.json@@ -97,13 +97,16 @@"build": "node scripts/ensure-deps.mjs && pnpm --filter desktop build","release:package": "node scripts/ensure-deps.mjs && node apps/desktop/scripts/package-desktop.mjs","check:i18n": "node scripts/check-i18n.mjs",+ "check:i18n-glossary": "node scripts/check-i18n-glossary.mjs",+ "check:i18n-glossary:report": "node scripts/check-i18n-glossary.mjs --report",+ "i18n:glossary-doc": "node scripts/generate-glossary-doc.mjs","check:brand-terminology": "node scripts/brand-terminology-guard.mjs","check:endpoints": "node scripts/check-endpoint-literals.mjs","check:dev-docs": "node --test scripts/__tests__/dev-docs-contract.test.mjs","licenses:generate": "node scripts/generate-third-party-notices.mjs","lint": "pnpm -r lint","format": "pnpm -r format",- "test:runner": "node --test scripts/__tests__/test-workspaces.test.mjs scripts/__tests__/dev-docs-contract.test.mjs scripts/__tests__/restart-desktop-remote.test.mjs scripts/__tests__/dev-migration-policy.test.mjs scripts/__tests__/ensure-deps.test.mjs scripts/__tests__/client-endpoint-build-env.test.mjs scripts/__tests__/endpoint-consistency.test.mjs scripts/__tests__/endpoint-local-file.test.mjs scripts/__tests__/ensure-agent-binaries.test.mjs scripts/__tests__/fetch-with-timeout.test.mjs scripts/__tests__/agent-binary-cdn-fallback.test.mjs scripts/__tests__/ensure-binary-fallback.test.mjs scripts/__tests__/verify-sha256.test.mjs scripts/__tests__/migration-freeze.test.mjs scripts/__tests__/third-party-notices.test.mjs scripts/__tests__/brand-identity-sync.test.mjs",+ "test:runner": "node --test scripts/__tests__/test-workspaces.test.mjs scripts/__tests__/dev-docs-contract.test.mjs scripts/__tests__/restart-desktop-remote.test.mjs scripts/__tests__/dev-migration-policy.test.mjs scripts/__tests__/ensure-deps.test.mjs scripts/__tests__/client-endpoint-build-env.test.mjs scripts/__tests__/endpoint-consistency.test.mjs scripts/__tests__/endpoint-local-file.test.mjs scripts/__tests__/ensure-agent-binaries.test.mjs scripts/__tests__/fetch-with-timeout.test.mjs scripts/__tests__/agent-binary-cdn-fallback.test.mjs scripts/__tests__/ensure-binary-fallback.test.mjs scripts/__tests__/verify-sha256.test.mjs scripts/__tests__/migration-freeze.test.mjs scripts/__tests__/third-party-notices.test.mjs scripts/__tests__/brand-identity-sync.test.mjs scripts/__tests__/glossary-rules.test.mjs","test:unit": "pnpm test:runner && node scripts/test-workspaces.mjs --tier unit","test:all": "pnpm test:runner && node scripts/test-workspaces.mjs --all","test:db": "pnpm test:runner && node scripts/test-workspaces.mjs --tier db",diff --git a/scripts/__tests__/glossary-rules.test.mjs b/scripts/__tests__/glossary-rules.test.mjsnew file mode 100644index 0000000000..ef8d6f7e06--- /dev/null+++ b/scripts/__tests__/glossary-rules.test.mjs@@ -0,0 +1,266 @@+/**+ * 术语表 guard 规则函数的单测。+ *+ * 这里每一条断言都对应一个真实踩过的坑或一条有数据依据的裁决,不是为覆盖率凑数:+ * 误报会让门禁被绕过或被关掉,漏报会让门禁形同虚设,两边都要钉住。+ */+import assert from 'node:assert/strict';+import fs from 'node:fs';+import path from 'node:path';+import test from 'node:test';+import { fileURLToPath } from 'node:url';++import {+ ELLIPSIS_LOCALES,+ HALFWIDTH_PUNCT_LOCALES,+ findCaseMismatch,+ findHalfWidthPunct,+ hasAsciiEllipsis,+ makeExemptChecker,+ occursIn,+ stripNonProse,+} from '../shared/glossary-rules.mjs';+import { renderGlossaryDoc } from '../shared/glossary-doc.mjs';++const ROOT = path.resolve(fileURLToPath(new URL('../..', import.meta.url)));++// ---------------------------------------------------------------------------+// occursIn:词边界+// ---------------------------------------------------------------------------++test('occursIn: 连字符复合词不算命中(ssh-agent ≠ 产品 Agent)', () => {+ // 这是引入 guard 时最大的一批假阳性来源:SSH 密钥代理与产品 Agent 同形但无关。+ assert.equal(occursIn('密钥已加载到 ssh-agent', 'agent'), false);+ assert.equal(occursIn('检查 user-agent 头', 'agent'), false);+ assert.equal(occursIn('字段 agent_id 缺失', 'agent'), false);+ // 独立成词时必须命中,否则门禁形同虚设。+ assert.equal(occursIn('展开 agent 设置', 'agent'), true);+});++test('occursIn: 允许复数但不误伤更长的标识符', () => {+ assert.equal(occursIn('更多 Plugin 操作', 'Plugin'), true);+ assert.equal(occursIn('已安装 Plugins', 'Plugin'), true);+ assert.equal(occursIn('PluginRegistry 初始化', 'Plugin'), false);+});++test('occursIn: 中文术语按子串匹配(无词边界概念)', () => {+ assert.equal(occursIn('这是代理设置', '代理'), true);+ assert.equal(occursIn('这是插件设置', '代理'), false);+});++test('occursIn: 大小写敏感 —— forbidden 区分 Plugin 与 plugin', () => {+ assert.equal(occursIn('更多 plugin 操作', 'Plugin'), false);+});++// ---------------------------------------------------------------------------+// stripNonProse:剥离非文案片段+// ---------------------------------------------------------------------------++test('stripNonProse: 剥离 i18next 插值,避免变量名与术语同形误报', () => {+ // {{project}} 是变量名,不是展示给用户的「Project」字样。+ assert.equal(occursIn(stripNonProse('在 {{project}} 中新建'), 'project'), false);+ assert.equal(occursIn(stripNonProse('该 Project 下的会话'), 'Project'), true);+});++test('stripNonProse: 剥离 URL、邮箱与文件名', () => {+ assert.equal(occursIn(stripNonProse('打开 https://x.com/agent/list'), 'agent'), false);+ assert.equal(occursIn(stripNonProse('读取 project.json 失败'), 'project'), false);+ assert.equal(occursIn(stripNonProse('联系 [email protected]'), 'agent'), false);+});++test('stripNonProse: 剥离 Trans 占位与 $t 引用', () => {+ assert.equal(stripNonProse('前<0>中</0>后').includes('<0>'), false);+ assert.equal(stripNonProse('$t(common.agent) 之后').includes('$t('), false);+});++// ---------------------------------------------------------------------------+// findCaseMismatch:大小写形态+// ---------------------------------------------------------------------------++test('findCaseMismatch: 命中错误形态时返回实际拼写,正确时返回 null', () => {+ assert.equal(findCaseMismatch('归档 worker', 'Worker'), 'worker');+ assert.equal(findCaseMismatch('归档 Worker', 'Worker'), null);+ assert.equal(findCaseMismatch('归档 WORKER', 'Worker'), 'WORKER');+});++test('findCaseMismatch: 复数形态归一后再比对,不误报 Workers', () => {+ assert.equal(findCaseMismatch('所有 Workers 已停止', 'Worker'), null);+ assert.equal(findCaseMismatch('所有 workers 已停止', 'Worker'), 'worker');+});++test('findCaseMismatch: 连字符复合词同样豁免', () => {+ assert.equal(findCaseMismatch('service-worker 已注册', 'Worker'), null);+});++// ---------------------------------------------------------------------------+// makeExemptChecker:豁免+// ---------------------------------------------------------------------------++test('makeExemptChecker: 完整路径精确匹配', () => {+ const isExempt = makeExemptChecker(['desktop:settings.a.b']);+ assert.equal(isExempt('desktop:settings.a.b'), true);+ assert.equal(isExempt('desktop:settings.a.c'), false);+});++test('makeExemptChecker: 以点结尾的子树前缀豁免整段', () => {+ const isExempt = makeExemptChecker(['desktop:settings.remote.']);+ assert.equal(isExempt('desktop:settings.remote.keys.inAgent'), true);+ assert.equal(isExempt('desktop:settings.remoteControl.hook'), false, '前缀必须含点,不能误伤 remoteControl');+});++test('makeExemptChecker: 不支持按末段 key 名匹配', () => {+ // 按末段匹配会让任意同名嵌套 key 被静默放过,是 brand guard 明确记录过的教训。+ const isExempt = makeExemptChecker(['title']);+ assert.equal(isExempt('desktop:settings.a.title'), false);+});++test('makeExemptChecker: 空/缺省列表不豁免任何 key', () => {+ assert.equal(makeExemptChecker(undefined)('desktop:any.key'), false);+ assert.equal(makeExemptChecker([])('desktop:any.key'), false);+});++// ---------------------------------------------------------------------------+// 标点规则+// ---------------------------------------------------------------------------++test('findHalfWidthPunct: 只在汉字后触发', () => {+ assert.equal(findHalfWidthPunct('保存失败:原因'), ':');+ assert.equal(findHalfWidthPunct('授权失败,请重试'), ',');+ assert.equal(findHalfWidthPunct('保存失败:原因'), null);+ // 英文/数字后的半角标点是正常排版,不能报。+ assert.equal(findHalfWidthPunct('Error: not found'), null);+ assert.equal(findHalfWidthPunct('共 1,000 项'), null);+});++test('标点规则的 locale 适用范围有数据依据', () => {+ // ja 实测半角冒号 124:78 才是主流(日文 UI 惯例),套用中文全角规则会制造大批假阳性。+ assert.equal(HALFWIDTH_PUNCT_LOCALES.has('zh-CN'), true);+ assert.equal(HALFWIDTH_PUNCT_LOCALES.has('ja'), false);+ assert.equal(HALFWIDTH_PUNCT_LOCALES.has('ko'), false);+ // 省略号三语一致以「…」为主流。+ for (const locale of ['zh-CN', 'ja', 'ko']) {+ assert.equal(ELLIPSIS_LOCALES.has(locale), true, `${locale} 应纳入省略号规则`);+ }+});++test('hasAsciiEllipsis: 识别三点省略号', () => {+ assert.equal(hasAsciiEllipsis('加载中...'), true);+ assert.equal(hasAsciiEllipsis('加载中…'), false);+});++// ---------------------------------------------------------------------------+// 术语表数据自身的完整性+// ---------------------------------------------------------------------------++const glossary = JSON.parse(fs.readFileSync(path.join(ROOT, 'i18n', 'glossary.json'), 'utf8'));++test('glossary.json: id 唯一且格式合法', () => {+ const ids = glossary.terms.map((t) => t.id);+ assert.equal(new Set(ids).size, ids.length, '术语 id 必须唯一——baseline 用它做锚点');+ for (const id of ids) {+ assert.match(id, /^[a-z0-9-]+$/, `id "${id}" 必须是 kebab-case`);+ }+});++test('glossary.json: 每条术语都有裁决理由', () => {+ for (const term of glossary.terms) {+ assert.ok(term.note?.trim(), `术语 ${term.id} 缺 note——没有理由的裁决会被后人反复推翻`);+ }+});++test('glossary.json: decided 术语必须给出所有非源语言的译法', () => {+ const targets = glossary.locales.filter((l) => l !== glossary.sourceLocale);+ for (const term of glossary.terms.filter((t) => t.status === 'decided')) {+ for (const locale of targets) {+ assert.ok(+ term.translations?.[locale]?.trim(),+ `已裁决术语 ${term.id} 缺 ${locale} 译法;拿不准应留在 status=proposed`,+ );+ }+ }+});++test('glossary.json: forbidden 不能与自己的标准译法冲突', () => {+ for (const term of glossary.terms) {+ for (const [locale, words] of Object.entries(term.forbidden ?? {})) {+ const standard = term.translations?.[locale];+ if (!standard) continue;+ assert.ok(+ !words.includes(standard),+ `术语 ${term.id} 在 ${locale} 把标准译法「${standard}」同时列为禁用,规则自相矛盾`,+ );+ }+ }+});++test('glossary.json: 同一 locale 下 forbidden 词不跨术语重复', () => {+ // 重复会让同一处违规被两个术语各报一次,baseline 也会存两条指纹。+ // 一个词只归属一个术语,其余条目在 note 里交叉引用(如「代理」统一登记在 proxy 下)。+ const owner = new Map();+ for (const term of glossary.terms) {+ for (const [locale, words] of Object.entries(term.forbidden ?? {})) {+ for (const word of words) {+ const slot = `${locale}\t${word}`;+ const prev = owner.get(slot);+ assert.equal(+ prev,+ undefined,+ `${locale} 的禁用词「${word}」同时登记在 ${prev} 与 ${term.id} 下,会造成重复报告`,+ );+ owner.set(slot, term.id);+ }+ }+ }+});++test('glossary.json: exempt 路径带来源前缀,不是裸 key', () => {+ for (const term of glossary.terms) {+ for (const item of term.exempt ?? []) {+ assert.match(+ item,+ /^(desktop|mobile\/[a-zA-Z]+):.+$/,+ `术语 ${term.id} 的豁免 "${item}" 缺来源前缀(desktop: / mobile/<ns>:)`,+ );+ }+ }+});++test('glossary.json: locales 与 desktop SUPPORTED_LOCALES 一致', () => {+ const localeTs = fs.readFileSync(path.join(ROOT, 'apps/desktop/src/shared/locale.ts'), 'utf8');+ const match = localeTs.match(/SUPPORTED_LOCALES\s*=\s*\[([^\]]*)\]/);+ assert.ok(match, '无法从 locale.ts 解析 SUPPORTED_LOCALES');+ const supported = [...match[1].matchAll(/['"]([^'"]+)['"]/g)].map((m) => m[1]);+ assert.deepEqual(+ [...glossary.locales].sort(),+ [...supported].sort(),+ '术语表覆盖的语言必须与 SUPPORTED_LOCALES 一致,新增语言时两处一起改',+ );+});++// ---------------------------------------------------------------------------+// 文档同步+// ---------------------------------------------------------------------------++test('GLOSSARY.md 与 glossary.json 同步', () => {+ const doc = fs.readFileSync(path.join(ROOT, 'i18n', 'GLOSSARY.md'), 'utf8');+ assert.equal(+ doc,+ renderGlossaryDoc(glossary),+ 'i18n/GLOSSARY.md 已过期,运行 pnpm i18n:glossary-doc 重新生成',+ );+});++// ---------------------------------------------------------------------------+// baseline 完整性+// ---------------------------------------------------------------------------++test('glossary-baseline.json: 条目格式合法且无重复', () => {+ const baseline = JSON.parse(fs.readFileSync(path.join(ROOT, 'i18n', 'glossary-baseline.json'), 'utf8'));+ const entries = baseline.entries ?? [];+ assert.equal(new Set(entries).size, entries.length, 'baseline 不应有重复条目');+ for (const entry of entries) {+ const parts = entry.split('\t');+ assert.equal(parts.length, 4, `baseline 条目 "${entry}" 应为 locale\\tkey\\trule\\tdetail 四段`);+ assert.ok(glossary.locales.includes(parts[0]), `baseline 条目语言 "${parts[0]}" 不在术语表 locales 内`);+ }+});diff --git a/scripts/check-i18n-glossary.mjs b/scripts/check-i18n-glossary.mjsnew file mode 100644index 0000000000..d58e54cf98--- /dev/null+++ b/scripts/check-i18n-glossary.mjs@@ -0,0 +1,374 @@+#!/usr/bin/env node+/**+ * i18n 术语表(glossary)一致性门禁。+ *+ * 与 check-i18n.mjs 的分工:后者只管 **key 结构**(缺 key / 孤儿 key / 类型冲突),+ * 保证「四语言 key 齐整」;本脚本管 **译文语义**,保证「同一个概念在所有地方译法一致」。+ * 两者互补,谁也替代不了谁。+ *+ * 校验对象:i18n/glossary.json 里登记的术语,对照 desktop + mobile 全部 locale JSON。+ *+ * 三类规则:+ * 1. forbidden —— 术语在某语言下的禁用译法(如 Agent 在 zh-CN 禁「代理」)。+ * 2. case-form —— 保留英文的术语必须统一大小写形态(如 Worker 不写 worker)。+ * 3. punctuation —— zh-CN / ja 的标点风格(中文字符后禁半角逗号冒号;省略号用 …)。+ *+ * 分级:+ * - status=decided 的术语违规 → **阻断**(exit 1)。+ * - status=proposed 的术语违规 → 只告警。proposed 用于承载「已知不一致但尚未拍板」的+ * 术语,让清单可见、可讨论,而不是靠脚本单方面替产品做裁决。+ * - 标点规则视同 decided。+ *+ * 存量:i18n/glossary-baseline.json 冻结首次引入时的既有违规,只告警不阻断。baseline+ * **只减不增**——已修复却仍留在 baseline 的条目会报错,强制随手清理。新增违规一律阻断。+ * 这个模式沿用仓库既有先例(i18nCompleteness.test.ts 的 KNOWN_MISSING、+ * hardcoded-color-exemptions.json),不另造轮子。+ *+ * 用法:+ * node scripts/check-i18n-glossary.mjs # 校验(root: pnpm check:i18n-glossary)+ * node scripts/check-i18n-glossary.mjs --update-baseline # 重新冻结存量+ * node scripts/check-i18n-glossary.mjs --report # 打印完整违规明细(不阻断)+ *+ * 已知覆盖缺口(有意为之,记录在案):mobile 存在 i18next 之外的手写四语 catalog+ * (src/auth/loginMessages.ts 等 .ts 文件),本脚本只扫 locale JSON,不解析这些 TS。+ * 它们由各自的编译期 Record 类型 + parity 单测保证结构,但术语一致性目前是盲区。+ */+import fs from 'node:fs';+import path from 'node:path';+import { fileURLToPath } from 'node:url';++import { renderGlossaryDoc } from './shared/glossary-doc.mjs';+import {+ ELLIPSIS_LOCALES,+ HALFWIDTH_PUNCT_LOCALES,+ findCaseMismatch,+ findHalfWidthPunct,+ hasAsciiEllipsis,+ makeExemptChecker,+ occursIn,+ stripNonProse,+} from './shared/glossary-rules.mjs';++const repoRoot = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..');+const GLOSSARY_PATH = path.join(repoRoot, 'i18n', 'glossary.json');+const BASELINE_PATH = path.join(repoRoot, 'i18n', 'glossary-baseline.json');+const DOC_PATH = path.join(repoRoot, 'i18n', 'GLOSSARY.md');+const DESKTOP_LOCALES = path.join(repoRoot, 'apps', 'desktop', 'src', 'renderer', 'i18n', 'locales');+const MOBILE_LOCALES = path.join(repoRoot, 'apps', 'mobile', 'src', 'i18n', 'locales');++const SUPPORTED_SCHEMA_VERSION = 1;++const args = new Set(process.argv.slice(2));+const UPDATE_BASELINE = args.has('--update-baseline');+const REPORT_ONLY = args.has('--report');++function fail(message) {+ console.error(`[check-i18n-glossary] ${message}`);+ process.exit(1);+}++// ---------------------------------------------------------------------------+// 加载+// ---------------------------------------------------------------------------++function readJson(file) {+ try {+ return JSON.parse(fs.readFileSync(file, 'utf8'));+ } catch (err) {+ fail(`读取 / 解析失败: ${path.relative(repoRoot, file)}\n ${err.message}`);+ }+}++const glossary = readJson(GLOSSARY_PATH);+if (glossary.version !== SUPPORTED_SCHEMA_VERSION) {+ fail(+ `glossary.json version=${glossary.version},本脚本只支持 ${SUPPORTED_SCHEMA_VERSION}。` ++ `升级 schema 时必须同步更新本脚本,不要让版本静默漂移。`,+ );+}++/** 递归展平嵌套 JSON 为 Map<'a.b.c', string>。 */+function flatten(obj, prefix, out) {+ for (const [key, value] of Object.entries(obj)) {+ const keyPath = prefix ? `${prefix}.${key}` : key;+ if (value !== null && typeof value === 'object' && !Array.isArray(value)) {+ flatten(value, keyPath, out);+ } else if (typeof value === 'string') {+ out.set(keyPath, value);+ }+ }+ return out;+}++/**+ * 加载一个 locale 的全部文案。+ * key 前缀区分来源,便于 exempt 精确定位:desktop:a.b / mobile/session:x.y+ */+function loadLocale(locale) {+ const out = new Map();++ const desktopFile = path.join(DESKTOP_LOCALES, locale, 'common.json');+ if (fs.existsSync(desktopFile)) {+ for (const [k, v] of flatten(readJson(desktopFile), '', new Map())) {+ out.set(`desktop:${k}`, v);+ }+ }++ const mobileDir = path.join(MOBILE_LOCALES, locale);+ if (fs.existsSync(mobileDir)) {+ for (const file of fs.readdirSync(mobileDir).sort()) {+ if (!file.endsWith('.json')) continue;+ const ns = file.slice(0, -'.json'.length);+ for (const [k, v] of flatten(readJson(path.join(mobileDir, file)), '', new Map())) {+ out.set(`mobile/${ns}:${k}`, v);+ }+ }+ }++ return out;+}++const locales = glossary.locales;+const corpus = new Map(locales.map((l) => [l, loadLocale(l)]));+for (const [locale, entries] of corpus) {+ if (entries.size === 0) fail(`locale "${locale}" 未加载到任何文案,请检查 locales 目录布局`);+}++// ---------------------------------------------------------------------------+// 规则+// ---------------------------------------------------------------------------++/** 一条违规。fingerprint 用于 baseline 比对,必须稳定。 */+function makeViolation({ locale, key, rule, detail, severity, hint }) {+ return {+ locale,+ key,+ rule,+ detail,+ severity,+ hint,+ fingerprint: `${locale}\t${key}\t${rule}\t${detail}`,+ };+}++const violations = [];++// --- 规则 1 & 2:术语 forbidden / 大小写形态 ---+for (const term of glossary.terms) {+ const isExempt = makeExemptChecker(term.exempt);+ const severity = term.status === 'decided' ? 'error' : 'warn';++ for (const locale of locales) {+ const entries = corpus.get(locale);++ // 规则 1:禁用译法+ for (const bad of term.forbidden?.[locale] ?? []) {+ for (const [key, value] of entries) {+ if (isExempt(key)) continue;+ if (!occursIn(stripNonProse(value), bad)) continue;+ const expected = term.translations?.[locale] || term.en;+ violations.push(+ makeViolation({+ locale,+ key,+ rule: 'forbidden-term',+ detail: `${term.id}:${bad}`,+ severity,+ hint: `「${bad}」是 ${term.en} 的禁用译法,应为「${expected}」`,+ }),+ );+ }+ }++ // 规则 2:保留英文的术语必须统一大小写形态。+ // 两个前提缺一不可:+ // - translations 值与 en 相同(译成中文/日文/韩文的术语没有大小写问题);+ // - checkCase 未显式关闭。Issue / Session 这类词同时是常用英语单词,英文句子里+ // 的 "fix the issue" 是正常用法,强行要求大写会在 prompt 模板里制造大批假阳性。+ if (term.checkCase === false) continue;+ const standard = term.translations?.[locale];+ if (!standard || standard !== term.en) continue;+ for (const [key, value] of entries) {+ if (isExempt(key)) continue;+ const hit = findCaseMismatch(stripNonProse(value), standard);+ if (!hit) continue;+ violations.push(+ makeViolation({+ locale,+ key,+ rule: 'term-case',+ detail: `${term.id}:${hit}`,+ severity,+ hint: `「${hit}」大小写不统一,应为「${standard}」`,+ }),+ );+ }+ }+}++// --- 规则 3:标点风格 ---+// 各 locale 的适用范围与数据依据见 shared/glossary-rules.mjs 的常量注释。+for (const locale of locales) {+ const checkHalfWidth = HALFWIDTH_PUNCT_LOCALES.has(locale);+ const checkEllipsis = ELLIPSIS_LOCALES.has(locale);+ if (!checkHalfWidth && !checkEllipsis) continue;++ for (const [key, value] of corpus.get(locale)) {+ const prose = stripNonProse(value);++ const mark = checkHalfWidth ? findHalfWidthPunct(prose) : null;+ if (mark) {+ violations.push(+ makeViolation({+ locale,+ key,+ rule: 'punct-halfwidth',+ detail: mark,+ severity: 'error',+ hint: `中文字符后应使用全角「${mark === ',' ? ',' : ':'}」,当前是半角「${mark}」`,+ }),+ );+ }++ if (checkEllipsis && hasAsciiEllipsis(prose)) {+ violations.push(+ makeViolation({+ locale,+ key,+ rule: 'punct-ellipsis',+ detail: '...',+ severity: 'error',+ hint: '省略号应使用「…」而非三个半角点',+ }),+ );+ }+ }+}++violations.sort((a, b) => a.fingerprint.localeCompare(b.fingerprint));++// ---------------------------------------------------------------------------+// baseline+// ---------------------------------------------------------------------------++// baseline **只收 error 级**。proposed 术语的告警刻意不冻结:它们本来就不阻断,+// 冻进 baseline 只会让「还有多少术语没裁决」这个数字消失,失去提醒作用。+const blockingAll = violations.filter((v) => v.severity === 'error');++if (UPDATE_BASELINE) {+ const payload = {+ _comment:+ '存量违规冻结清单(仅 status=decided 的术语与标点规则)。只减不增:修好一条就从这里' ++ '删一条,新增违规一律阻断 CI。重新生成: node scripts/check-i18n-glossary.mjs --update-baseline',+ _generatedFrom: `glossary.json version ${glossary.version}`,+ entries: blockingAll.map((v) => v.fingerprint).sort(),+ };+ fs.writeFileSync(BASELINE_PATH, `${JSON.stringify(payload, null, 2)}\n`, 'utf8');+ console.log(+ `[check-i18n-glossary] 已写入 baseline: ${blockingAll.length} 条存量违规 → ${path.relative(repoRoot, BASELINE_PATH)}`,+ );+ process.exit(0);+}++const baseline = fs.existsSync(BASELINE_PATH) ? readJson(BASELINE_PATH) : { entries: [] };+const baselineSet = new Set(baseline.entries ?? []);++const current = new Set(violations.map((v) => v.fingerprint));+const stale = [...baselineSet].filter((fp) => !current.has(fp)).sort();+const fresh = violations.filter((v) => !baselineSet.has(v.fingerprint));++const blocking = fresh.filter((v) => v.severity === 'error');+const warnings = fresh.filter((v) => v.severity === 'warn');+const known = violations.filter((v) => baselineSet.has(v.fingerprint));++// ---------------------------------------------------------------------------+// 输出+// ---------------------------------------------------------------------------++function print(list, label, log) {+ if (list.length === 0) return;+ log(`\n[check-i18n-glossary] ${label} ${list.length} 处:`);+ for (const v of list.slice(0, REPORT_ONLY ? Infinity : 40)) {+ log(` ${v.locale} ${v.key}`);+ log(` ${v.hint}`);+ }+ if (!REPORT_ONLY && list.length > 40) {+ log(` ...(其余 ${list.length - 40} 处省略,完整明细: node scripts/check-i18n-glossary.mjs --report)`);+ }+}++print(blocking, '❌ 新增术语/标点违规', console.error);++// 待裁决术语按术语折叠:逐条列出会淹没真正需要处理的新增违规,而这里的重点是+// 「还有哪些术语没拍板、各自波及多大」,不是每一条的位置。+if (warnings.length > 0) {+ const byTerm = new Map();+ for (const v of warnings) {+ const termId = v.detail.split(':')[0];+ byTerm.set(termId, (byTerm.get(termId) ?? 0) + 1);+ }+ console.warn(`\n[check-i18n-glossary] ⚠️ 待裁决术语命中 ${warnings.length} 处(status=proposed,不阻断):`);+ for (const [termId, count] of [...byTerm].sort((a, b) => b[1] - a[1])) {+ const term = glossary.terms.find((t) => t.id === termId);+ console.warn(` ${String(count).padStart(4)} 处 ${termId}(${term?.en ?? '?'})`);+ }+ console.warn(+ ' 裁决后把 i18n/glossary.json 里对应条目的 status 改为 decided,' ++ '并重新生成 baseline 冻结存量。明细: node scripts/check-i18n-glossary.mjs --report',+ );+}++if (REPORT_ONLY) {+ print(warnings, 'ℹ️ 待裁决术语明细', console.log);+ print(known, 'ℹ️ baseline 内已知存量', console.log);+}++if (stale.length > 0) {+ console.error(`\n[check-i18n-glossary] ❌ baseline 有 ${stale.length} 条已失效条目(问题已修复,但仍挂在账上):`);+ for (const fp of stale.slice(0, 40)) {+ const [locale, key, rule, detail] = fp.split('\t');+ console.error(` ${locale} ${key} (${rule}: ${detail})`);+ }+ if (stale.length > 40) console.error(` ...(其余 ${stale.length - 40} 条省略)`);+ console.error(+ '\nbaseline 只减不增。请删除上述条目,或直接重新生成:\n' ++ ' node scripts/check-i18n-glossary.mjs --update-baseline',+ );+}++// GLOSSARY.md 是给人和 AI 查阅的入口,过期比不存在更糟——大家会照着过期的表写文案。+// 用与生成器完全相同的渲染函数比对,不做「差不多就行」的模糊校验。+const docStale = fs.existsSync(DOC_PATH)+ ? fs.readFileSync(DOC_PATH, 'utf8') !== renderGlossaryDoc(glossary)+ : true;+if (docStale) {+ console.error(+ '\n[check-i18n-glossary] ❌ i18n/GLOSSARY.md 与 i18n/glossary.json 不同步(或缺失)。\n' ++ ' 运行 pnpm i18n:glossary-doc 重新生成。',+ );+}++if (REPORT_ONLY) {+ console.log(+ `\n[check-i18n-glossary] 报告模式:新增 ${blocking.length} / 待裁决 ${warnings.length} / ` ++ `baseline 存量 ${known.length} / baseline 失效 ${stale.length} / 文档${docStale ? '过期' : '同步'}`,+ );+ process.exit(0);+}++if (blocking.length > 0 || stale.length > 0 || docStale) {+ console.error(+ `\n[check-i18n-glossary] 失败:新增违规 ${blocking.length} / baseline 失效 ${stale.length}` ++ `${docStale ? ' / 文档过期' : ''}。术语裁决见 i18n/glossary.json,人读版 i18n/GLOSSARY.md。`,+ );+ process.exit(1);+}++const decided = glossary.terms.filter((t) => t.status === 'decided').length;+const proposed = glossary.terms.length - decided;+console.log(+ `[check-i18n-glossary] ✅ 术语表 ${decided} 条已裁决 / ${proposed} 条待讨论,` ++ `${locales.join(' / ')} 无新增违规` ++ (known.length > 0 ? `(baseline 存量 ${known.length} 处待清理)` : '') ++ (warnings.length > 0 ? `(待裁决术语告警 ${warnings.length} 处)` : ''),+);diff --git a/scripts/generate-glossary-doc.mjs b/scripts/generate-glossary-doc.mjsnew file mode 100644index 0000000000..bc76c455f1--- /dev/null+++ b/scripts/generate-glossary-doc.mjs@@ -0,0 +1,45 @@+#!/usr/bin/env node+/**+ * 从 i18n/glossary.json 生成人读版 i18n/GLOSSARY.md。+ *+ * 术语表的价值在于「改文案的人会去读」。JSON 适合脚本消费,不适合人和 AI 快速查阅,+ * 所以维护一份 markdown 镜像,并由 check-i18n-glossary.mjs 校验两者同步——避免出现+ * 「改了 JSON 忘了生成文档,大家继续照着过期的 markdown 写文案」。+ *+ * 用法:+ * node scripts/generate-glossary-doc.mjs # 生成(root: pnpm i18n:glossary-doc)+ * node scripts/generate-glossary-doc.mjs --check # 只校验是否最新,不写盘+ */+import fs from 'node:fs';+import path from 'node:path';+import { fileURLToPath } from 'node:url';++import { renderGlossaryDoc } from './shared/glossary-doc.mjs';++const repoRoot = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..');+const GLOSSARY_PATH = path.join(repoRoot, 'i18n', 'glossary.json');+const DOC_PATH = path.join(repoRoot, 'i18n', 'GLOSSARY.md');++const checkOnly = process.argv.includes('--check');++const glossary = JSON.parse(fs.readFileSync(GLOSSARY_PATH, 'utf8'));+const rendered = renderGlossaryDoc(glossary);++if (checkOnly) {+ const existing = fs.existsSync(DOC_PATH) ? fs.readFileSync(DOC_PATH, 'utf8') : '';+ if (existing !== rendered) {+ console.error(+ '[generate-glossary-doc] ❌ i18n/GLOSSARY.md 与 i18n/glossary.json 不同步。\n' ++ ' 运行 pnpm i18n:glossary-doc 重新生成。',+ );+ process.exit(1);+ }+ console.log('[generate-glossary-doc] ✅ GLOSSARY.md 与术语表同步');+ process.exit(0);+}++fs.writeFileSync(DOC_PATH, rendered, 'utf8');+console.log(+ `[generate-glossary-doc] ✅ 已生成 ${path.relative(repoRoot, DOC_PATH)}` ++ `(${glossary.terms.length} 条术语)`,+);diff --git a/scripts/shared/glossary-doc.mjs b/scripts/shared/glossary-doc.mjsnew file mode 100644index 0000000000..b4a79f6184--- /dev/null+++ b/scripts/shared/glossary-doc.mjs@@ -0,0 +1,146 @@+/**+ * 从 i18n/glossary.json 渲染人读版 GLOSSARY.md。+ *+ * 抽成共享模块的原因:generate-glossary-doc.mjs 用它生成,check-i18n-glossary.mjs+ * 用同一份逻辑校验「文档是否与术语表同步」。两边共用一个渲染函数,才不会出现+ * 「校验说同步了、实际生成出来不一样」的假绿。+ */++/** 术语表在人读文档里的展示顺序:已裁决在前(按 id),待讨论在后(按 id)。 */+function sortTerms(terms) {+ return [...terms].sort((a, b) => {+ if (a.status !== b.status) return a.status === 'decided' ? -1 : 1;+ return a.id.localeCompare(b.id);+ });+}++/** 单元格转义:markdown 表格里的 | 会破坏列结构。 */+function cell(text) {+ return String(text ?? '').replace(/\|/g, '\\|').replace(/\n/g, ' ');+}++/** 译法展示:空字符串表示「保留英文原词」,直接显示 en 并标注。 */+function renderTranslation(term, locale) {+ const value = term.translations?.[locale];+ if (!value) return '—';+ if (value === term.en) return `\`${value}\`(保留英文)`;+ return value;+}++export function renderGlossaryDoc(glossary) {+ const terms = sortTerms(glossary.terms);+ const decided = terms.filter((t) => t.status === 'decided');+ const proposed = terms.filter((t) => t.status === 'proposed');+ const locales = glossary.locales.filter((l) => l !== glossary.sourceLocale);++ const lines = [];++ lines.push('<!-- 本文件由 scripts/generate-glossary-doc.mjs 自动生成,请勿手改。 -->');+ lines.push('<!-- 修改术语请编辑 i18n/glossary.json,然后运行 pnpm i18n:glossary-doc。 -->');+ lines.push('');+ lines.push('# Cindy 术语表');+ lines.push('');+ lines.push(+ '产品术语的唯一事实源。**新增或修改任何 UI 文案前先查这里**——同一个概念在不同界面译法不一致,' ++ '是用户能直接看见的质量问题。',+ );+ lines.push('');+ lines.push('- 数据正本:`i18n/glossary.json`(本文件由它生成)');+ lines.push('- 自动门禁:`pnpm check:i18n-glossary`(随 CI 阻断)');+ lines.push('- 存量豁免:`i18n/glossary-baseline.json`(只减不增)');+ lines.push('');++ lines.push('## 已裁决术语');+ lines.push('');+ if (decided.length === 0) {+ lines.push('(暂无)');+ } else {+ lines.push('这些术语的译法已定,**违反会阻断 CI**。');+ lines.push('');+ lines.push(`| 英文 | ${locales.join(' | ')} | 禁用译法 |`);+ lines.push(`| --- | ${locales.map(() => '---').join(' | ')} | --- |`);+ for (const term of decided) {+ const cells = locales.map((l) => cell(renderTranslation(term, l)));+ const forbidden = Object.entries(term.forbidden ?? {})+ .flatMap(([loc, words]) => words.map((w) => `${loc}: ${w}`))+ .join(';');+ lines.push(`| **${cell(term.en)}** | ${cells.join(' | ')} | ${cell(forbidden) || '—'} |`);+ }+ lines.push('');+ const withVariants = decided.filter((t) =>+ Object.values(t.alsoAllowed ?? {}).some((list) => list.length > 0),+ );+ if (withVariants.length > 0) {+ lines.push('### 分场合译法');+ lines.push('');+ lines.push('同一个词在不同语境下有不同说法。下面这些是**允许的**,按场合选,不会被门禁拦截。');+ lines.push('');+ lines.push('| 英文 | 语言 | 译法 | 什么场合 |');+ lines.push('| --- | --- | --- | --- |');+ for (const term of withVariants) {+ for (const [locale, list] of Object.entries(term.alsoAllowed ?? {})) {+ const primary = term.translations?.[locale];+ if (primary) {+ lines.push(`| **${cell(term.en)}** | ${locale} | ${cell(primary)} | 默认 |`);+ }+ for (const variant of list) {+ lines.push(`| ${cell(term.en)} | ${locale} | ${cell(variant.text)} | ${cell(variant.when)} |`);+ }+ }+ }+ lines.push('');+ }++ lines.push('### 裁决理由');+ lines.push('');+ for (const term of decided) {+ lines.push(`- **${term.en}** — ${term.note}`);+ if (term.exempt?.length) {+ lines.push(` - 豁免范围:${term.exempt.map((e) => `\`${e}\``).join('、')}`);+ }+ }+ }+ lines.push('');++ lines.push('## 待讨论术语');+ lines.push('');+ if (proposed.length === 0) {+ lines.push('(暂无——所有已登记术语都已裁决)');+ } else {+ lines.push(+ '这些术语现状不一致但**尚未拍板**,guard 只告警不阻断。' ++ '裁决后把 `i18n/glossary.json` 里对应条目的 `status` 改为 `decided`、补上 `translations`,' ++ '再跑 `--update-baseline` 冻结存量。',+ );+ lines.push('');+ for (const term of proposed) {+ lines.push(`### ${term.en}`);+ lines.push('');+ lines.push(term.note);+ const forbidden = Object.entries(term.forbidden ?? {})+ .flatMap(([loc, words]) => words.map((w) => `\`${w}\`(${loc})`))+ .join('、');+ if (forbidden) {+ lines.push('');+ lines.push(`已确定禁用:${forbidden}`);+ }+ lines.push('');+ }+ }++ lines.push('## 怎么加一条术语');+ lines.push('');+ lines.push('1. 在 `i18n/glossary.json` 的 `terms` 里加条目,`note` 必填——写清楚**为什么**这么定,');+ lines.push(' 否则后人会反复推翻它。');+ lines.push('2. 拿不准时先设 `status: "proposed"`,让 guard 把现状规模统计出来再讨论。');+ lines.push('3. 跑 `pnpm i18n:glossary-doc` 重新生成本文件。');+ lines.push('4. 跑 `pnpm check:i18n-glossary` 看新规则命中多少存量;确认无误报后再');+ lines.push(' `node scripts/check-i18n-glossary.mjs --update-baseline` 冻结。');+ lines.push('');+ lines.push('**误报排查**:guard 已剥离 `{{插值}}`、URL、文件名,并把连字符视作词边界');+ lines.push('(`ssh-agent` 不会被判成产品 `Agent`)。仍需放行时用 `exempt`:完整路径精确匹配,');+ lines.push('或以 `.` 结尾的子树前缀。同形异义(SSH agent vs 产品 Agent)走 `exempt` 并在 `note` 里写明。');+ lines.push('');++ return `${lines.join('\n')}\n`;+}diff --git a/scripts/shared/glossary-rules.mjs b/scripts/shared/glossary-rules.mjsnew file mode 100644index 0000000000..6f975a4e2c--- /dev/null+++ b/scripts/shared/glossary-rules.mjs@@ -0,0 +1,103 @@+/**+ * 术语表 guard 的纯规则函数。+ *+ * 抽成独立模块是为了可测:这里每一条边界都是踩过的坑(见各函数注释),回归代价很高,+ * 必须有单测钉住。check-i18n-glossary.mjs 只做编排与 IO。+ */++/**+ * ASCII 术语的词边界字符集。+ *+ * 连字符 / 下划线**必须**算作边界:否则 `ssh-agent`(SSH 密钥代理,与产品的 Agent 是+ * 两个概念)会被判成「agent 大小写不统一」。引入本脚本时这一条制造了 60 处假阳性中的+ * 大半,`user-agent`、`sub-agent`、`agent_id` 同理。+ */+export const WORD_BOUNDARY = 'A-Za-z0-9_-';++/**+ * 剥离不该参与术语匹配的片段,避免误报:+ * - {{var}} / {{var, format}} i18next 插值(变量名常与术语同形,如 {{project}})+ * - <0>…</0> Trans 组件占位+ * - $t(...) i18next 嵌套引用+ * - URL、邮箱、带扩展名的文件名(project.json)+ */+export function stripNonProse(text) {+ return text+ .replace(/\{\{[^}]*\}\}/g, ' ')+ .replace(/<\/?\d+>/g, ' ')+ .replace(/\$t\([^)]*\)/g, ' ')+ .replace(/\b[a-z][\w-]*:\/\/\S+/gi, ' ')+ .replace(/\S+@\S+\.\S+/g, ' ')+ .replace(/\b[\w-]+\.(json|ts|tsx|js|mjs|md|yml|yaml|sql|lock|toml)\b/gi, ' ');+}++/**+ * 术语命中判定。+ * 纯 ASCII 词(Agent / Plugin)按词边界匹配,允许紧跟复数 s;+ * 含 CJK 的词(代理 / 插件)没有词边界概念,用子串。+ */+export function occursIn(text, term) {+ if (/^[\x20-\x7e]+$/.test(term)) {+ const escaped = term.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');+ return new RegExp(`(?<![${WORD_BOUNDARY}])${escaped}s?(?![${WORD_BOUNDARY}])`).test(text);+ }+ return text.includes(term);+}++/**+ * 大小写形态检查:命中术语但拼写形态与标准不符时返回实际拼写,否则返回 null。+ * 只对「保留英文原词」的术语有意义(译成中文/日文的术语无大小写问题)。+ */+export function findCaseMismatch(text, standard) {+ if (!/^[A-Za-z][A-Za-z0-9 ]*$/.test(standard)) return null;+ const escaped = standard.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');+ const re = new RegExp(`(?<![${WORD_BOUNDARY}])${escaped}s?(?![${WORD_BOUNDARY}])`, 'i');+ const m = text.match(re);+ if (!m) return null;+ const hit = m[0].replace(/s$/, '');+ return hit === standard ? null : hit;+}++/**+ * 构造某术语的豁免判定。+ * 支持完整路径精确匹配,以及以 `.` 结尾的子树前缀(用于整段同形异义,例如+ * SSH agent 与产品 Agent,`desktop:settings.remote.` 整段豁免)。+ * 刻意**不支持**按末段 key 名匹配——那会让任意同名嵌套 key 被静默放过。+ */+export function makeExemptChecker(list) {+ const exact = new Set();+ const prefixes = [];+ for (const item of list ?? []) {+ if (item.endsWith('.')) prefixes.push(item);+ else exact.add(item);+ }+ return (key) => exact.has(key) || prefixes.some((p) => key.startsWith(p));+}++// ---------------------------------------------------------------------------+// 标点规则+// ---------------------------------------------------------------------------++/**+ * 规则边界由现状数据定,不靠直觉(比例为引入本脚本时实测的 desktop locale):+ * - 全角逗号 / 冒号:zh-CN 全角是主流(逗号 566:218、冒号 153:61)→ 规则成立。+ * **ja 不适用**——日文 UI 惯例本就用半角冒号,实测半角 124:78 反而是主流,+ * 套用中文规则会制造 124 处假阳性。ko 同理不适用。+ * - 省略号:zh-CN 140:44、ja 138:46、ko 138:46,三语一致以「…」为主流 → 全部适用。+ */+export const HALFWIDTH_PUNCT_LOCALES = new Set(['zh-CN']);+export const ELLIPSIS_LOCALES = new Set(['zh-CN', 'ja', 'ko']);++const HALF_WIDTH_AFTER_HAN = /[一-鿿][,:]/;+const ASCII_ELLIPSIS = /\.\.\./;++/** 汉字后紧跟半角逗号/冒号时返回该标点,否则 null。 */+export function findHalfWidthPunct(text) {+ const m = text.match(HALF_WIDTH_AFTER_HAN);+ return m ? m[0].slice(-1) : null;+}++/** 是否含半角三点省略号。 */+export function hasAsciiEllipsis(text) {+ return ASCII_ELLIPSIS.test(text);+}