From c14e1a168eea15d19c3c1450e2929b499bc8e640 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Eduardo=20Sanz=20Garc=C3=ADa?= <esanz-garcia@gitlab.com>
Date: Wed, 20 Sep 2023 20:56:50 +0200
Subject: [PATCH] Improve text related to custom roles

Implemented feedback from
https://gitlab.com/gitlab-org/gitlab/-/merge_requests/128982

EE: true
---
 .../javascripts/roles_and_permissions/constants.js     |  9 +++++----
 .../components/create_member_role_spec.js              |  2 +-
 locale/gitlab.pot                                      | 10 +++++-----
 3 files changed, 11 insertions(+), 10 deletions(-)

diff --git a/ee/app/assets/javascripts/roles_and_permissions/constants.js b/ee/app/assets/javascripts/roles_and_permissions/constants.js
index 39bfd378fc8aba..7d354e78f5542a 100644
--- a/ee/app/assets/javascripts/roles_and_permissions/constants.js
+++ b/ee/app/assets/javascripts/roles_and_permissions/constants.js
@@ -19,7 +19,7 @@ export const GUEST_PERMISSIONS = Object.freeze({
   },
   [ADMIN_VULNERABILITY]: {
     help: s__(
-      "MemberRoles|Allows admin access to the vulnerability reports. 'Read vulnerability' must be selected in order to take effect.",
+      "MemberRoles|Allows admin access to the vulnerability reports. Select 'Read vulnerability' for this to take effect.",
     ),
     text: s__('MemberRoles|Admin vulnerability'),
     value: ADMIN_VULNERABILITY,
@@ -73,10 +73,11 @@ export const I18N_EMPTY_TEXT_SELF_MANAGED = s__(
 );
 export const I18N_FETCH_ERROR = s__('MemberRoles|Failed to fetch roles.');
 export const I18N_FIELD_FORM_ERROR = __('This field is required.');
-export const I18N_LICENSE_ERROR = s__('MemberRoles|Make sure the group has an Ultimate license.');
+export const I18N_LICENSE_ERROR = s__('MemberRoles|Make sure the group is in the Ultimate tier.');
 export const I18N_MODAL_TITLE = s__('MemberRoles|Are you sure you want to delete this role?');
-export const I18N_MODAL_WARNING = s__(`MemberRoles|Removing a custom role also removes all members with this custom role from the group.
-If you decide to delete a custom role, you must re-add these users to the group.`);
+export const I18N_MODAL_WARNING = s__(
+  `MemberRoles|To delete the custom role make sure no group member has this custom role`,
+);
 export const I18N_NEW_ROLE_BASE_ROLE_LABEL = s__('MemberRoles|Base role to use as template');
 export const I18N_NEW_ROLE_BASE_ROLE_DESCRIPTION = s__(
   'MemberRoles|Select a standard role to add permissions.',
diff --git a/ee/spec/frontend/roles_and_permissions/components/create_member_role_spec.js b/ee/spec/frontend/roles_and_permissions/components/create_member_role_spec.js
index ad4a80a063444d..b32ee21e99e095 100644
--- a/ee/spec/frontend/roles_and_permissions/components/create_member_role_spec.js
+++ b/ee/spec/frontend/roles_and_permissions/components/create_member_role_spec.js
@@ -67,7 +67,7 @@ describe('CreateMemberRole', () => {
 
     expect(checkboxThreeText).toContain('Admin vulnerability');
     expect(checkboxThreeText).toContain(
-      "Allows admin access to the vulnerability reports. 'Read vulnerability' must be selected in order to take effect.",
+      "Allows admin access to the vulnerability reports. Select 'Read vulnerability' for this to take effect.",
     );
   });
 
diff --git a/locale/gitlab.pot b/locale/gitlab.pot
index 19f412bcfc2b9d..dce3980e6f3453 100644
--- a/locale/gitlab.pot
+++ b/locale/gitlab.pot
@@ -29033,7 +29033,7 @@ msgstr ""
 msgid "MemberRoles|Admin vulnerability"
 msgstr ""
 
-msgid "MemberRoles|Allows admin access to the vulnerability reports. 'Read vulnerability' must be selected in order to take effect."
+msgid "MemberRoles|Allows admin access to the vulnerability reports. Select 'Read vulnerability' for this to take effect."
 msgstr ""
 
 msgid "MemberRoles|Allows read-only access to the source code."
@@ -29081,7 +29081,7 @@ msgstr ""
 msgid "MemberRoles|Incident manager"
 msgstr ""
 
-msgid "MemberRoles|Make sure the group has an Ultimate license."
+msgid "MemberRoles|Make sure the group is in the Ultimate tier."
 msgstr ""
 
 msgid "MemberRoles|Name"
@@ -29099,9 +29099,6 @@ msgstr ""
 msgid "MemberRoles|Read vulnerability"
 msgstr ""
 
-msgid "MemberRoles|Removing a custom role also removes all members with this custom role from the group. If you decide to delete a custom role, you must re-add these users to the group."
-msgstr ""
-
 msgid "MemberRoles|Role name"
 msgstr ""
 
@@ -29120,6 +29117,9 @@ msgstr ""
 msgid "MemberRoles|To add a new role select a group and then 'Add new role'."
 msgstr ""
 
+msgid "MemberRoles|To delete the custom role make sure no group member has this custom role"
+msgstr ""
+
 msgid "MemberRole|%{requirement} has to be enabled in order to enable %{permission}."
 msgstr ""
 
-- 
GitLab