i18n(sidebar): localise company delete confirmation + Yes/No buttons (P3-48)
Delete-company confirmation text now uses sidebar.deleteCompanyConfirm key
with {name} placeholder; Yes/No buttons route through common.yes/no.
This commit is contained in:
1 parent
3a1f79324d
commit
d8c2e10005
3 files changed
+5
-3
No files matched your search
@@ -257,6 +257,7 @@ export const en: Record<string, string> = {
|
||||
"common.close": "Close",
|
||||
"common.yes": "Yes",
|
||||
"common.no": "No",
|
||||
"sidebar.deleteCompanyConfirm": "Delete {name}?",
|
||||
"common.confirm": "Confirm",
|
||||
"common.status": "Status",
|
||||
"common.started": "Started",
|
||||
|
||||
@@ -257,6 +257,7 @@ export const zh: Record<string, string> = {
|
||||
"common.close": "关闭",
|
||||
"common.yes": "是",
|
||||
"common.no": "否",
|
||||
"sidebar.deleteCompanyConfirm": "删除{name}?",
|
||||
"common.confirm": "确认",
|
||||
"common.status": "状态",
|
||||
"common.started": "开始时间",
|
||||
|
||||
@@ -86,20 +86,20 @@ export function SidebarView({
|
||||
<div key={company.id} className="group flex items-center">
|
||||
{confirmDeleteCompanyId === company.id ? (
|
||||
<div className="flex w-full items-center gap-2 px-3 py-2">
|
||||
<span className="flex-1 truncate text-[12px] text-destructive">Delete {company.name}?</span>
|
||||
<span className="flex-1 truncate text-[12px] text-destructive">{t("sidebar.deleteCompanyConfirm", `Delete ${company.name}?`).replace("{name}", company.name)}</span>
|
||||
<button
|
||||
type="button"
|
||||
className="rounded px-2 py-0.5 text-[11px] font-semibold text-destructive transition hover:bg-destructive hover:text-primary-foreground"
|
||||
onClick={() => void deleteCompany(company.id)}
|
||||
>
|
||||
Yes
|
||||
{t("common.yes")}
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
className="rounded px-2 py-0.5 text-[11px] font-semibold text-muted-foreground transition hover:bg-muted"
|
||||
onClick={() => setConfirmDeleteCompanyId(null)}
|
||||
>
|
||||
No
|
||||
{t("common.no")}
|
||||
</button>
|
||||
</div>
|
||||
) : (
|
||||
|
||||
Reference in new issue
Block a user