From 3ef7fee3e22ada62755de82699cb588dfc2cb873 Mon Sep 17 00:00:00 2001 From: l0ng-ai Date: Sun, 15 Nov 2026 08:45:04 +0800 Subject: [PATCH] fix(menu): keep New first in the File menu, with Untitled File inside it (#3467) #3427 put New Untitled File above the New submenu, which broke the menu test that the File menu starts with New (as in IntelliJ IDEA). It now sits in New next to Scratch File, labelled Untitled File. --- src-tauri/src/menu.rs | 4 ++-- src/platform/locales/en.json | 2 +- src/platform/locales/zh.json | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src-tauri/src/menu.rs b/src-tauri/src/menu.rs index 5589e2165..903c2acfc 100644 --- a/src-tauri/src/menu.rs +++ b/src-tauri/src/menu.rs @@ -217,7 +217,6 @@ pub fn spec(os: Os) -> Vec { } let mut file = vec![ - act("file.newUntitled", "New Untitled File"), sub( "new", "New", @@ -227,6 +226,7 @@ pub fn spec(os: Os) -> Vec { SEP, act("file.new", "File…"), act("file.newScratchFile", "Scratch File"), + act("file.newUntitled", "Untitled File"), ], ), act("file.openProject", "Open…"), @@ -1999,7 +1999,7 @@ mod tests { }; assert_eq!( action_ids(new), - ["file.newProject", "workspace.create", "file.new", "file.newScratchFile"], + ["file.newProject", "workspace.create", "file.new", "file.newScratchFile", "file.newUntitled"], "{os:?}" ); } diff --git a/src/platform/locales/en.json b/src/platform/locales/en.json index b679a0f38..7c092aab3 100644 --- a/src/platform/locales/en.json +++ b/src/platform/locales/en.json @@ -203,7 +203,7 @@ "menu.workspace.create": "Workspace…", "menu.workspace.open": "Open Workspace…", "menu.workspace.manage": "Manage Workspace…", - "menu.file.newUntitled": "New Untitled File", + "menu.file.newUntitled": "Untitled File", "menu.file.openInNewWindow": "Open in New Window…", "menu.file.openFile": "Open File…", "menu.remote.connect": "Remote Development…", diff --git a/src/platform/locales/zh.json b/src/platform/locales/zh.json index 5aaa60693..f1df91013 100644 --- a/src/platform/locales/zh.json +++ b/src/platform/locales/zh.json @@ -203,7 +203,7 @@ "menu.workspace.create": "工作区…", "menu.workspace.open": "打开工作区…", "menu.workspace.manage": "管理工作区…", - "menu.file.newUntitled": "新建无标题文件", + "menu.file.newUntitled": "无标题文件", "menu.file.openInNewWindow": "在新窗口中打开…", "menu.file.openFile": "打开文件…", "menu.remote.connect": "远程开发…",