From 3acd5ef29282a44a4554239557c0922dc7a29f10 Mon Sep 17 00:00:00 2001 From: dongmucat <1127093059@qq.com> Date: Wed, 6 May 2026 17:53:24 +0800 Subject: [PATCH] fix(namespace): relocate delete i18n keys to match frontend usage The delete translations lived under myNamespaces.delete.* but every caller looks them up as namespace.delete.* (my-namespaces.tsx and delete-namespace-dialog.tsx). i18next fell back to the raw key, so the rendered button read 'namespace.delete.button' and the E2E regex /^delete$/i never matched. Move the block under namespace.* in both locales to make the keys resolvable. --- web/src/i18n/locales/en.json | 38 ++++++++++++++++++------------------ web/src/i18n/locales/zh.json | 38 ++++++++++++++++++------------------ 2 files changed, 38 insertions(+), 38 deletions(-) diff --git a/web/src/i18n/locales/en.json b/web/src/i18n/locales/en.json index ef00cfbe..961c0ed9 100644 --- a/web/src/i18n/locales/en.json +++ b/web/src/i18n/locales/en.json @@ -428,24 +428,6 @@ "unfreeze": "Unfreeze", "archive": "Archive", "restore": "Restore", - "delete": { - "button": "Delete", - "confirm": { - "title": "Delete namespace", - "description": "\"{{name}}\" will be permanently deleted. This action cannot be undone. Please provide a reason for deletion." - }, - "reason": { - "label": "Deletion reason", - "placeholder": "Please explain why this namespace needs to be deleted..." - }, - "success": { - "title": "Namespace deleted", - "description": "\"{{name}}\" has been permanently deleted." - }, - "error": { - "title": "Failed to delete namespace" - } - }, "activeHint": "This namespace is fully active and can continue managing members, reviews, and skill publishing.", "frozenHint": "This namespace is frozen. Members can still view it, but it is read-only and cannot publish or change membership.", "archivedHint": "This namespace is archived. Public entry points are hidden, but you can still view and restore it from the dashboard.", @@ -770,7 +752,25 @@ "notFound": "Namespace not found", "skillList": "Skills", "emptyTitle": "No skills", - "emptyDescription": "No skills have been published in this namespace yet" + "emptyDescription": "No skills have been published in this namespace yet", + "delete": { + "button": "Delete", + "confirm": { + "title": "Delete namespace", + "description": "\"{{name}}\" will be permanently deleted. This action cannot be undone. Please provide a reason for deletion." + }, + "reason": { + "label": "Deletion reason", + "placeholder": "Please explain why this namespace needs to be deleted..." + }, + "success": { + "title": "Namespace deleted", + "description": "\"{{name}}\" has been permanently deleted." + }, + "error": { + "title": "Failed to delete namespace" + } + } }, "skillDetail": { "back": "Back", diff --git a/web/src/i18n/locales/zh.json b/web/src/i18n/locales/zh.json index e7c719b2..5753a454 100644 --- a/web/src/i18n/locales/zh.json +++ b/web/src/i18n/locales/zh.json @@ -428,24 +428,6 @@ "unfreeze": "解冻", "archive": "归档", "restore": "恢复", - "delete": { - "button": "删除", - "confirm": { - "title": "删除命名空间", - "description": "\"{{name}}\"将被永久删除,此操作无法撤销。请提供删除原因。" - }, - "reason": { - "label": "删除原因", - "placeholder": "请说明为什么需要删除此命名空间..." - }, - "success": { - "title": "命名空间已删除", - "description": "\"{{name}}\"已被永久删除。" - }, - "error": { - "title": "删除命名空间失败" - } - }, "activeHint": "命名空间运行正常,可继续管理成员、处理审核和发布技能。", "frozenHint": "命名空间已冻结。成员仍可查看,但当前处于只读状态,不能继续发布或变更成员。", "archivedHint": "命名空间已归档。公开入口已隐藏,但你仍可在管理台查看并恢复。", @@ -770,7 +752,25 @@ "notFound": "命名空间不存在", "skillList": "技能列表", "emptyTitle": "暂无技能", - "emptyDescription": "该命名空间下还没有发布任何技能" + "emptyDescription": "该命名空间下还没有发布任何技能", + "delete": { + "button": "删除", + "confirm": { + "title": "删除命名空间", + "description": "\"{{name}}\"将被永久删除,此操作无法撤销。请提供删除原因。" + }, + "reason": { + "label": "删除原因", + "placeholder": "请说明为什么需要删除此命名空间..." + }, + "success": { + "title": "命名空间已删除", + "description": "\"{{name}}\"已被永久删除。" + }, + "error": { + "title": "删除命名空间失败" + } + } }, "skillDetail": { "back": "返回上一页",