From aab52828d963dacf5ac7da154c4af03910e5b6aa Mon Sep 17 00:00:00 2001 From: Sebastien Bousquet Date: Tue, 14 May 2024 18:36:23 +0200 Subject: [PATCH] fix: add missing translation --- src/app/components/permission/permission.component.ts | 2 +- src/app/components/role/role.component.ts | 2 +- src/assets/i18n/en.json | 2 ++ src/assets/i18n/fr.json | 2 ++ src/assets/i18n/template.json | 2 ++ 5 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/app/components/permission/permission.component.ts b/src/app/components/permission/permission.component.ts index 578deb1..643a974 100644 --- a/src/app/components/permission/permission.component.ts +++ b/src/app/components/permission/permission.component.ts @@ -84,7 +84,7 @@ export class PermissionComponent implements OnInit { if (result) { this.managerService.deletePermission(permId).subscribe({ next: () => { - this.toastr.success('Permission deleted'); + this.toastr.success(this.translate.instant('Permission deleted')); this.showPerms(); }, error: () => { diff --git a/src/app/components/role/role.component.ts b/src/app/components/role/role.component.ts index 7bf976a..951b5d6 100644 --- a/src/app/components/role/role.component.ts +++ b/src/app/components/role/role.component.ts @@ -83,7 +83,7 @@ export class RoleComponent implements OnInit { if (result) { this.managerService.deleteGroup(roleId).subscribe({ next: () => { - this.toastr.success('Group deleted'); + this.toastr.success(this.translate.instant('Group deleted')); this.showGroups(); }, error: () => { diff --git a/src/assets/i18n/en.json b/src/assets/i18n/en.json index 764a067..e4e7068 100644 --- a/src/assets/i18n/en.json +++ b/src/assets/i18n/en.json @@ -54,6 +54,7 @@ "Permission not updated": "Permission not updated", "Create a permission": "Create a permission", "Update a permission": "Update a permission", + "Permission deleted": "Permission deleted", "Error during permission deletion": "Error during permission deletion", "Delete permission": "Delete permission", "You will delete the permission:": "You will delete the permission", @@ -62,6 +63,7 @@ "Group not updated": "Group not updated", "Create a group": "Create a group", "Update a group": "Update a group", + "Group deleted": "Group deleted", "Error during group deletion": "Error during group deletion", "Delete group": "Delete group", "You will delete the group:": "You will delete the group", diff --git a/src/assets/i18n/fr.json b/src/assets/i18n/fr.json index 19dc3e7..b306a8c 100644 --- a/src/assets/i18n/fr.json +++ b/src/assets/i18n/fr.json @@ -54,6 +54,7 @@ "Permission not updated": "Permission non modifiée", "Create a permission": "Créer une permission", "Update a permission": "Modifier une permission", + "Permission deleted": "Permission supprimée", "Error during permission deletion": "Erreur lors de la suppression de la permission", "Delete permission": "Supprimer une permission", "You will delete the permission:": "Vous êtes sur le point de supprimer la permission : ", @@ -62,6 +63,7 @@ "Group not updated": "Groupe non modifié", "Create a group": "Créer un groupe", "Update a group": "Modifier un groupe", + "Group deleted": "Groupe supprimé", "Error during group deletion": "Erreur lors de la suppression d'un groupe'", "Delete group": "Supprimer un groupe", "You will delete the group:": "Vous êtes sur le point de supprimer le groupe : ", diff --git a/src/assets/i18n/template.json b/src/assets/i18n/template.json index 73d5c1b..810f844 100644 --- a/src/assets/i18n/template.json +++ b/src/assets/i18n/template.json @@ -54,6 +54,7 @@ "Permission not updated": "Permission not updated", "Create a permission": "Create a permission", "Update a permission": "Update a permission", + "Permission deleted": "Permission deleted", "Error during permission deletion": "Error during permission deletion", "Delete permission": "Delete permission", "You will delete the permission:": "You will delete the permission:", @@ -62,6 +63,7 @@ "Group not updated": "Group not updated", "Create a group": "Create a group", "Update a group": "Update a group", + "Group deleted": "Group deleted", "Error during group deletion": "Error during group deletion", "Delete group": "Delete group", "You will delete the group:": "You will delete the group:",