From 5ea1ab0b8a21764aa54a5ef9650a0d8046f3f0a8 Mon Sep 17 00:00:00 2001 From: Sid Date: Thu, 3 Oct 2024 10:22:44 +0200 Subject: [PATCH] [Roles] Fix wording for updating roles toast to match button text (#194427) Closes https://github.com/elastic/kibana/issues/194406 ## Summary Fix wording for Roles update toast to match button when updating an existing role. ### Screenshots image ### Release notes Changes wording for toast message when updating an existing role successfully. The toast now matches the button to say `Updated role` --------- Co-authored-by: Jeramy Soucy Co-authored-by: Elastic Machine --- .../roles/edit_role/edit_role_page.tsx | 21 +++++++++++++------ .../translations/translations/fr-FR.json | 3 +-- .../translations/translations/ja-JP.json | 3 +-- .../translations/translations/zh-CN.json | 3 +-- 4 files changed, 18 insertions(+), 12 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..270ed24e1ad2d 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.roleSuccessfullyCreatedNotificationMessage', + { defaultMessage: 'Created role' } + ) + ); + } } backToRoleList(); diff --git a/x-pack/plugins/translations/translations/fr-FR.json b/x-pack/plugins/translations/translations/fr-FR.json index 7601e3e48b1fe..a709bffa4c46d 100644 --- a/x-pack/plugins/translations/translations/fr-FR.json +++ b/x-pack/plugins/translations/translations/fr-FR.json @@ -34710,7 +34710,6 @@ "xpack.security.management.editRole.roleNameFormRowHelpText": "Un nom de rôle ne peut pas être modifié après sa création.", "xpack.security.management.editRole.roleNameFormRowTitle": "Nom de rôle", "xpack.security.management.editRole.roleSuccessfullyDeletedNotificationMessage": "Rôle supprimé", - "xpack.security.management.editRole.roleSuccessfullySavedNotificationMessage": "Rôle enregistré", "xpack.security.management.editRole.setPrivilegesToKibanaSpacesDescription": "Définissez les privilèges sur vos données Elasticsearch et contrôlez l'accès à vos espaces \"Projet\".", "xpack.security.management.editRole.simplePrivilegeForm.allPrivilegeDropdown": "Tous", "xpack.security.management.editRole.simplePrivilegeForm.allPrivilegeDropdownDescription": "Accorde un accès complet à la totalité de Kibana", @@ -47684,4 +47683,4 @@ "xpack.watcher.watchEdit.thresholdWatchExpression.aggType.fieldIsRequiredValidationMessage": "Ce champ est requis.", "xpack.watcher.watcherDescription": "Détectez les modifications survenant dans vos données en créant, gérant et monitorant des alertes." } -} \ No newline at end of file +} diff --git a/x-pack/plugins/translations/translations/ja-JP.json b/x-pack/plugins/translations/translations/ja-JP.json index 6be35ea91f84c..593275b7cf06d 100644 --- a/x-pack/plugins/translations/translations/ja-JP.json +++ b/x-pack/plugins/translations/translations/ja-JP.json @@ -34454,7 +34454,6 @@ "xpack.security.management.editRole.roleNameFormRowHelpText": "ロール名は作成後変更できません。", "xpack.security.management.editRole.roleNameFormRowTitle": "ロール名", "xpack.security.management.editRole.roleSuccessfullyDeletedNotificationMessage": "ロールを削除しました", - "xpack.security.management.editRole.roleSuccessfullySavedNotificationMessage": "ロールを保存しました", "xpack.security.management.editRole.setPrivilegesToKibanaSpacesDescription": "Elasticsearchデータの権限を設定し、プロジェクトスペースへのアクセスを管理します。", "xpack.security.management.editRole.simplePrivilegeForm.allPrivilegeDropdown": "すべて", "xpack.security.management.editRole.simplePrivilegeForm.allPrivilegeDropdownDescription": "Kibana 全体への完全アクセスを許可します", @@ -47421,4 +47420,4 @@ "xpack.watcher.watchEdit.thresholdWatchExpression.aggType.fieldIsRequiredValidationMessage": "フィールドを選択してください。", "xpack.watcher.watcherDescription": "アラートの作成、管理、監視によりデータへの変更を検知します。" } -} \ No newline at end of file +} diff --git a/x-pack/plugins/translations/translations/zh-CN.json b/x-pack/plugins/translations/translations/zh-CN.json index b06da5e8b9bd5..331e062ee7ba3 100644 --- a/x-pack/plugins/translations/translations/zh-CN.json +++ b/x-pack/plugins/translations/translations/zh-CN.json @@ -34498,7 +34498,6 @@ "xpack.security.management.editRole.roleNameFormRowHelpText": "创建角色名称后无法更改。", "xpack.security.management.editRole.roleNameFormRowTitle": "角色名称", "xpack.security.management.editRole.roleSuccessfullyDeletedNotificationMessage": "已删除角色", - "xpack.security.management.editRole.roleSuccessfullySavedNotificationMessage": "保存的角色", "xpack.security.management.editRole.setPrivilegesToKibanaSpacesDescription": "设置 Elasticsearch 数据的权限并控制对项目空间的访问权限。", "xpack.security.management.editRole.simplePrivilegeForm.allPrivilegeDropdown": "全部", "xpack.security.management.editRole.simplePrivilegeForm.allPrivilegeDropdownDescription": "授予对 Kibana 全部功能的完全权限", @@ -47475,4 +47474,4 @@ "xpack.watcher.watchEdit.thresholdWatchExpression.aggType.fieldIsRequiredValidationMessage": "此字段必填。", "xpack.watcher.watcherDescription": "通过创建、管理和监测警报来检测数据中的更改。" } -} \ No newline at end of file +}