From b68307b24f97296d671fd1b312820c293bcfe2d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9B=B7=E7=94=B5=E8=8A=BD=E8=A1=A3?= Date: Fri, 17 Apr 2026 21:32:59 -0400 Subject: [PATCH] refactor(sidebar): drop company name from delete-confirm prompt MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit "删除 OrbitOps AI?" was being truncated to "删除O..." inside the ~100px inline confirm row, because the row has to share width with the 是 / 否 buttons. The name-interpolation was the wrong half of the message to keep: the user has just clicked the trash icon on a specific row, so **which** company is about to be deleted is already anchored by the row they are looking at. The bare confirmation "删除?" / "Delete?" fits comfortably and loses zero information. - zh key: "删除{name}?" → "删除?" - en key: "Delete {name}?" → "Delete?" - Removed the `.replace("{name}", company.name)` call and the fallback string that also interpolated `company.name`. No visual change to the 是 / 否 buttons; the confirm still blocks the row, still requires an explicit click. The only thing gone is the truncated company-name echo. --- src/renderer/i18n/en.ts | 2 +- src/renderer/i18n/zh.ts | 2 +- src/renderer/views/SidebarView.tsx | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/renderer/i18n/en.ts b/src/renderer/i18n/en.ts index 66a34f31..286bb0ba 100644 --- a/src/renderer/i18n/en.ts +++ b/src/renderer/i18n/en.ts @@ -288,7 +288,7 @@ export const en: Record = { "common.close": "Close", "common.yes": "Yes", "common.no": "No", - "sidebar.deleteCompanyConfirm": "Delete {name}?", + "sidebar.deleteCompanyConfirm": "Delete?", "common.confirm": "Confirm", "common.status": "Status", "common.started": "Started", diff --git a/src/renderer/i18n/zh.ts b/src/renderer/i18n/zh.ts index eee588c2..78c33bf6 100644 --- a/src/renderer/i18n/zh.ts +++ b/src/renderer/i18n/zh.ts @@ -288,7 +288,7 @@ export const zh: Record = { "common.close": "关闭", "common.yes": "是", "common.no": "否", - "sidebar.deleteCompanyConfirm": "删除{name}?", + "sidebar.deleteCompanyConfirm": "删除?", "common.confirm": "确认", "common.status": "状态", "common.started": "开始时间", diff --git a/src/renderer/views/SidebarView.tsx b/src/renderer/views/SidebarView.tsx index 01fa1a2b..6c91d9b9 100644 --- a/src/renderer/views/SidebarView.tsx +++ b/src/renderer/views/SidebarView.tsx @@ -84,7 +84,7 @@ export function SidebarView({
{confirmDeleteCompanyId === company.id ? (
- {t("sidebar.deleteCompanyConfirm", `Delete ${company.name}?`).replace("{name}", company.name)} + {t("sidebar.deleteCompanyConfirm")}