From 02ee2880fe0a1bd5b8439b106823d9940e19c9a2 Mon Sep 17 00:00:00 2001
From: l0ng-ai <24760907+l0ng-ai@users.noreply.github.com>
Date: Wed, 11 Nov 2026 19:25:09 +0800
Subject: [PATCH] fix: translate New Project popup and error text; green CI on
main (#2715)
Translate the project popup actions and the non-empty target error; translate the JDK field label. Fix clippy in ide-jdwp, formatting, RUSTSEC-2026-0486 (rustix 1.1.6) and agent E2E tests that expected the removed floating Quote button.
---
Cargo.lock | 4 +--
crates/ide-jdwp/src/ids.rs | 2 +-
e2e/agentMarkdown.spec.ts | 31 +++----------------
.../plugins/__tests__/commandBackend.test.ts | 22 +++++++++++--
src/features/welcome/ProjectPopup.tsx | 2 +-
src/platform/i18n.test.ts | 1 +
src/platform/locales/text/en.json | 3 +-
src/platform/locales/text/zh.json | 5 +--
8 files changed, 35 insertions(+), 35 deletions(-)
diff --git a/Cargo.lock b/Cargo.lock
index 73a767fdb8..1cb3c48739 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -7796,9 +7796,9 @@ dependencies = [
[[package]]
name = "rustix"
-version = "1.1.5"
+version = "1.1.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "891efababe418670775f199f0d233d84843c227a0949a883ce15b37c78d6629d"
+checksum = "e5e76742e5294153d4dde1207dbec5bdd81eef6fabdc0d2118babadabfd858aa"
dependencies = [
"bitflags 2.13.2",
"errno",
diff --git a/crates/ide-jdwp/src/ids.rs b/crates/ide-jdwp/src/ids.rs
index f044969cc2..89e6782b37 100644
--- a/crates/ide-jdwp/src/ids.rs
+++ b/crates/ide-jdwp/src/ids.rs
@@ -257,7 +257,7 @@ mod tests {
#[test]
fn object_array_region_rejects_void_and_primitive_elements() {
- for inner in [b'V', b'I'] {
+ for inner in *b"VI" {
let mut w = Writer::new();
w.u8(b'[');
w.i32(1);
diff --git a/e2e/agentMarkdown.spec.ts b/e2e/agentMarkdown.spec.ts
index 285c9da1b5..10a3405a3f 100644
--- a/e2e/agentMarkdown.spec.ts
+++ b/e2e/agentMarkdown.spec.ts
@@ -205,38 +205,17 @@ test("keeps latest reply actions visible and quotes into the draft without shift
);
});
-test("shows a Quote button when a mouse selection ends, leaving Ctrl+C to copy", async ({ page, context }) => {
+test("copies a mouse selection with Ctrl+C and pops up no Quote button", async ({ page, context }) => {
await context.grantPermissions(["clipboard-read", "clipboard-write"]);
- const reply = await openReply(page, "Selectable answer");
- const text = reply.locator("p").first();
- const box = (await text.boundingBox())!;
- await page.mouse.move(box.x + 2, box.y + box.height / 2);
- await page.mouse.down();
- await page.mouse.move(box.x + box.width - 2, box.y + box.height / 2);
- await page.mouse.up();
- const quote = page.getByRole("button", { name: "Quote", exact: true });
- await expect(quote).toBeVisible();
- // The button doesn't take focus: Ctrl+C still copies the selection.
- await page.keyboard.press("ControlOrMeta+c");
- expect(await page.evaluate(() => navigator.clipboard.readText())).toBe("Selectable answer");
- await quote.click();
- await expect(quote).toHaveCount(0);
- const draft = page.getByRole("textbox", { name: "Message", exact: true });
- await expect(draft).toBeFocused();
- await expect(draft).toHaveValue("> Selectable answer\n\n");
-});
-
-test("hides the Quote button on a click elsewhere", async ({ page }) => {
const reply = await openReply(page, "Selectable answer");
const box = (await reply.locator("p").first().boundingBox())!;
await page.mouse.move(box.x + 2, box.y + box.height / 2);
await page.mouse.down();
await page.mouse.move(box.x + box.width - 2, box.y + box.height / 2);
await page.mouse.up();
- const quote = page.getByRole("button", { name: "Quote", exact: true });
- await expect(quote).toBeVisible();
- await page.getByRole("textbox", { name: "Message", exact: true }).click();
- await expect(quote).toHaveCount(0);
+ await page.keyboard.press("ControlOrMeta+c");
+ expect(await page.evaluate(() => navigator.clipboard.readText())).toBe("Selectable answer");
+ await expect(page.getByRole("button", { name: "Quote", exact: true })).toHaveCount(0);
});
test("keeps chat history readable and selections free of timestamps and status labels", async ({ page, context }) => {
@@ -315,7 +294,7 @@ test("keeps chat history readable and selections free of timestamps and status l
// The finished turn's reasoning is folded with its work.
await stream.locator("[class*='_turnFold_'] > summary").click();
await stream.locator("[class*='_thought_'] > summary").click();
- await expect(stream.getByText("Requesting task context", { exact: true })).toBeVisible();
+ await expect(stream.locator("[class*='_thoughtPreview_']")).toHaveText("Requesting task context");
await expect(stream.locator("[class*='_thoughtBody_'] strong")).toHaveText("Requesting task context");
await page.evaluate(async (id) => {
const path = "/src/features/agents/store.ts";
diff --git a/src/features/plugins/__tests__/commandBackend.test.ts b/src/features/plugins/__tests__/commandBackend.test.ts
index c1b5d8e85c..12b9c0b200 100644
--- a/src/features/plugins/__tests__/commandBackend.test.ts
+++ b/src/features/plugins/__tests__/commandBackend.test.ts
@@ -65,7 +65,16 @@ it("does not invoke a command when the caller signal is already aborted", async
controller.abort();
await expect(
- tauriPluginsBackend.runCommand("example", "annotations", "buffer", null, [], undefined, undefined, controller.signal),
+ tauriPluginsBackend.runCommand(
+ "example",
+ "annotations",
+ "buffer",
+ null,
+ [],
+ undefined,
+ undefined,
+ controller.signal,
+ ),
).rejects.toMatchObject({ name: "AbortError" });
expect(invoke).not.toHaveBeenCalled();
});
@@ -75,7 +84,16 @@ it("does not cancel a completed command when the caller later aborts", async ()
const controller = new AbortController();
await expect(
- tauriPluginsBackend.runCommand("example", "annotations", "buffer", null, [], undefined, undefined, controller.signal),
+ tauriPluginsBackend.runCommand(
+ "example",
+ "annotations",
+ "buffer",
+ null,
+ [],
+ undefined,
+ undefined,
+ controller.signal,
+ ),
).resolves.toBe("finished");
controller.abort();
diff --git a/src/features/welcome/ProjectPopup.tsx b/src/features/welcome/ProjectPopup.tsx
index 122f06fb37..bd67cead82 100644
--- a/src/features/welcome/ProjectPopup.tsx
+++ b/src/features/welcome/ProjectPopup.tsx
@@ -160,7 +160,7 @@ export function ProjectPopup({ anchor, onClose }: ProjectPopupProps) {
{e.kind === "action" ? (
<>
- {e.label}
+ {tx(e.label)}
>
) : (
diff --git a/src/platform/i18n.test.ts b/src/platform/i18n.test.ts
index 550cfd58e7..5fccc3ea69 100644
--- a/src/platform/i18n.test.ts
+++ b/src/platform/i18n.test.ts
@@ -283,6 +283,7 @@ describe("catalogs", () => {
"Yarn",
"Cargo",
"CMake",
+ "Tailwind CSS",
]);
const translated = SUPPORTED_LOCALES.filter((locale) => locale !== "en").sort();
diff --git a/src/platform/locales/text/en.json b/src/platform/locales/text/en.json
index 2099b38e0e..fbb7c5cce8 100644
--- a/src/platform/locales/text/en.json
+++ b/src/platform/locales/text/en.json
@@ -1255,5 +1255,6 @@
"{program} {found} is installed, but this project needs {min} or later.": "{program} {found} is installed, but this project needs {min} or later.",
"{program} is not installed.": "{program} is not installed.",
"Create a project, open a folder from disk or clone a repository from version control.": "Create a project, open a folder from disk or clone a repository from version control.",
- "New Project": "New Project"
+ "New Project": "New Project",
+ "{path} already exists and is not empty": "{path} already exists and is not empty"
}
diff --git a/src/platform/locales/text/zh.json b/src/platform/locales/text/zh.json
index c49277edfe..c07f7dd400 100644
--- a/src/platform/locales/text/zh.json
+++ b/src/platform/locales/text/zh.json
@@ -7572,11 +7572,12 @@
"Application type:": "应用类型:",
"Features:": "特性:",
"Tailwind CSS": "Tailwind CSS",
- "JDK:": "JDK:",
+ "JDK:": "JDK:",
"Search generators": "搜索生成器",
"Generators": "生成器",
"Loading options…": "正在加载选项…",
"{program} {found} is installed, but this project needs {min} or later.": "已安装 {program} {found},但该项目需要 {min} 或更高版本。",
"{program} is not installed.": "未安装 {program}。",
- "Create a project, open a folder from disk or clone a repository from version control.": "新建项目、打开磁盘上的文件夹,或从版本控制克隆仓库。"
+ "Create a project, open a folder from disk or clone a repository from version control.": "新建项目、打开磁盘上的文件夹,或从版本控制克隆仓库。",
+ "{path} already exists and is not empty": "{path} 已存在且不为空"
}