Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Roles] Fix wording for updating roles toast to match button text #194427

Merged
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -718,12 +718,21 @@ export const EditRolePage: FunctionComponent<Props> = ({
),
});
} 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',
SiddharthMantri marked this conversation as resolved.
Show resolved Hide resolved
{ defaultMessage: 'Saved role' }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: the button in the create render of the edit role page reads "Create role". Should we also update the toast for this to match?

Suggested change
{ defaultMessage: 'Saved role' }
{ defaultMessage: 'Created role' }

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, i think it makes sense to do so.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in c86d79c

)
);
}
}

backToRoleList();
Expand Down