fix(welcome): name the platform's file manager, not Finder (#2265)

On Windows and Linux several places still named macOS's Finder: the recent-project row menu (Show in Finder), Settings › Version Control › Confirmation › When patch is created, the question after a patch is saved, and the reveal error. The wording was an English literal at each call site, one place sniffed the user agent, and the catalogs only had Finder's text. Shared helpers in src/platform/fileManager.ts now name Finder / Explorer / Files from the platform info, and the project view's Reveal action, the editor tab menu, the project tree menu, the welcome page and the patch flow use them, with whole-sentence catalog entries so each locale can translate them.

Co-authored-by: emanyzwww <[email protected]>
Цей коміт міститься в:
Emanyzwwwтаemanyzwww authored and GitHub committed 2026-11-09 17:51:48 +08:00
1 джерело 16ebb6fde8
коміт 5d3432a000
20 files changed
+198 -36

No files matched your search

+2 -4
Переглянути файл
@@ -1,5 +1,6 @@
/** Context menu and "New" popup of the project view. */
import { executeAction, getAction } from "@/platform/actions";
import { fileManagerName } from "@/platform/fileManager";
import { formatBinding, hostBinding, isMacHost, shortcutLabel } from "@/platform/keymap";
import { relativePath, useProject } from "@/platform/project";
import { currentDetectedRoots, currentRoots } from "@/platform/projectRoots";
@@ -458,10 +459,7 @@ function libraryMenuItems(nodes: ProjectNode[]): MenuItem[] {
}
export function revealLabel() {
const ua = typeof navigator !== "undefined" ? navigator.userAgent : "";
if (/Win/i.test(ua)) return "Explorer";
if (/Linux/i.test(ua)) return "Files";
return "Finder";
return fileManagerName();
}
/** What contributed menu groups see: the selected (non-placeholder) paths. */