From 4599159bff42bb385779c28b61aeffea8e8f6329 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Fri, 20 Jun 2025 10:42:33 +0800 Subject: [PATCH] Refactor: the promptRemove.confirmRelatedResource message needs to be refactored (backport #293) (#343) * refactor: the promptRemove.confirmRelatedResource message needs to be refactored (#293) * feat: change dialog wordings Signed-off-by: Yi-Ya Chen * refactor: update protip wording Co-authored-by: Jillian Maroket <67180770+jillian-maroket@users.noreply.github.com> Signed-off-by: Yiya Chen --------- Signed-off-by: Yi-Ya Chen Signed-off-by: Yiya Chen Co-authored-by: Jillian Maroket <67180770+jillian-maroket@users.noreply.github.com> (cherry picked from commit 258476876a24ee7c8dd22241ddde5c69f0527897) # Conflicts: # pkg/harvester/dialog/ConfirmRelatedToRemoveDialog.vue * Resolve conflict Signed-off-by: Andy Lee * Fix conflict Signed-off-by: Andy Lee --------- Signed-off-by: Andy Lee Co-authored-by: Yiya Chen Co-authored-by: Andy Lee --- pkg/harvester/dialog/ConfirmRelatedToRemoveDialog.vue | 4 ++-- pkg/harvester/l10n/en-us.yaml | 7 ++++++- pkg/harvester/models/harvester/namespace.js | 3 +-- pkg/harvester/models/harvester/node.js | 3 +-- 4 files changed, 10 insertions(+), 7 deletions(-) diff --git a/pkg/harvester/dialog/ConfirmRelatedToRemoveDialog.vue b/pkg/harvester/dialog/ConfirmRelatedToRemoveDialog.vue index cc4ead48..36bd0c3e 100644 --- a/pkg/harvester/dialog/ConfirmRelatedToRemoveDialog.vue +++ b/pkg/harvester/dialog/ConfirmRelatedToRemoveDialog.vue @@ -128,7 +128,7 @@ export default { }, protip() { - return this.t('promptRemove.protip', { alternateLabel }); + return this.t('dialog.promptRemove.protip', { alternateLabel }); }, }, @@ -164,7 +164,7 @@ export default { > diff --git a/pkg/harvester/l10n/en-us.yaml b/pkg/harvester/l10n/en-us.yaml index 65a08bb6..9c77b124 100644 --- a/pkg/harvester/l10n/en-us.yaml +++ b/pkg/harvester/l10n/en-us.yaml @@ -52,6 +52,11 @@ dialog: message: "Are you sure you want to continue stop the {type} {names}?" pause: message: "Are you sure you want to continue pause the {type} {names}?" + promptRemove: + title: "Delete {type}" + warningMessage: "Deleting the selected {type} permanently removes all resources on {thisOrThese} {type}. This action is irreversible. Do you want to continue?" + confirmName: "Type {nameToMatch} to delete the {type}:" + protip: "Tip: Hold the {alternateLabel} key while clicking Delete to bypass the confirmation step." harvester: branding: @@ -785,7 +790,7 @@ harvester: instanceLabels: banner: These labels are automatically synchronized to the virtual machine instance. labels: - banner: These key values are added as labels to the virtual machine. + banner: These key values are added as labels to the virtual machine. volume: label: Volumes diff --git a/pkg/harvester/models/harvester/namespace.js b/pkg/harvester/models/harvester/namespace.js index 57198ef7..e15bedbe 100644 --- a/pkg/harvester/models/harvester/namespace.js +++ b/pkg/harvester/models/harvester/namespace.js @@ -67,8 +67,7 @@ export default class HciNamespace extends namespace { promptRemove(resources = this) { this.$dispatch('promptModal', { resources, - warningMessageKey: 'promptRemove.confirmRelatedResource', - component: 'ConfirmRelatedToRemoveDialog' + component: 'ConfirmRelatedToRemoveDialog' }); } diff --git a/pkg/harvester/models/harvester/node.js b/pkg/harvester/models/harvester/node.js index 3370816c..709771a2 100644 --- a/pkg/harvester/models/harvester/node.js +++ b/pkg/harvester/models/harvester/node.js @@ -115,8 +115,7 @@ export default class HciNode extends HarvesterResource { promptRemove(resources = this) { this.$dispatch('promptModal', { resources, - warningMessageKey: 'promptRemove.confirmRelatedResource', - component: 'ConfirmRelatedToRemoveDialog' + component: 'ConfirmRelatedToRemoveDialog' }); }