DeepSeek Harness Tauri 桌面版 | Only 8mb installer, zero environment setup, preset plugins, Windows / macOS / Linux.
fix(macos): clarify Run and management menu labels (#925)
SkanderBot132f642f58e3
diff --git a/src-tauri/src/config/i18n.rs b/src-tauri/src/config/i18n.rsindex 57879841..24d0d484 100644--- a/src-tauri/src/config/i18n.rs+++ b/src-tauri/src/config/i18n.rs@@ -31,11 +31,11 @@ pub fn t(key: &str) -> String {"install.downloading" => ("正在下载", "Downloading"),"install.extracting" => ("正在解压", "Extracting"),"install.done" => ("依赖已安装完毕", "Dependencies installed"),- "menu.run" => ("运行", "Run"),+ "menu.run" => ("运行与管理", "Run & Manage"),"menu.application" => ("应用", "Application"),- "menu.profiles" => ("档案", "Profiles"),- "menu.plugins" => ("插件", "Plugins"),- "menu.harness" => ("核心", "Core"),+ "menu.profiles" => ("档案管理…", "Manage Profiles…"),+ "menu.plugins" => ("插件管理…", "Manage Plugins…"),+ "menu.harness" => ("核心管理…", "Manage Core…"),"menu.help" => ("帮助", "Help"),"menu.file" => ("文件", "File"),"menu.new_window" => ("新建窗口", "New Window"),@@ -73,7 +73,7 @@ pub fn t(key: &str) -> String {"menu.task_manager" => ("任务管理器", "Task Manager"),"menu.run_logs" => ("运行日志", "Run Logs"),"menu.check_update" => ("检查更新", "Check for Updates"),- "menu.restart" => ("重启", "Restart"),+ "menu.restart" => ("重启 Harness", "Restart Harness"),"menu.edit" => ("编辑", "Edit"),"menu.undo" => ("撤销", "Undo"),"menu.redo" => ("重做", "Redo"),diff --git a/test/macos-run-menu.test.ts b/test/macos-run-menu.test.tsindex cd05c066..442594a7 100644--- a/test/macos-run-menu.test.ts+++ b/test/macos-run-menu.test.ts@@ -42,7 +42,7 @@ describe('macOS native menu', () => {expect(i18nSource).toContain('"menu.bring_all_to_front" => ("全部置于顶层", "Bring All to Front")')})- it('orders File, Edit, View, Run, Window and Help after the macOS application menu', () => {+ it('keeps the accepted native system menus at the top level', () => {const nativeMenuSource = builderSource.slice(builderSource.indexOf('pub fn install_macos_menu('))const menu = nativeMenuSource.match(/let menu = Menu::with_items\(\s*app,\s*&\[([^\]]+)\]/)expect(menu).not.toBeNull()@@ -87,9 +87,9 @@ describe('macOS native menu', () => {it.each([['desktop-config', 'application', 'menu.settings', '设置…', 'Settings…'],- ['desktop-profiles', 'profiles', 'menu.profiles', '档案', 'Profiles'],- ['desktop-plugins', 'plugins', 'menu.plugins', '插件', 'Plugins'],- ['desktop-harness', 'harness', 'menu.harness', '核心', 'Core'],+ ['desktop-profiles', 'profiles', 'menu.profiles', '档案管理…', 'Manage Profiles…'],+ ['desktop-plugins', 'plugins', 'menu.plugins', '插件管理…', 'Manage Plugins…'],+ ['desktop-harness', 'harness', 'menu.harness', '核心管理…', 'Manage Core…'],])('routes %s from its native item to the %s configuration tab', (action, tab, key, zh, en) => {expect(builderSource).toMatch(new RegExp(`MenuItem::with_id\\(\\s*app,\\s*"${action}",\\s*crate::config::i18n::t\\("${key}"\\)`))const eventHandler = builderSource.slice(builderSource.indexOf('.on_menu_event(|app, event|'))@@ -113,7 +113,8 @@ describe('macOS native menu', () => {})it('provides the native Run title in both languages', () => {- expect(i18nSource).toContain('"menu.run" => ("运行", "Run")')+ expect(i18nSource).toContain('"menu.run" => ("运行与管理", "Run & Manage")')+ expect(i18nSource).toContain('"menu.restart" => ("重启 Harness", "Restart Harness")')})it('toggles the focused shell window from View without suppressing AppKit fullscreen in Window', () => {diff --git a/test/menu-restart.test.ts b/test/menu-restart.test.tsindex 7bdcb7aa..e2324c28 100644--- a/test/menu-restart.test.ts+++ b/test/menu-restart.test.ts@@ -19,9 +19,9 @@ describe('menu restart backend contract', () => {it('provides menu.restart i18n key with zh/en translations', () => {// 断言键→值的关系,而非孤立 token:要求 "menu.restart" 同时映射到- // 中文 "重启" 与英文 "Restart",避免 token 出现在无关代码中时仍能通过。+ // 中文/英文都明确重启的是 Harness,避免 token 出现在无关代码中时仍能通过。expect(i18nSource).toMatch(- /"menu\.restart"\s*=>\s*\("重启",\s*"Restart"\)/,+ /"menu\.restart"\s*=>\s*\("重启 Harness",\s*"Restart Harness"\)/,)})})