From db4adff17299ecc0e0f0b5602d399c3b339ffb06 Mon Sep 17 00:00:00 2001 From: Sid Date: Mon, 30 Sep 2024 14:41:53 +0200 Subject: [PATCH] [Roles] Fix wording for updating roles toast to match button text --- .../roles/edit_role/edit_role_page.tsx | 21 +++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/x-pack/plugins/security/public/management/roles/edit_role/edit_role_page.tsx b/x-pack/plugins/security/public/management/roles/edit_role/edit_role_page.tsx index 02812eda34c7b..f994f16f6ae42 100644 --- a/x-pack/plugins/security/public/management/roles/edit_role/edit_role_page.tsx +++ b/x-pack/plugins/security/public/management/roles/edit_role/edit_role_page.tsx @@ -718,12 +718,21 @@ export const EditRolePage: FunctionComponent = ({ ), }); } else { - notifications.toasts.addSuccess( - i18n.translate( - 'xpack.security.management.editRole.roleSuccessfullySavedNotificationMessage', - { defaultMessage: 'Saved role' } - ) - ); + if (isEditingExistingRole) { + notifications.toasts.addSuccess( + i18n.translate( + 'xpack.security.management.editRole.roleSuccessfullyUpdatedNotificationMessage', + { defaultMessage: 'Updated role' } + ) + ); + } else { + notifications.toasts.addSuccess( + i18n.translate( + 'xpack.security.management.editRole.roleSuccessfullySavedNotificationMessage', + { defaultMessage: 'Saved role' } + ) + ); + } } backToRoleList();