дзеркало
https://github.com/l0ng-ai/openidea.git
синхронізовано 2026-12-06 18:17:15 +02:00
feat(project-tree): paste Java code into a folder as a class file (#5878)
Pasting text that declares a Java type into a Project view folder creates <Class>.java there, named after its first public top-level type (else its first), and opens it. Inside a Java source or test root the file declares the folder's package. An existing file is replaced only after asking. Paste is enabled while the clipboard holds such code. Fixes #5821
Цей коміт міститься в:
1 джерело
2a90677e4f
коміт
0db493b944
13 files changed
+230
-10
No files matched your search
@@ -0,0 +1,44 @@
|
||||
import { describe, expect, it } from "vitest";
|
||||
import type { RootFolder } from "@/platform/languageSettings";
|
||||
import { javaPackageAt, pastedJavaClass, withJavaPackage } from "./javaPaste";
|
||||
|
||||
describe("Java code pasted into the Project view", () => {
|
||||
it("is named after its first public top-level type, else its first", () => {
|
||||
const text = "package a;\n/** Doc */\n@Deprecated class Helper {}\npublic final class Main<T> { class Inner {} }\n";
|
||||
expect(pastedJavaClass(text)).toBe("Main");
|
||||
expect(pastedJavaClass("record Point(int x, int y) {}\nenum Color { RED }")).toBe("Point");
|
||||
expect(pastedJavaClass("public @interface Marker {}")).toBe("Marker");
|
||||
expect(pastedJavaClass("interface Shape { double area(); }")).toBe("Shape");
|
||||
});
|
||||
|
||||
it("is not code without a type: a statement, prose, a class only named in a comment", () => {
|
||||
expect(pastedJavaClass("int x = 1;")).toBeNull();
|
||||
expect(pastedJavaClass("hello world")).toBeNull();
|
||||
expect(pastedJavaClass("// see class Foo\nfoo();")).toBeNull();
|
||||
expect(pastedJavaClass("")).toBeNull();
|
||||
});
|
||||
|
||||
it("takes the package of its folder below a Java source or test root", () => {
|
||||
const roots: RootFolder[] = [
|
||||
{ path: "app/src/main/java", kind: "source", detectedFrom: "app/pom.xml" },
|
||||
{ path: "app/src/test/java", kind: "test", detectedFrom: "app/pom.xml" },
|
||||
{ path: "web/src", kind: "source", detectedFrom: "web/package.json" },
|
||||
];
|
||||
expect(javaPackageAt("app/src/main/java/com/acme", roots)).toBe("com.acme");
|
||||
expect(javaPackageAt("app/src/test/java/com", roots)).toBe("com");
|
||||
expect(javaPackageAt("app/src/main/java", roots)).toBe("");
|
||||
expect(javaPackageAt("docs", roots)).toBeNull();
|
||||
expect(javaPackageAt("web/src/lib", roots)).toBeNull();
|
||||
});
|
||||
|
||||
it("declares the folder's package, replacing or adding the statement", () => {
|
||||
expect(withJavaPackage("package old.pkg;\n\nclass A {}", "com.acme")).toBe("package com.acme;\n\nclass A {}");
|
||||
expect(withJavaPackage("import java.util.List;\nclass A {}", "com.acme")).toBe(
|
||||
"package com.acme;\n\nimport java.util.List;\nclass A {}",
|
||||
);
|
||||
const same = "package com . acme;\nclass A {}";
|
||||
expect(withJavaPackage(same, "com.acme")).toBe(same);
|
||||
// Pasted into the source root itself: the default package keeps the code as it is.
|
||||
expect(withJavaPackage("package old;\nclass A {}", "")).toBe("package old;\nclass A {}");
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,66 @@
|
||||
// IDEA's Java file paste: Java code pasted into a folder of the Project view becomes
|
||||
// `<Class>.java`, declaring the folder's package.
|
||||
import { javaLanguage } from "@codemirror/lang-java";
|
||||
import type { SyntaxNode } from "@lezer/common";
|
||||
import { rootFor, type RootFolder } from "@/platform/languageSettings";
|
||||
import { isJvmSourcePackage } from "@/ui/folderPresentation";
|
||||
|
||||
const TYPE_DECLARATIONS = new Set([
|
||||
"ClassDeclaration",
|
||||
"InterfaceDeclaration",
|
||||
"EnumDeclaration",
|
||||
"RecordDeclaration",
|
||||
"AnnotationTypeDeclaration",
|
||||
]);
|
||||
|
||||
const typeName = (text: string, declaration: SyntaxNode) => {
|
||||
const name = declaration.getChild("Definition") ?? declaration.getChild("Identifier");
|
||||
return name ? text.slice(name.from, name.to) : null;
|
||||
};
|
||||
|
||||
const isPublic = (text: string, declaration: SyntaxNode) => {
|
||||
const modifiers = declaration.getChild("Modifiers");
|
||||
return !!modifiers && /(^|\s)public(\s|$)/.test(text.slice(modifiers.from, modifiers.to));
|
||||
};
|
||||
|
||||
/**
|
||||
* The class pasted Java code is named after: its first public top-level type, else its first
|
||||
* top-level type; null when the text declares none (a statement, plain prose).
|
||||
*/
|
||||
export function pastedJavaClass(text: string): string | null {
|
||||
if (!/\b(class|interface|enum|record)\b/.test(text)) return null;
|
||||
const top = javaLanguage.parser.parse(text).topNode;
|
||||
let first: string | null = null;
|
||||
for (let node = top.firstChild; node; node = node.nextSibling) {
|
||||
if (!TYPE_DECLARATIONS.has(node.name)) continue;
|
||||
const name = typeName(text, node);
|
||||
if (!name) continue;
|
||||
if (isPublic(text, node)) return name;
|
||||
first ??= name;
|
||||
}
|
||||
return first;
|
||||
}
|
||||
|
||||
/**
|
||||
* The package of the project-relative folder `rel`: its path below the Java source or test root
|
||||
* it is in; null outside one, where a pasted file keeps the package it declares.
|
||||
*/
|
||||
export function javaPackageAt(rel: string, roots: readonly RootFolder[]): string | null {
|
||||
if (!isJvmSourcePackage(rel, roots)) return null;
|
||||
const root = rootFor(roots, rel)!;
|
||||
const below = root.path ? rel.slice(root.path.length).replace(/^\/+/, "") : rel;
|
||||
return below.split("/").filter(Boolean).join(".");
|
||||
}
|
||||
|
||||
/**
|
||||
* `text` declaring `pkg`: its package statement replaced, or one added in front. Unchanged for the
|
||||
* default package (`""`), as in IDEA, which leaves the statement of code pasted into a source root.
|
||||
*/
|
||||
export function withJavaPackage(text: string, pkg: string): string {
|
||||
if (!pkg) return text;
|
||||
const declaration = javaLanguage.parser.parse(text).topNode.getChild("PackageDeclaration");
|
||||
if (!declaration) return `package ${pkg};\n\n${text}`;
|
||||
const name = declaration.getChild("ScopedIdentifier") ?? declaration.getChild("Identifier");
|
||||
if (name && text.slice(name.from, name.to).replace(/\s+/g, "") === pkg) return text;
|
||||
return `${text.slice(0, declaration.from)}package ${pkg};${text.slice(declaration.to)}`;
|
||||
}
|
||||
@@ -22,9 +22,21 @@ import { initProjectTree, loadDir, setClipboard, setSelection, useProjectTree }
|
||||
import { setOsClipboardForTests } from "./clipboard";
|
||||
|
||||
const askMock = vi.hoisted(() => vi.fn());
|
||||
const confirmMock = vi.hoisted(() => vi.fn());
|
||||
vi.mock("@/workbench/messages", async (original) => ({
|
||||
...(await original<typeof import("@/workbench/messages")>()),
|
||||
ask: askMock,
|
||||
confirm: confirmMock,
|
||||
}));
|
||||
const clipboardText = vi.hoisted(() => vi.fn(async () => ""));
|
||||
vi.mock("@/platform/clipboard", async (original) => ({
|
||||
...(await original<typeof import("@/platform/clipboard")>()),
|
||||
readClipboardPlainText: clipboardText,
|
||||
}));
|
||||
const roots = vi.hoisted(() => vi.fn((): unknown[] => []));
|
||||
vi.mock("@/platform/projectRoots", async (original) => ({
|
||||
...(await original<typeof import("@/platform/projectRoots")>()),
|
||||
currentRoots: roots,
|
||||
}));
|
||||
|
||||
let fs: MemoryFs;
|
||||
@@ -248,6 +260,47 @@ describe("OS file imports", () => {
|
||||
expect(notify).not.toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it("turns pasted Java code into <Class>.java declaring the folder's package, asking before replacing", async () => {
|
||||
roots.mockReturnValue([{ path: "target", kind: "source", detectedFrom: "pom.xml" }]);
|
||||
fs = new MemoryFs({ "/p/target/com/acme": null }, "/p");
|
||||
setProjectFsForTests(fs, "/p");
|
||||
initProjectTree("/p", "p");
|
||||
await loadDir("/p");
|
||||
setOsClipboardForTests({});
|
||||
const written: string[] = [];
|
||||
const create = fs.createFileBytes.bind(fs);
|
||||
vi.spyOn(fs, "createFileBytes").mockImplementation(async (path, data) => {
|
||||
written.push(`${path}: ${new TextDecoder().decode(data)}`);
|
||||
await create(path, data);
|
||||
});
|
||||
clipboardText.mockResolvedValue("package old;\r\n\r\npublic class Greeter {}\r\n");
|
||||
await paste("/p/target/com/acme");
|
||||
expect(written).toEqual(["/p/target/com/acme/Greeter.java: package com.acme;\n\npublic class Greeter {}\n"]);
|
||||
expect(useProjectTree.getState().revealRequest?.path).toBe("/p/target/com/acme/Greeter.java");
|
||||
|
||||
// The file exists: kept when the user declines, replaced when they agree.
|
||||
confirmMock.mockResolvedValueOnce(false);
|
||||
await paste("/p/target/com/acme");
|
||||
expect(written).toHaveLength(1);
|
||||
confirmMock.mockResolvedValueOnce(true);
|
||||
await paste("/p/target/com/acme");
|
||||
expect(confirmMock).toHaveBeenCalledWith(
|
||||
expect.objectContaining({ message: "File 'Greeter.java' already exists. Do you want to overwrite it?" }),
|
||||
);
|
||||
expect(written).toHaveLength(2);
|
||||
|
||||
// Outside a source root the code keeps its own package; text without a type is not pasted.
|
||||
clipboardText.mockResolvedValue("package demo;\nclass Note {}");
|
||||
await paste("/p");
|
||||
expect(written.at(-1)).toBe("/p/Note.java: package demo;\nclass Note {}");
|
||||
clipboardText.mockResolvedValue("System.out.println(1);");
|
||||
await paste("/p");
|
||||
expect(notify).toHaveBeenCalledWith(expect.objectContaining({ title: "No files on the clipboard" }));
|
||||
expect(written).toHaveLength(3);
|
||||
clipboardText.mockResolvedValue("");
|
||||
roots.mockReturnValue([]);
|
||||
});
|
||||
|
||||
it("says the clipboard is empty when it holds neither files nor an image", async () => {
|
||||
setOsClipboardForTests({});
|
||||
await paste("/p/target");
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* File operations behind the project view's actions: new / rename / delete,
|
||||
* internal copy-cut-paste, drag & drop moves and OS file imports.
|
||||
*/
|
||||
import { writeClipboardText } from "@/platform/clipboard";
|
||||
import { readClipboardPlainText, writeClipboardText } from "@/platform/clipboard";
|
||||
import { createElement, Fragment } from "react";
|
||||
import { askUsagesDetected, fileUsages, showFileUsages, viewUsages } from "@/editor/refactor";
|
||||
import { executeAction, getAction } from "@/platform/actions";
|
||||
@@ -14,13 +14,15 @@ import {
|
||||
revealInFileManager,
|
||||
} from "@/platform/fileManager";
|
||||
import { maybeEditorService, notifications } from "@/workbench/contributions";
|
||||
import { ask, confirmChecked } from "@/workbench/messages";
|
||||
import { ask, confirm, confirmChecked } from "@/workbench/messages";
|
||||
import { osClipboard } from "./clipboard";
|
||||
import { lastFileRefactoring, nextFileOperation, runFileRefactoring, undoFileRefactoring } from "./fileRefactor";
|
||||
import { openFileRefactorDialog, rememberedOptions } from "./FileRefactorDialogs";
|
||||
import { beginLocalImport, projectFs } from "./fs";
|
||||
import { renameCopiedJavaType } from "./javaCopy";
|
||||
import { IpcError, isCancelled } from "@/platform/ipc";
|
||||
import { javaPackageAt, pastedJavaClass, withJavaPackage } from "./javaPaste";
|
||||
import { currentRoots } from "@/platform/projectRoots";
|
||||
import { IpcError, isCancelled, isTauri } from "@/platform/ipc";
|
||||
import { MEMBER_PREFIX, type ProjectNode } from "./model";
|
||||
import {
|
||||
isInside,
|
||||
@@ -51,7 +53,7 @@ import { tx, txPart } from "@/platform/i18n";
|
||||
import { hostOs, isRemoteWindow } from "@/platform/remote";
|
||||
import { usePlatform } from "@/platform/platformInfo";
|
||||
import { pathToCopy, type PathKind } from "@/platform/copyPath";
|
||||
import { projectFolder, useProject } from "@/platform/project";
|
||||
import { projectFolder, relativePath, useProject } from "@/platform/project";
|
||||
export type { PathKind } from "@/platform/copyPath";
|
||||
|
||||
/** Nodes that may be renamed, moved or deleted (not roots, groups or library sources). */
|
||||
@@ -586,6 +588,8 @@ export function copySelection(cut: boolean) {
|
||||
/** Files or an image on the OS clipboard, cached: `canPaste` runs while a menu renders. */
|
||||
let osHasFiles = false;
|
||||
let osHasImage = false;
|
||||
/** The clipboard holds Java code, which Paste turns into a file. */
|
||||
let osHasJava = false;
|
||||
|
||||
/** Keeps Paste enabled for what Explorer copied; called when the window gains focus. */
|
||||
export async function refreshOsClipboard() {
|
||||
@@ -604,6 +608,10 @@ async function readOsClipboard(): Promise<string[] | null> {
|
||||
if (get().clipboard !== clipboard) return null;
|
||||
osHasFiles = external.length > 0;
|
||||
osHasImage = image;
|
||||
// Only the desktop app reads the text without asking; in a browser Paste still tries. Checked on
|
||||
// every window focus, so a huge clipboard is not parsed for the menu item.
|
||||
const text = !osHasFiles && !image && isTauri() ? await readClipboardPlainText().catch(() => "") : "";
|
||||
osHasJava = text.length <= 1_000_000 && !!pastedJavaClass(text);
|
||||
// Our remote text write removes file URLs, so any files were copied later.
|
||||
// A failed write leaves ownership uncertain; retain the remote copy then.
|
||||
if (handedOff && (clipboard?.remote ? external.length > 0 : !sameFiles(external, clipboard?.paths)))
|
||||
@@ -612,7 +620,7 @@ async function readOsClipboard(): Promise<string[] | null> {
|
||||
}
|
||||
|
||||
export function canPaste(): boolean {
|
||||
return !!get().clipboard?.paths.length || osHasFiles || osHasImage;
|
||||
return !!get().clipboard?.paths.length || osHasFiles || osHasImage || osHasJava;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -640,6 +648,7 @@ export async function paste(target = targetFolder()) {
|
||||
return pasteFromOsClipboard(external, target);
|
||||
if (!clipboard?.paths.length) {
|
||||
if (await pasteImage(target)) return;
|
||||
if (await pasteJavaCode(target)) return;
|
||||
notifications().notify({ level: "info", title: "No files on the clipboard" });
|
||||
return;
|
||||
}
|
||||
@@ -654,6 +663,45 @@ export async function paste(target = targetFolder()) {
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Java code on the clipboard becomes `<Class>.java` in `target`, declaring the folder's package
|
||||
* inside a source root, and opens (IDEA's Java file paste). Asks before replacing a file of that
|
||||
* name. False when the clipboard holds no Java type.
|
||||
*/
|
||||
async function pasteJavaCode(target: string): Promise<boolean> {
|
||||
const text = (await readClipboardPlainText().catch(() => "")).replace(/\r\n?/g, "\n");
|
||||
const className = pastedJavaClass(text);
|
||||
if (!className) return false;
|
||||
const name = `${className}.java`;
|
||||
const root = get().root ?? target;
|
||||
const pkg = javaPackageAt(target === root ? "" : relativePath(root, target), currentRoots());
|
||||
const path = joinPath(target, name);
|
||||
await loadDir(target);
|
||||
const exists = (get().listings.get(target) ?? []).some((e) => e.name === name);
|
||||
if (
|
||||
exists &&
|
||||
!(await confirm({
|
||||
title: tx("Paste"),
|
||||
message: tx`File '${name}' already exists. Do you want to overwrite it?`,
|
||||
ok: "Overwrite",
|
||||
}))
|
||||
)
|
||||
return true;
|
||||
const fs = projectFs(root);
|
||||
try {
|
||||
// The replaced file goes to Local History, like any delete.
|
||||
if (exists) await fs.delete(path);
|
||||
await fs.createFileBytes(path, new TextEncoder().encode(pkg === null ? text : withJavaPackage(text, pkg)));
|
||||
} catch (e) {
|
||||
fail(tx`Cannot paste ${name}`, e);
|
||||
return true;
|
||||
}
|
||||
await loadDir(target, true);
|
||||
revealPath(path, true);
|
||||
await maybeEditorService()?.openFile(path, { focus: true });
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Saves the clipboard's image in `target` as `img.png`, or `img_1.png`, `img_2.png`
|
||||
* … when taken, and selects it. False when the clipboard holds no image.
|
||||
|
||||
@@ -6110,5 +6110,6 @@
|
||||
"Couldn't roll back": "No se pudo revertir",
|
||||
"This message and the ones after it are removed, and the files the agent changed since go back to how they were before it was sent. The message returns to the composer.": "Este mensaje y los posteriores se eliminan, y los archivos que el agente modificó desde entonces vuelven a como estaban antes de enviarlo. El mensaje vuelve al cuadro de texto.",
|
||||
"This clears the entire conversation, puts the files the agent changed back as they were when the task started, and starts a fresh agent session with this message.": "Esto borra toda la conversación, devuelve los archivos que el agente modificó a como estaban al empezar la tarea e inicia una nueva sesión del agente con este mensaje.",
|
||||
"Resets in {resetIn}": "Se restablece en {resetIn}"
|
||||
"Resets in {resetIn}": "Se restablece en {resetIn}",
|
||||
"Cannot paste {name}": "No se puede pegar {name}"
|
||||
}
|
||||
@@ -5753,5 +5753,6 @@
|
||||
"Couldn't roll back": "Impossible de revenir en arrière",
|
||||
"This message and the ones after it are removed, and the files the agent changed since go back to how they were before it was sent. The message returns to the composer.": "Ce message et les suivants sont supprimés, et les fichiers modifiés par l'agent depuis reviennent à leur état d'avant l'envoi. Le message revient dans la zone de saisie.",
|
||||
"This clears the entire conversation, puts the files the agent changed back as they were when the task started, and starts a fresh agent session with this message.": "Cela efface toute la conversation, remet les fichiers modifiés par l'agent dans leur état du début de la tâche et démarre une nouvelle session de l'agent avec ce message.",
|
||||
"Resets in {resetIn}": "Réinitialisation dans {resetIn}"
|
||||
"Resets in {resetIn}": "Réinitialisation dans {resetIn}",
|
||||
"Cannot paste {name}": "Impossible de coller {name}"
|
||||
}
|
||||
@@ -6220,5 +6220,6 @@
|
||||
"Couldn't roll back": "롤백할 수 없습니다",
|
||||
"This message and the ones after it are removed, and the files the agent changed since go back to how they were before it was sent. The message returns to the composer.": "이 메시지와 이후 메시지가 제거되고, 그 이후 에이전트가 변경한 파일은 메시지를 보내기 전 상태로 돌아갑니다. 메시지는 입력란으로 돌아갑니다.",
|
||||
"This clears the entire conversation, puts the files the agent changed back as they were when the task started, and starts a fresh agent session with this message.": "전체 대화를 지우고, 에이전트가 변경한 파일을 작업 시작 시점의 상태로 되돌린 뒤, 이 메시지로 새 에이전트 세션을 시작합니다.",
|
||||
"Resets in {resetIn}": "{resetIn} 후 재설정"
|
||||
"Resets in {resetIn}": "{resetIn} 후 재설정",
|
||||
"Cannot paste {name}": "{name}을(를) 붙여넣을 수 없습니다"
|
||||
}
|
||||
@@ -5918,5 +5918,6 @@
|
||||
"Couldn't roll back": "Nie udało się wycofać",
|
||||
"This message and the ones after it are removed, and the files the agent changed since go back to how they were before it was sent. The message returns to the composer.": "Ta wiadomość i kolejne zostaną usunięte, a pliki zmienione od tego czasu przez agenta wrócą do stanu sprzed jej wysłania. Wiadomość wróci do pola tekstowego.",
|
||||
"This clears the entire conversation, puts the files the agent changed back as they were when the task started, and starts a fresh agent session with this message.": "To wyczyści całą rozmowę, przywróci pliki zmienione przez agenta do stanu z początku zadania i rozpocznie nową sesję agenta z tą wiadomością.",
|
||||
"Resets in {resetIn}": "Resetuje się za {resetIn}"
|
||||
"Resets in {resetIn}": "Resetuje się za {resetIn}",
|
||||
"Cannot paste {name}": "Nie można wkleić {name}"
|
||||
}
|
||||
@@ -5933,5 +5933,6 @@
|
||||
"Couldn't roll back": "Não foi possível reverter",
|
||||
"This message and the ones after it are removed, and the files the agent changed since go back to how they were before it was sent. The message returns to the composer.": "Esta mensagem e as seguintes são removidas, e os arquivos que o agente alterou desde então voltam a como estavam antes do envio. A mensagem volta para a caixa de texto.",
|
||||
"This clears the entire conversation, puts the files the agent changed back as they were when the task started, and starts a fresh agent session with this message.": "Isso limpa toda a conversa, devolve os arquivos que o agente alterou a como estavam no início da tarefa e inicia uma nova sessão do agente com esta mensagem.",
|
||||
"Resets in {resetIn}": "Redefine em {resetIn}"
|
||||
"Resets in {resetIn}": "Redefine em {resetIn}",
|
||||
"Cannot paste {name}": "Não é possível colar {name}"
|
||||
}
|
||||
@@ -371,6 +371,7 @@
|
||||
"Make configurations pinned by default": "Закреплять конфигурации по умолчанию",
|
||||
"A finished pinned tab stays open: a later run opens a new tab instead of taking its place.": "Завершённая закреплённая вкладка остаётся открытой: последующий запуск откроет новую вкладку вместо замены текущей.",
|
||||
"Cannot paste the image into {name}": "Не удалось вставить изображение в {name}",
|
||||
"Cannot paste {name}": "Не удалось вставить {name}",
|
||||
"New Worktree from '{name}'…": "Новый Worktree из «{name}»…",
|
||||
"Prune Worktrees": "Очистить Worktree",
|
||||
"Prune Worktrees…": "Очистить Worktree…",
|
||||
|
||||
@@ -143,6 +143,7 @@
|
||||
"Make configurations pinned by default": "Yapılandırmaları varsayılan olarak sabitle",
|
||||
"A finished pinned tab stays open: a later run opens a new tab instead of taking its place.": "Tamamlanmış sabitlenmiş sekme açık kalır; sonraki çalıştırma bu sekmenin yerine yeni bir sekme açar.",
|
||||
"Cannot paste the image into {name}": "Görsel {name} içine yapıştırılamıyor",
|
||||
"Cannot paste {name}": "{name} yapıştırılamıyor",
|
||||
"Worktree Conflict": "Çalışma Ağacı Çakışması",
|
||||
"Branch '{branch}' is already checked out in a worktree at:\n{path}": "'{branch}' dalı zaten şu konumdaki çalışma ağacında kullanılıyor:\n{path}",
|
||||
"Checkout Anyway": "Yine de Geçiş Yap",
|
||||
|
||||
@@ -132,6 +132,7 @@
|
||||
"Make configurations pinned by default": "預設固定執行/偵錯分頁",
|
||||
"A finished pinned tab stays open: a later run opens a new tab instead of taking its place.": "固定的分頁結束後會保留:之後的執行會開啟新分頁,而不是取代它。",
|
||||
"Cannot paste the image into {name}": "無法將圖片貼上為 {name}",
|
||||
"Cannot paste {name}": "無法貼上 {name}",
|
||||
"Worktree Conflict": "工作樹衝突",
|
||||
"Branch '{branch}' is already checked out in a worktree at:\n{path}": "分支 '{branch}' 已在以下位置的工作樹中籤出:\n{path}",
|
||||
"Checkout Anyway": "仍然簽出",
|
||||
|
||||
@@ -381,6 +381,7 @@
|
||||
"Make configurations pinned by default": "默认固定运行/调试标签页",
|
||||
"A finished pinned tab stays open: a later run opens a new tab instead of taking its place.": "固定的标签页结束后会保留:之后的运行会打开新标签页,而不是替换它。",
|
||||
"Cannot paste the image into {name}": "无法将图片粘贴为 {name}",
|
||||
"Cannot paste {name}": "无法粘贴 {name}",
|
||||
"New Worktree from '{name}'…": "从“{name}”新建工作树…",
|
||||
"Prune Worktrees": "清理工作树",
|
||||
"Prune Worktrees…": "清理工作树…",
|
||||
|
||||
Reference in new issue
Заблокувати користувача