дзеркало
https://github.com/l0ng-ai/openidea.git
синхронізовано 2026-11-09 19:25:54 +02:00
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]>
Цей коміт міститься в:
1 джерело
16ebb6fde8
коміт
5d3432a000
20 files changed
+198
-36
No files matched your search
@@ -41,7 +41,7 @@ import { t } from "@/platform/i18n";
|
||||
import { call, commands } from "@/platform/ipc";
|
||||
import { isRemoteWindow } from "@/platform/remote";
|
||||
import { fileIconName, showContextMenu, type MenuItem } from "@/ui";
|
||||
import { usePlatform } from "@/platform/platformInfo";
|
||||
import { fileManagerName } from "@/platform/fileManager";
|
||||
import {
|
||||
activateTab,
|
||||
changeSplitOrientation,
|
||||
@@ -1919,7 +1919,7 @@ function openInMenu(path: string): MenuItem {
|
||||
label: "Open In",
|
||||
submenu: [
|
||||
{ kind: "action", action: "navigate.selectIn", arg: { path }, label: "Project View" },
|
||||
{ kind: "action", action: "project.revealInFinder", arg: path, label: revealLabel() },
|
||||
{ kind: "action", action: "project.revealInFinder", arg: path, label: fileManagerName() },
|
||||
{ kind: "action", action: "project.openInTerminal", arg: path, label: "Terminal" },
|
||||
{ kind: "separator" },
|
||||
...menuGroupItems("openIn", { paths: [path] }),
|
||||
@@ -2004,12 +2004,6 @@ export function editorController(): EditorController {
|
||||
return (controller ??= new EditorController());
|
||||
}
|
||||
|
||||
/** "Finder" / "Explorer" / "Files", like IDEA's Open In submenu. */
|
||||
function revealLabel(): string {
|
||||
const os = usePlatform.getState().os;
|
||||
return os === "macos" ? "Finder" : os === "windows" ? "Explorer" : "Files";
|
||||
}
|
||||
|
||||
function inPopup(target: EventTarget | null): boolean {
|
||||
return target instanceof Element && !!target.closest("[data-popup]");
|
||||
}
|
||||
Reference in new issue
Заблокувати користувача