diff --git a/ui-ngx/src/app/modules/home/components/iot-hub/iot-hub-delete-dialog.component.html b/ui-ngx/src/app/modules/home/components/iot-hub/iot-hub-delete-dialog.component.html
index 3de67878aa..f7bcce1201 100644
--- a/ui-ngx/src/app/modules/home/components/iot-hub/iot-hub-delete-dialog.component.html
+++ b/ui-ngx/src/app/modules/home/components/iot-hub/iot-hub-delete-dialog.component.html
@@ -9,7 +9,14 @@
{{ 'iot-hub.remove-confirm-title' | translate:{ name: data.itemName } }}
{{ description }}
@if (keptReferences) {
-
+
}
diff --git a/ui-ngx/src/app/modules/home/components/iot-hub/iot-hub-delete-dialog.component.ts b/ui-ngx/src/app/modules/home/components/iot-hub/iot-hub-delete-dialog.component.ts
index 08ae924eb6..88bdf96fff 100644
--- a/ui-ngx/src/app/modules/home/components/iot-hub/iot-hub-delete-dialog.component.ts
+++ b/ui-ngx/src/app/modules/home/components/iot-hub/iot-hub-delete-dialog.component.ts
@@ -32,6 +32,8 @@ export class TbIotHubDeleteDialogComponent extends DialogComponent,
@@ -42,15 +44,15 @@ export class TbIotHubDeleteDialogComponent extends DialogComponent ({ id: entity.entityId as EntityId, name: entity.name }));
// Kept because other packages use them, because the user had them before the package, or both
- const key = !kept.usedExistingCount ? 'iot-hub.remove-desc-kept' :
- !kept.usedByItemsCount ? 'iot-hub.remove-desc-kept-own' : 'iot-hub.remove-desc-kept-own-or-used';
- this.description = this.translate.instant(key, { count: kept.usedByItemsCount, kept: kept.entities.length });
- } else {
- this.description = this.translate.instant(data.itemType === 'SOLUTION_TEMPLATE' ? 'iot-hub.remove-desc-solution-template' : 'iot-hub.remove-desc');
+ const reasonKey = !kept.usedExistingCount ? 'iot-hub.remove-kept-used' :
+ !kept.usedByItemsCount ? 'iot-hub.remove-kept-own' : 'iot-hub.remove-kept-own-or-used';
+ this.keptTitle = this.translate.instant('iot-hub.remove-kept-title', { kept: kept.entities.length });
+ this.keptReason = this.translate.instant(reasonKey, { kept: kept.entities.length });
}
}
diff --git a/ui-ngx/src/assets/locale/locale.constant-en_US.json b/ui-ngx/src/assets/locale/locale.constant-en_US.json
index fe7490032a..88b545b9d2 100644
--- a/ui-ngx/src/assets/locale/locale.constant-en_US.json
+++ b/ui-ngx/src/assets/locale/locale.constant-en_US.json
@@ -6445,10 +6445,11 @@
"install-success-desc": "'{{name}}' has been installed successfully",
"remove": "Remove",
"remove-confirm-title": "Remove '{{name}}'?",
- "remove-desc": "Removing this will also remove the installed entity and its associated resources within your tenant",
- "remove-desc-kept-own": "Removing this will also remove the installed entity and its associated resources within your tenant. The following { kept, plural, =1 {entity will not be removed, because you had it} other {entities will not be removed, because you had them} } before the package was installed:",
- "remove-desc-kept-own-or-used": "Removing this will also remove the installed entity and its associated resources within your tenant. The following { kept, plural, =1 {entity will not be removed, because you had it before the package was installed or it is used by} other {entities will not be removed, because you had them before the package was installed or they are used by} } { count, plural, =1 {1 other installed package} other {# other installed packages} }:",
- "remove-desc-kept": "Removing this will also remove the installed entity and its associated resources within your tenant. The following { kept, plural, =1 {entity will not be removed, because it is} other {entities will not be removed, because they are} } used by { count, plural, =1 {1 other installed package} other {# other installed packages} }:",
+ "remove-desc": "Removing this will also remove the installed entity and its associated resources within your tenant.",
+ "remove-kept-title": "{ kept, plural, =1 {This entity will not be removed} other {These entities will not be removed} }",
+ "remove-kept-used": "Other installed packages use { kept, plural, =1 {it} other {them} }.",
+ "remove-kept-own": "You had { kept, plural, =1 {it} other {them} } before the package was installed.",
+ "remove-kept-own-or-used": "You had { kept, plural, =1 {it} other {them} } before the package was installed, or other installed packages use { kept, plural, =1 {it} other {them} }.",
"remove-desc-solution-template": "Removing this solution template will also remove all created entities including dashboards, rule chains, devices, and other associated resources within your tenant",
"remove-anyway": "Remove anyway",
"select-entity-for-cf": "Select entity for calculated field '{{name}}'",