From 8492cdd92cf5094f08c2dd8e7283a241baf3a938 Mon Sep 17 00:00:00 2001 From: GamblerIX <221324129+GamblerIX2@users.noreply.github.com> Date: Sun, 24 May 2026 17:13:35 +0800 Subject: [PATCH 1/3] docs: add AGENTS.MD to document available agent profiles --- AGENTS.MD | 91 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 91 insertions(+) create mode 100644 AGENTS.MD diff --git a/AGENTS.MD b/AGENTS.MD new file mode 100644 index 0000000..46604a5 --- /dev/null +++ b/AGENTS.MD @@ -0,0 +1,91 @@ +# Antigravity IDE 汉化覆盖范围说明 + +本文档详细列出了 **AntigravityChinesePack** 对 Antigravity IDE 各项功能和模块的中文汉化覆盖范围。本语言包专为 Antigravity 独有 UI 和专属功能设计。 + +--- + +## 📦 1. NLS 标准本地化翻译 + +本插件通过标准扩展本地化机制(配置于 `package.json` 中的 `localizations` 贡献点),覆盖了以下内置核心扩展的 UI 元素: + +| 扩展名称 / ID | 汉化覆盖模块与功能 | 翻译条目数 | +| :--- | :--- | :--- | +| **Antigravity 核心**
`google.antigravity` | AI 基础交互、谷歌账户登录与认证流程、设置导入/导出面板、通知提示 | 25+ | +| **内置浏览器**
`google.antigravity-browser-launcher` | 内置浏览器启动面板、无头浏览器环境切换交互 | 3 | +| **代码执行器**
`google.antigravity-code-executor` | 代码块在编辑器中直接运行的控制按钮及提示 | 1 | +| **开发容器**
`google.antigravity-dev-containers` | 开发容器 (Dev Containers) 创建、启动与关联配置项 | 8 | +| **远程连接 SSH**
`google.antigravity-remote-openssh` | 远程 SSH 连接管理、主机配置解析、身份认证交互 | 19 | +| **远程连接 WSL**
`google.antigravity-remote-wsl` | WSL 子系统连接生命周期管理、路径映射提示 | 17 | + +--- + +## 🔍 2. 硬编码补丁汉化覆盖 + +由于以下模块的配置项和界面文本是 React/TypeScript 混合硬编码(未提取为 NLS 翻译),本插件通过**补丁引擎**对它们的目标代码进行了源码级的中文替换: + +### 📁 Settings 配置项 (`out/jetskiAgent/main.js`) +覆盖了 IDE “设置”面板中所有关于 AI 助手、代码补全、浏览器和安全的特有配置,共包含 **150+ 处** 翻译: + +* **Agent 核心设置**: + * `Agent Auto-Fix Lints` $\rightarrow$ **Agent 自动修复 Lint**(自动感知编辑引入的错误并尝试修复) + * `Strict Mode` $\rightarrow$ **严格模式**(限制自主漏洞探测,所有高风险动作需要人工审核) + * `Review Policy` $\rightarrow$ **审查策略**(控制何时打断并请求用户审查) + * `Terminal Command Auto Execution` $\rightarrow$ **终端命令自动执行** + * `Agent Gitignore/Non-Workspace Access` $\rightarrow$ **Agent Gitignore/非工作区文件访问** + * `Auto-Continue` $\rightarrow$ **自动继续**(到达推理限制时自动开始下一轮调用) + * `Enable Sounds for Agent` $\rightarrow$ **Agent 声音提示** + * `Auto-Expand Changes Overview` $\rightarrow$ **自动展开更改概览** +* **Editor 编辑器与 Tab 代码补全**: + * `Suggestions in Editor` $\rightarrow$ **编辑器中的建议** + * `Tab Speed` $\rightarrow$ **Tab 速度**(设置 Tab 键补全提示的呈现速度) + * `Tab to Jump` $\rightarrow$ **Tab 跳转**(预测并一键跳转到下一个建议的编辑位置) + * `Tab to Import` $\rightarrow$ **Tab 导入**(一键快速添加或更新依赖导入) + * `Highlight After Accept` $\rightarrow$ **接受后高亮** +* **Browser 浏览器辅助**: + * `Enable Browser Tools` $\rightarrow$ **启用浏览器工具**(允许 Agent 访问外部 URL 和抓取网页) + * `Chrome Binary Path` $\rightarrow$ **Chrome 可执行文件路径** + * `Browser User Profile Path` $\rightarrow$ **浏览器用户配置路径** + * `Browser CDP Port` $\rightarrow$ **浏览器 CDP 端口** + * `Browser URL Allowlist` $\rightarrow$ **浏览器 URL 允许列表** + +--- + +### 💬 Cascade 聊天面板 (`extensions/antigravity/out/media/chat.js`) +覆盖了右侧 Agent 聊天 Webview 视窗中的所有交互组件与状态,共包含 **800+ 处** 替换: + +* **对话模式切换(Conversation Mode)**: + * `Planning` $\rightarrow$ **规划模式**(执行前进行深度调研并输出 Implementation Plan) + * `Fast` $\rightarrow$ **快速直跑模式**(简单任务直接执行,不生成规划文档) +* **思考过程展示(Thought Process)**: + * `Thinking for [time]` $\rightarrow$ **思考中 [时间]** / `Thought for [time]` $\rightarrow$ **思考了 [时间]** + * `Background Steps` $\rightarrow$ **后台步骤** + * `Auto-proceeded/Manually proceeded under review policy` $\rightarrow$ **已根据您的审查策略自动继续/手动继续** +* **产物管理器(Artifacts Manager)**: + * `Artifacts` $\rightarrow$ **产物** + * 描述文案 $\rightarrow$ **“产物是 Agent 在对话中创建的文件,用于帮助执行较长时间运行的任务并允许用户提供高级反馈。点击在编辑器中打开。”** + * 表格属性:`Artifact Name` $\rightarrow$ **产物名称** / `Last Updated` $\rightarrow$ **最后更新** +* **自定义与工作流管理**: + * `Customizations` $\rightarrow$ **自定义** + * `Rules` $\rightarrow$ **规则**(Edit rule $\rightarrow$ **编辑规则**,Refresh rules $\rightarrow$ **刷新规则**) + * `Workflows` $\rightarrow$ **工作流**(Edit workflow $\rightarrow$ **编辑工作流**) + * `MCP Servers` $\rightarrow$ **MCP 服务器**(Manage MCP Servers $\rightarrow$ **管理 MCP 服务器**) +* **交互按钮与反馈**: + * `Accept all` $\rightarrow$ **全部接受** / `Discard changes` $\rightarrow$ **放弃更改** + * `Good response / Bad response` $\rightarrow$ **好的响应 / 差的响应** + * `Connect to an existing conversation` $\rightarrow$ **连接到现有对话** + * `Capture screenshot` $\rightarrow$ **截取屏幕** / `Capture console logs` $\rightarrow$ **捕获控制台日志** + +--- + +### 🖥️ Workbench 主框架 (`out/vs/workbench/workbench.desktop.main.js`) +覆盖了全局应用框架相关的 AI 设置与快捷选项,共包含 **120+ 处** 替换: + +* **全局设置开关状态**: + * `On/Off` 枚举值 $\rightarrow$ **“开/关”**(影响全部二元开关的文本显示) +* **底栏与面板信息**: + * `AI Shortcuts` $\rightarrow$ **AI 快捷键** + * `Advanced Settings` $\rightarrow$ **高级设置** + * `Terminal execution policy` $\rightarrow$ **终端执行策略** + * `Review policy` $\rightarrow$ **审查策略** + * `JavaScript execution policy` $\rightarrow$ **JavaScript 执行策略** + * `Always Proceed / Agent Decides / Request Review` $\rightarrow$ **始终继续 / Agent 决定 / 请求审查** From d8c410137a589e7e0619fc70bc973953077df49f Mon Sep 17 00:00:00 2001 From: GamblerIX <221324129+GamblerIX2@users.noreply.github.com> Date: Sun, 24 May 2026 17:48:31 +0800 Subject: [PATCH 2/3] chore: ignore python cache directory and update patch script logic --- .gitignore | 1 + patch_zh.py | 88 ++++++++++++++++++++++++++++++++++++++++++++++------- 2 files changed, 78 insertions(+), 11 deletions(-) diff --git a/.gitignore b/.gitignore index 8b9981d..1e0c2b0 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ node_modules/ *.vsix .vscode/ +__pycache__/ diff --git a/patch_zh.py b/patch_zh.py index d16517e..b839b48 100644 --- a/patch_zh.py +++ b/patch_zh.py @@ -18,13 +18,35 @@ import hashlib import base64 -BASE = '/Applications/Antigravity.app/Contents/Resources/app' +def get_app_base(): + # macOS Candidates + mac_candidates = [ + '/Applications/Antigravity.app/Contents/Resources/app', + os.path.expanduser('~/Applications/Antigravity.app/Contents/Resources/app') + ] + for c in mac_candidates: + if os.path.exists(c): + return c + + # Windows Candidates + localappdata = os.environ.get('LOCALAPPDATA', '') + if localappdata: + win_candidate = os.path.join(localappdata, 'Programs', 'Antigravity IDE', 'resources', 'app') + if os.path.exists(win_candidate): + return win_candidate + + return None + +BASE = get_app_base() +if not BASE: + BASE = '/Applications/Antigravity.app/Contents/Resources/app' + TARGETS = { - 'settings': f'{BASE}/out/jetskiAgent/main.js', - 'chat': f'{BASE}/extensions/antigravity/out/media/chat.js', - 'workbench': f'{BASE}/out/vs/workbench/workbench.desktop.main.js', + 'settings': os.path.join(BASE, 'out', 'jetskiAgent', 'main.js'), + 'chat': os.path.join(BASE, 'extensions', 'antigravity', 'out', 'media', 'chat.js'), + 'workbench': os.path.join(BASE, 'out', 'vs', 'workbench', 'workbench.desktop.main.js'), } -PRODUCT_JSON = f'{BASE}/product.json' +PRODUCT_JSON = os.path.join(BASE, 'product.json') def get_settings_replacements(): @@ -144,6 +166,14 @@ def get_settings_replacements(): ('label:"Open Workspace"', 'label:"打开工作区"'), ('label:"Open New Workspace"', 'label:"打开新工作区"'), ('label:"Open New Remote Workspace"', 'label:"打开新远程工作区"'), + # === v1.107.0 Settings updates === + ('{value:e0.TURBO,label:"Always Proceed",description:"Agent never asks for review. This maximizes the autonomy of the Agent, but also has the highest risk of the Agent operating over unsafe or injected Artifact content.",disabledInSecureMode:!0}', + '{value:e0.TURBO,label:"始终继续",description:"Agent 从不请求审查。这最大化了 Agent 的自主性,但也具有 Agent 操作不安全或注入的 Artifact 内容的最高风险。",disabledInSecureMode:!0}'), + ('{value:e0.ALWAYS,label:"Always Ask",description:"Agent always asks for review.",disabledInSecureMode:!1}', + '{value:e0.ALWAYS,label:"总是询问",description:"Agent 总是请求审查。",disabledInSecureMode:!1}'), + ('children:["Settings - ",e]', 'children:["设置 - ",e]'), + ('"aria-label":"Add context"', '"aria-label":"添加上下文"'), + ('tooltipText:"Edit Model"', 'tooltipText:"编辑模型"'), ] @@ -432,6 +462,13 @@ def get_chat_replacements(): ('children:"Added Annotation"', 'children:"已添加注释"'), ('children:"Edit Model"', 'children:"编辑模型"'), ('label:"Run"', 'label:"运行"'), + # === v1.107.0 Chat updates === + ('children:"Open Diff"', 'children:"打开差异"'), + ('label:"Allow Once"', 'label:"允许一次"'), + ('label:"Deny"', 'label:"拒绝"'), + ('children:"Additional Options"', 'children:"其他选项"'), + ('label:"Try Again"', 'label:"再试一次"'), + ('title:"Add Context"', 'title:"添加上下文"'), ] @@ -491,8 +528,8 @@ def update_checksums(): checksums = product.get('checksums', {}) updated = 0 for key in checksums: - for prefix in [f'{BASE}/out/', f'{BASE}/']: - filepath = prefix + key + for prefix in [os.path.join(BASE, 'out'), BASE]: + filepath = os.path.normpath(os.path.join(prefix, key)) if os.path.exists(filepath): with open(filepath, 'rb') as f: data = f.read() @@ -629,6 +666,31 @@ def get_workbench_replacements(): ('label:"Open Agent"', 'label:"打开 Agent"'), ('label:"Reset to default"', 'label:"重置为默认"'), ('label:"Submit"', 'label:"提交"'), + # === v1.107.0 Workbench updates === + ('t.ON="On",t.OFF="Off"', 't.ON="开",t.OFF="关"'), + ('children:"Terminal execution policy"', 'children:"终端执行策略"'), + ('children:"Review policy"', 'children:"审查策略"'), + ('children:"JavaScript execution policy"', 'children:"JavaScript 执行策略"'), + ('children:"Always Proceed"', 'children:"始终继续"'), + ('children:"Request Review"', 'children:"请求审查"'), + ('children:"Always Ask"', 'children:"始终询问"'), + ('children:"Disabled"', 'children:"已禁用"'), + ('{value:Vz.TURBO,label:"Always Proceed",description:"Agent never asks for review. This maximizes the autonomy of the Agent, but also has the highest risk of the Agent operating over unsafe or injected Artifact content.",disabledInSecureMode:!0}', + '{value:Vz.TURBO,label:"始终继续",description:"Agent 从不请求审查。这最大化了 Agent 的自主性,但也具有 Agent 操作不安全或注入的 Artifact 内容的最高风险。",disabledInSecureMode:!0}'), + ('{value:Vz.ALWAYS,label:"Always Ask",description:"Agent always asks for review.",disabledInSecureMode:!1}', + '{value:Vz.ALWAYS,label:"始终询问",description:"Agent 始终请求审查。",disabledInSecureMode:!1}'), + ('{label:"Always Proceed",value:$9.TURBO,description:"Trust the agent to do tasks end-to-end",isDefaultWhenAvailable:!0}', + '{label:"始终继续",value:$9.TURBO,description:"信任 Agent 端到端地执行任务",isDefaultWhenAvailable:!0}'), + ('{label:"Agent Decides",value:$9.AUTO,description:"Assist the agent to complete tasks"}', + '{label:"Agent 决定",value:$9.AUTO,description:"辅助 Agent 完成任务"}'), + ('{label:"Request Review",value:$9.ALWAYS,description:"Collaborate with the agent to complete tasks"}', + '{label:"请求审查",value:$9.ALWAYS,description:"与 Agent 协作完成任务"}'), + ('{label:"Always Proceed",value:$U.EAGER,description:"Always auto-execute commands unless they are in your deny list. This also allows Agent to auto-execute Browser controls."}', + '{label:"始终继续",value:$U.EAGER,description:"始终自动执行命令,除非它们在您的拒绝列表中。这也允许 Agent 自动执行浏览器控制。"}'), + ('{label:"Request Review",value:$U.OFF,description:"Never auto-execute commands unless they are in your allow list.",isDefaultWhenAvailable:!0}', + '{label:"请求审查",value:$U.OFF,description:"从不自动执行命令,除非它们在您的允许列表中。",isDefaultWhenAvailable:!0}'), + ('{label:"Slow",value:Fwe.SLOW}', '{label:"慢速",value:Fwe.SLOW}'), + ('{label:"Fast",value:Fwe.FAST,isDefaultWhenAvailable:!0}', '{label:"快速",value:Fwe.FAST,isDefaultWhenAvailable:!0}'), ] @@ -640,8 +702,12 @@ def apply_patch(): total += patch_file(TARGETS['settings'], get_settings_replacements(), 'Settings') print() - print('📦 [2/4] 汉化 Agent 聊天面板 (chat.js)...') - total += patch_file(TARGETS['chat'], get_chat_replacements(), 'Chat') + print('📦 [2/4] 汉化 Agent 聊天面板 (chat.js / workbench)...') + if os.path.exists(TARGETS['chat']): + total += patch_file(TARGETS['chat'], get_chat_replacements(), 'Chat') + else: + print(' ℹ️ chat.js 不存在,应用 Chat 替换到 workbench.desktop.main.js') + total += patch_file(TARGETS['workbench'], get_chat_replacements(), 'Chat in Workbench') print() print('📦 [3/4] 汉化快速设置面板 (workbench.desktop.main.js)...') @@ -652,7 +718,7 @@ def apply_patch(): update_checksums() print(f'\n🎉 全部完成!共替换 {total} 处') - print('📌 请完全退出 Antigravity (Cmd+Q) 后重新打开即可生效') + print('📌 请重启 Antigravity 以生效') def revert_patch(): @@ -671,7 +737,7 @@ def revert_patch(): shutil.copy2(pj_backup, PRODUCT_JSON) print(f' ✅ 已恢复: product.json') - print('📌 请完全退出 Antigravity (Cmd+Q) 后重新打开即可生效') + print('📌 请重启 Antigravity 以生效') if __name__ == '__main__': From 4098863e42a5b6a6903bb0969179f264940c1809 Mon Sep 17 00:00:00 2001 From: GamblerIX <221324129+GamblerIX2@users.noreply.github.com> Date: Fri, 29 May 2026 22:33:27 +0800 Subject: [PATCH 3/3] feat: update language patch version and automate string replacement logic in extension and script --- extension.js | 248 +++++++++++++++++++++++++++++++++++++++++++++++++-- patch_zh.py | 174 ++++++++++++++++++++++++++++++++++++ 2 files changed, 415 insertions(+), 7 deletions(-) diff --git a/extension.js b/extension.js index 5363440..ae54a88 100644 --- a/extension.js +++ b/extension.js @@ -10,7 +10,7 @@ const crypto = require('crypto'); // 路径配置 // ═══════════════════════════════════════════════════════════════ function getAppBase() { - // Antigravity.app 的 Resources/app 路径 + // macOS Candidates const candidates = [ '/Applications/Antigravity.app/Contents/Resources/app', path.join(process.env.HOME || '', 'Applications/Antigravity.app/Contents/Resources/app'), @@ -18,6 +18,12 @@ function getAppBase() { for (const c of candidates) { if (fs.existsSync(c)) return c; } + // Windows Candidates + const localappdata = process.env.LOCALAPPDATA; + if (localappdata) { + const winCandidate = path.join(localappdata, 'Programs', 'Antigravity IDE', 'resources', 'app'); + if (fs.existsSync(winCandidate)) return winCandidate; + } // Fallback: 从 vscode 的 appRoot 推导 const appRoot = vscode.env.appRoot; if (appRoot && fs.existsSync(appRoot)) return appRoot; @@ -193,6 +199,135 @@ function getSettingsReplacements() { ['," result",a===1?"":"s"', '," 个结果"'], ['," result",t.resources.length===1?"":"s"', '," 个结果"'], ['," result",a.length===1?"":"s"," "', '," 个结果 "'], + // === v1.107.0 Settings updates === + ['{value:e0.TURBO,label:"Always Proceed",description:"Agent never asks for review. This maximizes the autonomy of the Agent, but also has the highest risk of the Agent operating over unsafe or injected Artifact content.",disabledInSecureMode:!0}', + '{value:e0.TURBO,label:"始终继续",description:"Agent 从不请求审查。这最大化了 Agent 的自主性,但也具有 Agent 操作不安全或注入的 Artifact 内容的最高风险。",disabledInSecureMode:!0}'], + ['{value:e0.ALWAYS,label:"Always Ask",description:"Agent always asks for review.",disabledInSecureMode:!1}', + '{value:e0.ALWAYS,label:"总是询问",description:"Agent 总是请求审查。",disabledInSecureMode:!1}'], + ['children:["Settings - ",e]', 'children:["设置 - ",e]'], + ['"aria-label":"Add context"', '"aria-label":"添加上下文"'], + ['tooltipText:"Edit Model"', 'tooltipText:"编辑模型"'], + // === Remaining settings translations === + ['children:["Select one of the ",t?"two":"three"," options. Agent settings and permissions can be further customized below."', + 'children:["从",t?"两个":"三个","个选项中选择一个。Agent 设置和权限可在下方进一步自定义。"'], + ['children:"Agent security mode"', 'children:"Agent 安全模式"'], + ['children:"Full access"', 'children:"完全访问"'], + ['children:"Agents have full access to your machine and external resources."', 'children:"Agent 可以完全访问您的计算机和外部资源。"'], + ['children:"Sandboxed"', 'children:"沙盒化"'], + ['children:"Agents run in a secure sandbox that restricts access to external resources outside of your trusted folders."', 'children:"Agent 运行在安全的沙盒中,限制访问信任文件夹以外的外部资源。"'], + ['children:"Strict"', 'children:"严格"'], + ['children:"Terminal commands always require review and the agent cannot access files outside of its given workspaces."', 'children:"终端命令始终需要审查,且 Agent 无法访问指定工作区以外的文件。"'], + ['require your approval before running.\\n\\nNote: A change to this setting will only apply to new messages sent to Agent. In-progress responses will use the previous setting value.', + '在运行前需要您的批准。\\n\\n注意:对此设置的更改仅适用于发送给 Agent 的新消息。正在进行的响应将使用以前的设置值。'], + ['label:"Enable Shell Integration"', 'label:"启用 Shell 集成"'], + ['description:"When enabled, Agent will use IDE\'s shell integration to detect and report terminal command execution."', + 'description:"启用后,Agent 将使用 IDE 的 Shell 集成来检测并报告终端命令的执行。"'], + ['children:"File Access"', 'children:"文件访问"'], + ['description:"Allows the agent to access files outside of your current workspace."', + 'description:"允许 Agent 访问当前工作区以外的文件。"'], + ['children:"Planning"', 'children:"规划"'], + ['description:"Specifies Agent\'s behavior when asking for review on artifacts, which are documents it creates to enable a richer conversation experience."', + 'description:"指定 Agent 在请求审查 Artifact(即为了提供更丰富的对话体验而创建的文档)时的行为。"'], + ['children:"Automation"', 'children:"自动化"'], + ['children:"History"', 'children:"历史记录"'], + ['children:"General"', 'children:"常规"'], + ['label:"Explain and Fix in Current Conversation"', 'label:"在当前对话中解释和修复"'], + ['description:"When enabled, \'Explain and Fix\' actions will continue in the current conversation instead of starting a new one."', + 'description:"启用后,“解释并修复”操作将在当前对话中继续,而不是开始新对话。"'], + ['children:"Advanced"', 'children:"高级"'], + ['children:"Advanced File Access"', 'children:"高级文件访问"'], + ['label:"Read Files",description:"Paths the agent can read."', 'label:"读取文件",description:"Agent 可以读取的路径。"'], + ['label:"Read Files",description:"Paths the agent can read inside this workspace."', 'label:"读取文件",description:"Agent 在此工作区中可以读取的路径。"'], + ['label:"Write Files",description:"Paths the agent can modify."', 'label:"写入文件",description:"Agent 可以修改的路径。"'], + ['label:"Write Files",description:"Paths the agent can modify inside this workspace."', 'label:"写入文件",description:"Agent 在此工作区中可以修改的路径。"'], + ['children:"Advanced Command Access"', 'children:"高级命令访问"'], + ['label:"Terminal Commands",description:"Terminal commands the agent can execute."', 'label:"终端命令",description:"Agent 可以执行的终端命令。"'], + ['label:"Terminal Commands",description:"Terminal commands the agent can execute in this workspace."', 'label:"终端命令",description:"Agent 在此工作区中可以执行的终端命令。"'], + ['label:"Commands Outside Sandbox",description:"Allow/deny agent command execution outside the sandbox."', + 'label:"沙盒外的命令",description:"允许/拒绝 Agent 在沙盒外执行命令。"'], + ['label:"Commands Outside Sandbox",description:"Commands the agent can run outside the sandbox."', + 'label:"沙盒外的命令",description:"Agent 可以在沙盒外运行的命令。"'], + ['label:"Commands Outside Sandbox",description:"Commands the agent can run outside the sandbox in this workspace."', + 'label:"沙盒外的命令",description:"Agent 在此工作区的沙盒外可以运行的命令。"'], + ['label:"MCP Tools",description:"Configure external tools via Model Context Protocol."', + 'label:"MCP 工具",description:"通过 Model Context Protocol 配置外部工具。"'], + ['label:"MCP Tools",description:"External tools the agent can call via Model Context Protocol."', + 'label:"MCP 工具",description:"Agent 可通过 Model Context Protocol 调用的外部工具。"'], + ['children:"Advanced Web Access"', 'children:"高级网络访问"'], + ['label:"Read URLs",description:"Allow/deny agent read access to specific URLs or domains."', + 'label:"读取 URL",description:"允许/拒绝 Agent 对特定 URL 或域名的读取访问。"'], + ['label:"Read URLs",description:"URLs the agent can read or open in the browser."', + 'label:"读取 URL",description:"Agent 可以在浏览器中读取或打开的 URL。"'], + ['label:"Read URLs",description:"URLs the agent can read or open in this workspace."', + 'label:"读取 URL",description:"Agent 在此工作区中可以读取或打开的 URL。"'], + ['label:"Execute URLs",description:"URLs the agent can actuate on using the browser."', + 'label:"执行 URL",description:"Agent 可以使用浏览器操作 the URL。"'], + ['label:"Execute URLs",description:"Allow/deny agent browser actuation access to specific URLs."', + 'label:"执行 URL",description:"允许/拒绝 Agent 对特定 URL 的浏览器操作访问。"'], + ['label:"Execute URLs",description:"URLs the agent can actuate on in this workspace."', + 'label:"执行 URL",description:"Agent 在此工作区中可以操作 the URL。"'], + ['label:t="Advanced Settings"', 'label:t="高级设置"'], + ['label:"Enable Demo Mode (Beta)"', 'label:"启用演示模式 (Beta)"'], + ['description:\'When enabled, your UI will be slightly modified to ensure more consistent demos. This is only recommended for demo purposes. In most cases, you can run "Antigravity: Start Demo Mode" and "Antigravity: Stop Demo Mode" to control this switch and update your ~/.gemini/antigravity data directory.\'', + 'description:\'启用后,您的 UI 将被稍微修改以确保演示的一致性。仅建议用于演示目的。在大多数情况下,您可以运行 "Antigravity: Start Demo Mode" and "Antigravity: Stop Demo Mode" 来控制此开关并更新您的 ~/.gemini/antigravity 数据目录。\''], + ['description:`When toggled on, ${r.product.nameShort} collects usage data to help Google enhance performance and features.`', + 'description:`开启后,${r.product.nameShort} 将收集使用数据,以帮助 Google 提升性能和功能。`'], + ['label:"Marketing Emails",description:`Receive product updates, tips, and promotions from Google ${r.product.nameShort} via email.`', + 'label:"营销邮件",description:`通过电子邮件接收来自 Google ${r.product.nameShort} 的产品更新、提示和促销信息。`'], + ['children:["By using this app, you agree to its",', 'children:["使用此应用即表示您同意其",'], + ['className:"text-primary hover:underline",children:"Terms of Service"', 'className:"text-primary hover:underline",children:"服务条款"'], + ['className:"text-lg font-medium mb-4",children:"Terms of Service & Data Use"', 'className:"text-lg font-medium mb-4",children:"服务条款与数据使用"'], + ['description:p(jt,{children:["Configure the browser subagent. It requires",', 'description:p(jt,{children:["配置浏览器子 Agent。它需要安装",'], + ['`Refreshes in ${n} day${n>1?"s":""}, ${a} hour${a>1?"s":""}`', '`将在 ${n} 天 ${a} 小时后刷新`'], + ['`Refreshes in ${a} hour${a>1?"s":""}, ${i} minute${i>1?"s":""}`', '`将在 ${a} 小时 ${i} 分钟后刷新`'], + ['`Refreshes in ${i} minute${i>1?"s":""}`', '`将在 ${i} 分钟后刷新`'], + ['description:"View your available model quota. Quota refreshes periodically based on your plan."', + 'description:"查看您可用的模型配额。配额会根据您的方案定期刷新。"'], + ['"% of the customization budget is available."', '"% 的定制预算当前可用。"'], + ['children:V?"Hide breakdown":`Show ${I.length} breakdown${I.length===1?"":"s"}`', + 'children:V?"隐藏明细":`显示 ${I.length} 项明细`'], + ['"Plugin: "', '"插件: "'], + ['children:["Plugins are packaged collections of skills and MCPs to help the Agent"," ",a?`in ${a} `:"","work with Google developer products. You can always change your choices in Settings."]', + 'children:["插件是技能和 MCP 的打包集合,用于帮助 Agent"," ",a?`在 ${a} `:"","中协同谷歌开发产品工作。您随时可以在设置中更改您的选择。"]'], + ['children:["Plugins are packaged collections of skills and MCPs to help the Agent in ",e," work with Google developer products. You can always change your choices in Settings."]', + 'children:["插件是技能和 MCP 的打包集合,用于帮助 Agent 在 ",e," 中协同谷歌开发产品工作。您随时可以在设置中更改您的选择。"]'], + ['children:"No MCP Servers"', 'children:"没有 MCP 服务器"'], + ['children:"You currently don\'t have any MCP Servers installed. Add an MCP server above or add a custom one via the MCP Config."', + 'children:"您当前未安装任何 MCP 服务器。请在上方添加 MCP 服务器,或通过 MCP 配置添加自定义服务器。"'], + ['label:"Account",description:"Manage your plan, credentials, and general preferences."', + 'label:"账户",description:"管理您的方案、凭据和常规偏好设置。"'], + ['label:"Appearance",description:"Configure the agent\'s visual theme and display preferences."', + 'label:"外观",description:"配置 Agent 的视觉主题和显示偏好设置。"'], + ['label:"Notifications",description:"Manage your notification preferences."', + 'label:"通知",description:"管理您的通知偏好设置。"'], + ['label:"Models",description:"Configure AI models and view your quota."', + 'label:"模型",description:"配置 AI 模型并查看您的配额。"'], + ['label:"Customizations",description:"Configure default behaviors, skills, and MCP servers."', + 'label:"自定义",description:"配置默认行为、技能和 MCP 服务器。"'], + ['label:"Browser Settings",description:"Configure the browser subagent. It requires Google Chrome to be installed."', + 'label:"浏览器设置",description:"配置浏览器子 Agent。它需要安装 Google Chrome。"'], + ['label:"Editor Settings",description:"Configure editor-specific behaviors and shortcuts."', + 'label:"编辑器设置",description:"配置编辑器特定的行为和快捷键。"'], + ['children:"Account & Plan"', 'children:"账户与方案"'], + ['label:"Email",description:a?"Peter Pan":n.email', 'label:"电子邮件",description:a?"Peter Pan":n.email'], + ['children:"Theme"', 'children:"主题"'], + ['children:"Chat Settings"', 'children:"聊天设置"'], + ['label:"Verbose agent chat",description:"Display and preserve intermediate thinking steps"', + 'label:"详细 Agent 聊天",description:"显示并保留中间思考步骤"'], + ['label:"Notification Settings",description:"To modify notification settings, open your operating system\'s system preferences."', + 'label:"通知设置",description:"要修改通知设置,请打开您操作系统的系统偏好设置。"'], + ['label:"Model Quota"', 'label:"模型配额"'], + ['children:"Actuation Permissions"', 'children:"执行操作权限"'], + ['label:"Browser Actuation Rules",description:"Configure allowed and denied URLs for browser actuation."', + 'label:"浏览器执行规则",description:"配置允许和拒绝的浏览器执行 URL。"'], + ['children:"Marketplace"', 'children:"市场"'], + ['description:"Changes the base URL on each extension page. You must restart Antigravity IDE to use the new marketplace after changing this value."', + 'description:"更改每个扩展页面的基础 URL。更改此值后,您必须重启 Antigravity IDE 才能使用新的市场。"'], + ['description:"Changes the base URL for marketplace search results. You must restart Antigravity IDE to use the new marketplace after changing this value."', + 'description:"更改市场搜索结果的基础 URL。更改此值后,您必须重启 Antigravity IDE 才能使用新的市场。"'], + ['children:"Selection Actions"', 'children:"选中操作"'], + ['label:"Editor Settings",description:"To modify editor settings, open Settings within the editor window."', + 'label:"编辑器设置",description:"要修改编辑器设置,请在编辑器窗口中打开设置。"'], ]; } @@ -1170,6 +1305,91 @@ function getWorkbenchReplacements() { ['," result",s===1?"":"s"', '," 个结果"'], ['," result",i.resources.length===1?"":"s"', '," 个结果"'], ['," result",s.length===1?"":"s"," "', '," 个结果 "'], + // === v1.107.0 Chat updates === + ['children:"Open Diff"', 'children:"打开差异"'], + ['label:"Allow Once"', 'label:"允许一次"'], + ['label:"Deny"', 'label:"拒绝"'], + ['children:"Additional Options"', 'children:"其他选项"'], + ['label:"Try Again"', 'label:"再试一次"'], + ['title:"Add Context"', 'title:"添加上下文"'], + // === v1.107.0 Workbench updates === + ['t.ON="On",t.OFF="Off"', 't.ON="开",t.OFF="关"'], + ['children:"Terminal execution policy"', 'children:"终端执行策略"'], + ['children:"Review policy"', 'children:"审查策略"'], + ['children:"JavaScript execution policy"', 'children:"JavaScript 执行策略"'], + ['children:"Always Proceed"', 'children:"始终继续"'], + ['children:"Request Review"', 'children:"请求审查"'], + ['children:"Always Ask"', 'children:"始终询问"'], + ['children:"Disabled"', 'children:"已禁用"'], + ['{value:Vz.TURBO,label:"Always Proceed",description:"Agent never asks for review. This maximizes the autonomy of the Agent, but also has the highest risk of the Agent operating over unsafe or injected Artifact content.",disabledInSecureMode:!0}', + '{value:Vz.TURBO,label:"始终继续",description:"Agent 从不请求审查。这最大化了 Agent 的自主性,但也具有 Agent 操作不安全或注入的 Artifact 内容的最高风险。",disabledInSecureMode:!0}'], + ['{value:Vz.ALWAYS,label:"Always Ask",description:"Agent always asks for review.",disabledInSecureMode:!1}', + '{value:Vz.ALWAYS,label:"始终询问",description:"Agent 始终请求审查。",disabledInSecureMode:!1}'], + ['{label:"Always Proceed",value:$9.TURBO,description:"Trust the agent to do tasks end-to-end",isDefaultWhenAvailable:!0}', + '{label:"始终继续",value:$9.TURBO,description:"信任 Agent 端到端地执行任务",isDefaultWhenAvailable:!0}'], + ['{label:"Agent Decides",value:$9.AUTO,description:"Assist the agent to complete tasks"}', + '{label:"Agent 决定",value:$9.AUTO,description:"辅助 Agent 完成任务"}'], + ['{label:"Request Review",value:$9.ALWAYS,description:"Collaborate with the agent to complete tasks"}', + '{label:"请求审查",value:$9.ALWAYS,description:"与 Agent 协作完成任务"}'], + ['{label:"Always Proceed",value:$U.EAGER,description:"Always auto-execute commands unless they are in your deny list. This also allows Agent to auto-execute Browser controls."}', + '{label:"始终继续",value:$U.EAGER,description:"始终自动执行命令,除非它们在您的拒绝列表中。这也允许 Agent 自动执行浏览器控制。"}'], + ['{label:"Request Review",value:$U.OFF,description:"Never auto-execute commands unless they are in your allow list.",isDefaultWhenAvailable:!0}', + '{label:"请求审查",value:$U.OFF,description:"从不自动执行命令,除非它们在您的允许列表中。",isDefaultWhenAvailable:!0}'], + ['{label:"Slow",value:Fwe.SLOW}', '{label:"慢速",value:Fwe.SLOW}'], + ['{label:"Fast",value:Fwe.FAST,isDefaultWhenAvailable:!0}', '{label:"快速",value:Fwe.FAST,isDefaultWhenAvailable:!0}'], + // === Remaining workbench/feedback/shortcuts translations === + ['label:"Open Conversation Picker"', 'label:"打开对话选择器"'], + ['label:"Open File Search"', 'label:"打开文件搜索"'], + ['label:"Focus Input"', 'label:"聚焦输入框"'], + ['label:"New Conversation"', 'label:"新建对话"'], + ['label:"Open Workspace Selector"', 'label:"打开工作区选择器"'], + ['label:"Go Back"', 'label:"后退"'], + ['label:"Go Forward"', 'label:"前进"'], + ['label:"File Picker"', 'label:"文件选择器"'], + ['label:"Toggle Editor"', 'label:"切换编辑器"'], + ['label:"Select Previous Conversation"', 'label:"选择上一个对话"'], + ['label:"Select Next Conversation"', 'label:"选择下一个对话"'], + ['label:"Toggle Model Selector"', 'label:"切换模型选择器"'], + ['label:"Start Voice Recording"', 'label:"开始语音录制"'], + ['label:"Stop Voice Recording"', 'label:"停止语音录制"'], + ['label:"Find in Pane"', 'label:"在窗格中查找"'], + ['label:"Toggle Sidebar"', 'label:"切换侧边栏"'], + ['label:"Toggle Auxiliary Pane"', 'label:"切换辅助窗格"'], + ['label:"Toggle Terminal"', 'label:"切换终端"'], + ['label:"Open Settings"', 'label:"打开设置"'], + ['label:"Zoom In"', 'label:"放大"'], + ['label:"Zoom Out"', 'label:"缩小"'], + ['label:"Reset Zoom"', 'label:"重置缩放"'], + ['children:"Recommended"', 'children:"推荐"'], + ['children:"Navigation"', 'children:"导航"'], + ['children:"Conversation"', 'children:"对话"'], + ['children:"Layout Controls"', 'children:"布局控制"'], + ['children:"Shortcuts"', 'children:"快捷键"'], + ['description:"Keyboard shortcuts for quick navigation and control."', 'description:"用于快速导航和控制的键盘快捷键。"'], + ['children:"Feedback Type"', 'children:"反馈类型"'], + ['"bug-report":"Bug Report"', '"bug-report":"Bug 报告"'], + ['"feature-request":"Feature Request"', '"feature-request":"功能请求"'], + ['"auth-and-billing":"Auth and Billing"', '"auth-and-billing":"认证与计费"'], + ['"general-feedback":"General Feedback"', '"general-feedback":"常规反馈"'], + ['children:"Please describe the issue in detail. The more actionable your feedback, the quicker our team can address your request. Some helpful information includes:"', + 'children:"请详细描述该问题。您的反馈越具可操作性,我们的团队就能越快处理您的请求。一些有帮助的信息包括:"'], + ['children:"Steps to reproduce the issue"', 'children:"重现问题的步骤"'], + ['children:"Expected behavior"', 'children:"预期行为"'], + ['children:"Actual behavior"', 'children:"实际行为"'], + ['children:"Any error messages"', 'children:"任何错误消息"'], + ['children:"Any relevant information"', 'children:"任何相关信息"'], + ['"bug-report":"Describe the bug you encountered..."', '"bug-report":"请描述您遇到的 Bug..."'], + ['children:"Steps to Reproduce"', 'children:"重现步骤"'], + ['placeholder:"Please list the steps to reproduce the issue"', 'placeholder:"请列出重现该问题的步骤"'], + ['children:"Attach a screenshot (optional)"', 'children:"附加屏幕截图 (可选)"'], + ['label:"Attach Antigravity server logs"', 'label:"附加 Antigravity 服务器日志"'], + ['label:"Send feedback as "+e.email', 'label:"发送反馈,身份为:"+e.email'], + ['children:"We recommend attaching logs. Attaching logs will help the Antigravity team act on and prioritize your feedback."', + 'children:"我们建议附加日志。附加日志将帮助 Antigravity 团队针对您的反馈进行处理并排定优先级。"'], + ['title:"Model quota reached"', 'title:"已达到模型配额限制"'], + ["` Your plan's baseline quota will refresh on ${o}.`", "` 您方案的基准配额将在 ${o} 刷新。`"], + ['label:d||"Upgrade"', 'label:d||"升级"'], + ['children:n.userTier?.upgradeButtonText||"Upgrade"', 'children:n.userTier?.upgradeButtonText||"升级"'], ]; } @@ -1358,15 +1578,21 @@ function applyAllPatches(silent) { const targets = getTargets(base); const results = []; - // Check if all files have current patch version - const allCurrent = Object.values(targets).every(f => isPatchCurrent(f)); + // Check which targets are active/exist + const activeTargets = [targets.settings, targets.workbench]; + if (fs.existsSync(targets.chat)) { + activeTargets.push(targets.chat); + } + + // Check if all active files have current patch version + const allCurrent = activeTargets.every(f => isPatchCurrent(f)); if (allCurrent) { if (!silent) vscode.window.showInformationMessage('汉化补丁已是最新状态'); return true; } // Revert files that have old patches before re-applying - for (const filepath of Object.values(targets)) { + for (const filepath of activeTargets) { const ver = getPatchVersion(filepath); if (ver && ver !== PATCH_VERSION) { revertFile(filepath); @@ -1375,7 +1601,11 @@ function applyAllPatches(silent) { // Apply patches results.push(patchFile(targets.settings, getSettingsReplacements(), 'Settings')); - results.push(patchFile(targets.chat, getChatReplacements(), 'Chat')); + if (fs.existsSync(targets.chat)) { + results.push(patchFile(targets.chat, getChatReplacements(), 'Chat')); + } else { + results.push(patchFile(targets.workbench, getChatReplacements(), 'Chat in Workbench')); + } results.push(patchFile(targets.workbench, getWorkbenchReplacements(), 'Workbench')); // Update checksums @@ -1408,9 +1638,13 @@ function revertAllPatches() { } const targets = getTargets(base); - let reverted = 0; + const activeTargets = [targets.settings, targets.workbench]; + if (fs.existsSync(targets.chat)) { + activeTargets.push(targets.chat); + } - for (const filepath of Object.values(targets)) { + let reverted = 0; + for (const filepath of activeTargets) { if (revertFile(filepath)) reverted++; } diff --git a/patch_zh.py b/patch_zh.py index b839b48..839277e 100644 --- a/patch_zh.py +++ b/patch_zh.py @@ -174,6 +174,127 @@ def get_settings_replacements(): ('children:["Settings - ",e]', 'children:["设置 - ",e]'), ('"aria-label":"Add context"', '"aria-label":"添加上下文"'), ('tooltipText:"Edit Model"', 'tooltipText:"编辑模型"'), + # === Remaining settings translations === + ('children:["Select one of the ",t?"two":"three"," options. Agent settings and permissions can be further customized below."', + 'children:["从",t?"两个":"三个","个选项中选择一个。Agent 设置和权限可在下方进一步自定义。"'), + ('children:"Agent security mode"', 'children:"Agent 安全模式"'), + ('children:"Full access"', 'children:"完全访问"'), + ('children:"Agents have full access to your machine and external resources."', 'children:"Agent 可以完全访问您的计算机和外部资源。"'), + ('children:"Sandboxed"', 'children:"沙盒化"'), + ('children:"Agents run in a secure sandbox that restricts access to external resources outside of your trusted folders."', 'children:"Agent 运行在安全的沙盒中,限制访问信任文件夹以外的外部资源。"'), + ('children:"Strict"', 'children:"严格"'), + ('children:"Terminal commands always require review and the agent cannot access files outside of its given workspaces."', 'children:"终端命令始终需要审查,且 Agent 无法访问指定工作区以外的文件。"'), + ('require your approval before running.\\n\\nNote: A change to this setting will only apply to new messages sent to Agent. In-progress responses will use the previous setting value.', + '在运行前需要您的批准。\\n\\n注意:对此设置的更改仅适用于发送给 Agent 的新消息。正在进行的响应将使用以前的设置值。'), + ('label:"Enable Shell Integration"', 'label:"启用 Shell 集成"'), + ('description:"When enabled, Agent will use IDE\'s shell integration to detect and report terminal command execution."', + 'description:"启用后,Agent 将使用 IDE 的 Shell 集成来检测并报告终端命令的执行。"'), + ('children:"File Access"', 'children:"文件访问"'), + ('description:"Allows the agent to access files outside of your current workspace."', + 'description:"允许 Agent 访问当前工作区以外的文件。"'), + ('children:"Planning"', 'children:"规划"'), + ('description:"Specifies Agent\'s behavior when asking for review on artifacts, which are documents it creates to enable a richer conversation experience."', + 'description:"指定 Agent 在请求审查 Artifact(即为了提供更丰富的对话体验而创建的文档)时的行为。"'), + ('children:"Automation"', 'children:"自动化"'), + ('children:"History"', 'children:"历史记录"'), + ('children:"General"', 'children:"常规"'), + ('label:"Explain and Fix in Current Conversation"', 'label:"在当前对话中解释和修复"'), + ('description:"When enabled, \'Explain and Fix\' actions will continue in the current conversation instead of starting a new one."', + 'description:"启用后,“解释并修复”操作将在当前对话中继续,而不是开始新对话。"'), + ('children:"Advanced"', 'children:"高级"'), + ('children:"Advanced File Access"', 'children:"高级文件访问"'), + ('label:"Read Files",description:"Paths the agent can read."', 'label:"读取文件",description:"Agent 可以读取的路径。"'), + ('label:"Read Files",description:"Paths the agent can read inside this workspace."', 'label:"读取文件",description:"Agent 在此工作区中可以读取的路径。"'), + ('label:"Write Files",description:"Paths the agent can modify."', 'label:"写入文件",description:"Agent 可以修改的路径。"'), + ('label:"Write Files",description:"Paths the agent can modify inside this workspace."', 'label:"写入文件",description:"Agent 在此工作区中可以修改的路径。"'), + ('children:"Advanced Command Access"', 'children:"高级命令访问"'), + ('label:"Terminal Commands",description:"Terminal commands the agent can execute."', 'label:"终端命令",description:"Agent 可以执行的终端命令。"'), + ('label:"Terminal Commands",description:"Terminal commands the agent can execute in this workspace."', 'label:"终端命令",description:"Agent 在此工作区中可以执行的终端命令。"'), + ('label:"Commands Outside Sandbox",description:"Allow/deny agent command execution outside the sandbox."', + 'label:"沙盒外的命令",description:"允许/拒绝 Agent 在沙盒外执行命令。"'), + ('label:"Commands Outside Sandbox",description:"Commands the agent can run outside the sandbox."', + 'label:"沙盒外的命令",description:"Agent 可以在沙盒外运行的命令。"'), + ('label:"Commands Outside Sandbox",description:"Commands the agent can run outside the sandbox in this workspace."', + 'label:"沙盒外的命令",description:"Agent 在此工作区的沙盒外可以运行的命令。"'), + ('label:"MCP Tools",description:"Configure external tools via Model Context Protocol."', + 'label:"MCP 工具",description:"通过 Model Context Protocol 配置外部工具。"'), + ('label:"MCP Tools",description:"External tools the agent can call via Model Context Protocol."', + 'label:"MCP 工具",description:"Agent 可通过 Model Context Protocol 调用的外部工具。"'), + ('children:"Advanced Web Access"', 'children:"高级网络访问"'), + ('label:"Read URLs",description:"Allow/deny agent read access to specific URLs or domains."', + 'label:"读取 URL",description:"允许/拒绝 Agent 对特定 URL 或域名的读取访问。"'), + ('label:"Read URLs",description:"URLs the agent can read or open in the browser."', + 'label:"读取 URL",description:"Agent 可以在浏览器中读取或打开的 URL。"'), + ('label:"Read URLs",description:"URLs the agent can read or open in this workspace."', + 'label:"读取 URL",description:"Agent 在此工作区中可以读取或打开的 URL。"'), + ('label:"Execute URLs",description:"URLs the agent can actuate on using the browser."', + 'label:"执行 URL",description:"Agent 可以使用浏览器操作 the URL。"'), + ('label:"Execute URLs",description:"Allow/deny agent browser actuation access to specific URLs."', + 'label:"执行 URL",description:"允许/拒绝 Agent 对特定 URL 的浏览器操作访问。"'), + ('label:"Execute URLs",description:"URLs the agent can actuate on in this workspace."', + 'label:"执行 URL",description:"Agent 在此工作区中可以操作的 URL。"'), + ('label:t="Advanced Settings"', 'label:t="高级设置"'), + ('label:"Enable Demo Mode (Beta)"', 'label:"启用演示模式 (Beta)"'), + ('description:\'When enabled, your UI will be slightly modified to ensure more consistent demos. This is only recommended for demo purposes. In most cases, you can run "Antigravity: Start Demo Mode" and "Antigravity: Stop Demo Mode" to control this switch and update your ~/.gemini/antigravity data directory.\'', + 'description:\'启用后,您的 UI 将被稍微修改以确保演示的一致性。仅建议用于演示目的。在大多数情况下,您可以运行 "Antigravity: Start Demo Mode" 和 "Antigravity: Stop Demo Mode" 来控制此开关并更新您的 ~/.gemini/antigravity 数据目录。\''), + ('description:`When toggled on, ${r.product.nameShort} collects usage data to help Google enhance performance and features.`', + 'description:`开启后,${r.product.nameShort} 将收集使用数据,以帮助 Google 提升性能和功能。`'), + ('label:"Marketing Emails",description:`Receive product updates, tips, and promotions from Google ${r.product.nameShort} via email.`', + 'label:"营销邮件",description:`通过电子邮件接收来自 Google ${r.product.nameShort} 的产品更新、提示和促销信息。`'), + ('children:["By using this app, you agree to its",', 'children:["使用此应用即表示您同意其",'), + ('className:"text-primary hover:underline",children:"Terms of Service"', 'className:"text-primary hover:underline",children:"服务条款"'), + ('className:"text-lg font-medium mb-4",children:"Terms of Service & Data Use"', 'className:"text-lg font-medium mb-4",children:"服务条款与数据使用"'), + ('description:p(jt,{children:["Configure the browser subagent. It requires",', 'description:p(jt,{children:["配置浏览器子 Agent。它需要安装",'), + ('`Refreshes in ${n} day${n>1?"s":""}, ${a} hour${a>1?"s":""}`', '`将在 ${n} 天 ${a} 小时后刷新`'), + ('`Refreshes in ${a} hour${a>1?"s":""}, ${i} minute${i>1?"s":""}`', '`将在 ${a} 小时 ${i} 分钟后刷新`'), + ('`Refreshes in ${i} minute${i>1?"s":""}`', '`将在 ${i} 分钟后刷新`'), + ('description:"View your available model quota. Quota refreshes periodically based on your plan."', + 'description:"查看您可用的模型配额。配额会根据您的方案定期刷新。"'), + ('"% of the customization budget is available."', '"% 的定制预算当前可用。"'), + ('children:V?"Hide breakdown":`Show ${I.length} breakdown${I.length===1?"":"s"}`', + 'children:V?"隐藏明细":`显示 ${I.length} 项明细`'), + ('"Plugin: "', '"插件: "'), + ('children:["Plugins are packaged collections of skills and MCPs to help the Agent"," ",a?`in ${a} `:"","work with Google developer products. You can always change your choices in Settings."]', + 'children:["插件是技能和 MCP 的打包集合,用于帮助 Agent"," ",a?`在 ${a} `:"","中协同谷歌开发产品工作。您随时可以在设置中更改您的选择。"]'), + ('children:["Plugins are packaged collections of skills and MCPs to help the Agent in ",e," work with Google developer products. You can always change your choices in Settings."]', + 'children:["插件是技能和 MCP 的打包集合,用于帮助 Agent 在 ",e," 中协同谷歌开发产品工作。您随时可以在设置中更改您的选择。"]'), + ('children:"No MCP Servers"', 'children:"没有 MCP 服务器"'), + ('children:"You currently don\'t have any MCP Servers installed. Add an MCP server above or add a custom one via the MCP Config."', + 'children:"您当前未安装任何 MCP 服务器。请在上方添加 MCP 服务器,或通过 MCP 配置添加自定义服务器。"'), + ('label:"Account",description:"Manage your plan, credentials, and general preferences."', + 'label:"账户",description:"管理您的方案、凭据和常规偏好设置。"'), + ('label:"Appearance",description:"Configure the agent\'s visual theme and display preferences."', + 'label:"外观",description:"配置 Agent 的视觉主题和显示偏好设置。"'), + ('label:"Notifications",description:"Manage your notification preferences."', + 'label:"通知",description:"管理您的通知偏好设置。"'), + ('label:"Models",description:"Configure AI models and view your quota."', + 'label:"模型",description:"配置 AI 模型并查看您的配额。"'), + ('label:"Customizations",description:"Configure default behaviors, skills, and MCP servers."', + 'label:"自定义",description:"配置默认行为、技能和 MCP 服务器。"'), + ('label:"Browser Settings",description:"Configure the browser subagent. It requires Google Chrome to be installed."', + 'label:"浏览器设置",description:"配置浏览器子 Agent。它需要安装 Google Chrome。"'), + ('label:"Editor Settings",description:"Configure editor-specific behaviors and shortcuts."', + 'label:"编辑器设置",description:"配置编辑器特定的行为和快捷键。"'), + ('children:"Account & Plan"', 'children:"账户与方案"'), + ('label:"Email",description:a?"Peter Pan":n.email', 'label:"电子邮件",description:a?"Peter Pan":n.email'), + ('children:"Theme"', 'children:"主题"'), + ('children:"Chat Settings"', 'children:"聊天设置"'), + ('label:"Verbose agent chat",description:"Display and preserve intermediate thinking steps"', + 'label:"详细 Agent 聊天",description:"显示并保留中间思考步骤"'), + ('label:"Notification Settings",description:"To modify notification settings, open your operating system\'s system preferences."', + 'label:"通知设置",description:"要修改通知设置,请打开您操作系统的系统偏好设置。"'), + ('label:"Model Quota"', 'label:"模型配额"'), + ('children:"Actuation Permissions"', 'children:"执行操作权限"'), + ('label:"Browser Actuation Rules",description:"Configure allowed and denied URLs for browser actuation."', + 'label:"浏览器执行规则",description:"配置允许和拒绝的浏览器执行 URL。"'), + ('children:"Marketplace"', 'children:"市场"'), + ('description:"Changes the base URL on each extension page. You must restart Antigravity IDE to use the new marketplace after changing this value."', + 'description:"更改每个扩展页面的基础 URL。更改此值后,您必须重启 Antigravity IDE 才能使用新的市场。"'), + ('description:"Changes the base URL for marketplace search results. You must restart Antigravity IDE to use the new marketplace after changing this value."', + 'description:"更改市场搜索结果的基础 URL。更改此值后,您必须重启 Antigravity IDE 才能使用新的市场。"'), + ('children:"Selection Actions"', 'children:"选中操作"'), + ('label:"Editor Settings",description:"To modify editor settings, open Settings within the editor window."', + 'label:"编辑器设置",description:"要修改编辑器设置,请在编辑器窗口中打开设置。"'), ] @@ -691,6 +812,59 @@ def get_workbench_replacements(): '{label:"请求审查",value:$U.OFF,description:"从不自动执行命令,除非它们在您的允许列表中。",isDefaultWhenAvailable:!0}'), ('{label:"Slow",value:Fwe.SLOW}', '{label:"慢速",value:Fwe.SLOW}'), ('{label:"Fast",value:Fwe.FAST,isDefaultWhenAvailable:!0}', '{label:"快速",value:Fwe.FAST,isDefaultWhenAvailable:!0}'), + # === Remaining workbench/feedback/shortcuts translations === + ('label:"Open Conversation Picker"', 'label:"打开对话选择器"'), + ('label:"Open File Search"', 'label:"打开文件搜索"'), + ('label:"Focus Input"', 'label:"聚焦输入框"'), + ('label:"New Conversation"', 'label:"新建对话"'), + ('label:"Open Workspace Selector"', 'label:"打开工作区选择器"'), + ('label:"Go Back"', 'label:"后退"'), + ('label:"Go Forward"', 'label:"前进"'), + ('label:"File Picker"', 'label:"文件选择器"'), + ('label:"Toggle Editor"', 'label:"切换编辑器"'), + ('label:"Select Previous Conversation"', 'label:"选择上一个对话"'), + ('label:"Select Next Conversation"', 'label:"选择下一个对话"'), + ('label:"Toggle Model Selector"', 'label:"切换模型选择器"'), + ('label:"Start Voice Recording"', 'label:"开始语音录制"'), + ('label:"Stop Voice Recording"', 'label:"停止语音录制"'), + ('label:"Find in Pane"', 'label:"在窗格中查找"'), + ('label:"Toggle Sidebar"', 'label:"切换侧边栏"'), + ('label:"Toggle Auxiliary Pane"', 'label:"切换辅助窗格"'), + ('label:"Toggle Terminal"', 'label:"切换终端"'), + ('label:"Open Settings"', 'label:"打开设置"'), + ('label:"Zoom In"', 'label:"放大"'), + ('label:"Zoom Out"', 'label:"缩小"'), + ('label:"Reset Zoom"', 'label:"重置缩放"'), + ('children:"Recommended"', 'children:"推荐"'), + ('children:"Navigation"', 'children:"导航"'), + ('children:"Conversation"', 'children:"对话"'), + ('children:"Layout Controls"', 'children:"布局控制"'), + ('children:"Shortcuts"', 'children:"快捷键"'), + ('description:"Keyboard shortcuts for quick navigation and control."', 'description:"用于快速导航和控制的键盘快捷键。"'), + ('children:"Feedback Type"', 'children:"反馈类型"'), + ('"bug-report":"Bug Report"', '"bug-report":"Bug 报告"'), + ('"feature-request":"Feature Request"', '"feature-request":"功能请求"'), + ('"auth-and-billing":"Auth and Billing"', '"auth-and-billing":"认证与计费"'), + ('"general-feedback":"General Feedback"', '"general-feedback":"常规反馈"'), + ('children:"Please describe the issue in detail. The more actionable your feedback, the quicker our team can address your request. Some helpful information includes:"', + 'children:"请详细描述该问题。您的反馈越具可操作性,我们的团队就能越快处理您的请求。一些有帮助的信息包括:"'), + ('children:"Steps to reproduce the issue"', 'children:"重现问题的步骤"'), + ('children:"Expected behavior"', 'children:"预期行为"'), + ('children:"Actual behavior"', 'children:"实际行为"'), + ('children:"Any error messages"', 'children:"任何错误消息"'), + ('children:"Any relevant information"', 'children:"任何相关信息"'), + ('"bug-report":"Describe the bug you encountered..."', '"bug-report":"请描述您遇到的 Bug..."'), + ('children:"Steps to Reproduce"', 'children:"重现步骤"'), + ('placeholder:"Please list the steps to reproduce the issue"', 'placeholder:"请列出重现该问题的步骤"'), + ('children:"Attach a screenshot (optional)"', 'children:"附加屏幕截图 (可选)"'), + ('label:"Attach Antigravity server logs"', 'label:"附加 Antigravity 服务器日志"'), + ('label:"Send feedback as "+e.email', 'label:"发送反馈,身份为:"+e.email'), + ('children:"We recommend attaching logs. Attaching logs will help the Antigravity team act on and prioritize your feedback."', + 'children:"我们建议附加日志。附加日志将帮助 Antigravity 团队针对您的反馈进行处理并排定优先级。"'), + ('title:"Model quota reached"', 'title:"已达到模型配额限制"'), + ("` Your plan's baseline quota will refresh on ${o}.`", "` 您方案的基准配额将在 ${o} 刷新。`"), + ('label:d||"Upgrade"', 'label:d||"升级"'), + ('children:n.userTier?.upgradeButtonText||"Upgrade"', 'children:n.userTier?.upgradeButtonText||"升级"'), ]