aboutsummaryrefslogtreecommitdiffstats
path: root/server
diff options
context:
space:
mode:
authorJeremy Davis <jeremy.davis@sonarsource.com>2021-11-03 17:22:30 +0100
committersonartech <sonartech@sonarsource.com>2021-11-04 20:03:24 +0000
commit7a139a06a3591579fd98ecd6cc935bf47579cee6 (patch)
tree925bd6aa6203f072574066e32830d7a03bf095bb /server
parent077d47e606e630427a040ff668ee6252a5261992 (diff)
downloadsonarqube-7a139a06a3591579fd98ecd6cc935bf47579cee6.tar.gz
sonarqube-7a139a06a3591579fd98ecd6cc935bf47579cee6.zip
SONAR-15604 SONAR-15605 Improve wording for permission removal from Quality Gates and Quality Profiles
Diffstat (limited to 'server')
-rw-r--r--server/sonar-web/src/main/js/apps/quality-gates/components/QualityGatePermissionsRenderer.tsx8
-rw-r--r--server/sonar-web/src/main/js/apps/quality-gates/components/__tests__/__snapshots__/QualityGatePermissionsRenderer-test.tsx.snap8
-rw-r--r--server/sonar-web/src/main/js/apps/quality-profiles/details/ProfilePermissionsGroup.tsx8
-rw-r--r--server/sonar-web/src/main/js/apps/quality-profiles/details/ProfilePermissionsUser.tsx8
4 files changed, 17 insertions, 15 deletions
diff --git a/server/sonar-web/src/main/js/apps/quality-gates/components/QualityGatePermissionsRenderer.tsx b/server/sonar-web/src/main/js/apps/quality-gates/components/QualityGatePermissionsRenderer.tsx
index 2eda6d6dad1..aab84606c75 100644
--- a/server/sonar-web/src/main/js/apps/quality-gates/components/QualityGatePermissionsRenderer.tsx
+++ b/server/sonar-web/src/main/js/apps/quality-gates/components/QualityGatePermissionsRenderer.tsx
@@ -91,7 +91,9 @@ export default function QualityGatePermissionsRenderer(props: QualityGatePermiss
{permissionToDelete && (
<ConfirmModal
header={
- isUser(permissionToDelete) ? translate('users.remove') : translate('groups.remove')
+ isUser(permissionToDelete)
+ ? translate('quality_gates.permissions.remove.user')
+ : translate('quality_gates.permissions.remove.group')
}
confirmButtonText={translate('remove')}
isDestructive={true}
@@ -101,8 +103,8 @@ export default function QualityGatePermissionsRenderer(props: QualityGatePermiss
<FormattedMessage
defaultMessage={
isUser(permissionToDelete)
- ? translate('users.remove.confirmation')
- : translate('groups.remove.confirmation')
+ ? translate('quality_gates.permissions.remove.user.confirmation')
+ : translate('quality_gates.permissions.remove.group.confirmation')
}
id="remove.confirmation"
values={{
diff --git a/server/sonar-web/src/main/js/apps/quality-gates/components/__tests__/__snapshots__/QualityGatePermissionsRenderer-test.tsx.snap b/server/sonar-web/src/main/js/apps/quality-gates/components/__tests__/__snapshots__/QualityGatePermissionsRenderer-test.tsx.snap
index 42ebeba1913..66d0aa60ef3 100644
--- a/server/sonar-web/src/main/js/apps/quality-gates/components/__tests__/__snapshots__/QualityGatePermissionsRenderer-test.tsx.snap
+++ b/server/sonar-web/src/main/js/apps/quality-gates/components/__tests__/__snapshots__/QualityGatePermissionsRenderer-test.tsx.snap
@@ -131,13 +131,13 @@ exports[`should render correctly: show remove modal for group 1`] = `
"name": "deletable group",
}
}
- header="groups.remove"
+ header="quality_gates.permissions.remove.group"
isDestructive={true}
onClose={[MockFunction]}
onConfirm={[MockFunction]}
>
<FormattedMessage
- defaultMessage="groups.remove.confirmation"
+ defaultMessage="quality_gates.permissions.remove.group.confirmation"
id="remove.confirmation"
values={
Object {
@@ -213,13 +213,13 @@ exports[`should render correctly: show remove modal for user 1`] = `
"login": "userlogin",
}
}
- header="users.remove"
+ header="quality_gates.permissions.remove.user"
isDestructive={true}
onClose={[MockFunction]}
onConfirm={[MockFunction]}
>
<FormattedMessage
- defaultMessage="users.remove.confirmation"
+ defaultMessage="quality_gates.permissions.remove.user.confirmation"
id="remove.confirmation"
values={
Object {
diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfilePermissionsGroup.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfilePermissionsGroup.tsx
index f4757e3e533..d1c5c4281ee 100644
--- a/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfilePermissionsGroup.tsx
+++ b/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfilePermissionsGroup.tsx
@@ -74,13 +74,13 @@ export default class ProfilePermissionsGroup extends React.PureComponent<Props,
renderDeleteModal = (props: ChildrenProps) => (
<div>
<header className="modal-head">
- <h2>{translate('groups.remove')}</h2>
+ <h2>{translate('quality_profiles.permissions.remove.group')}</h2>
</header>
<div className="modal-body">
<FormattedMessage
- defaultMessage={translate('groups.remove.confirmation')}
- id="groups.remove.confirmation"
+ defaultMessage={translate('quality_profiles.permissions.remove.group.confirmation')}
+ id="quality_profiles.permissions.remove.group.confirmation"
values={{
user: <strong>{this.props.group.name}</strong>
}}
@@ -113,7 +113,7 @@ export default class ProfilePermissionsGroup extends React.PureComponent<Props,
{this.state.deleteModal && (
<SimpleModal
- header={translate('group.remove')}
+ header={translate('quality_profiles.permissions.remove.group')}
onClose={this.handleDeleteModalClose}
onSubmit={this.handleDelete}>
{this.renderDeleteModal}
diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfilePermissionsUser.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfilePermissionsUser.tsx
index 2021ced88dd..899c3f906cf 100644
--- a/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfilePermissionsUser.tsx
+++ b/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfilePermissionsUser.tsx
@@ -73,13 +73,13 @@ export default class ProfilePermissionsUser extends React.PureComponent<Props, S
renderDeleteModal = (props: ChildrenProps) => (
<div>
<header className="modal-head">
- <h2>{translate('users.remove')}</h2>
+ <h2>{translate('quality_profiles.permissions.remove.user')}</h2>
</header>
<div className="modal-body">
<FormattedMessage
- defaultMessage={translate('users.remove.confirmation')}
- id="users.remove.confirmation"
+ defaultMessage={translate('quality_profiles.permissions.remove.user.confirmation')}
+ id="quality_profiles.permissions.remove.user.confirmation"
values={{
user: <strong>{this.props.user.name}</strong>
}}
@@ -116,7 +116,7 @@ export default class ProfilePermissionsUser extends React.PureComponent<Props, S
{this.state.deleteModal && (
<SimpleModal
- header={translate('users.remove')}
+ header={translate('quality_profiles.permissions.remove.user')}
onClose={this.handleDeleteModalClose}
onSubmit={this.handleDelete}>
{this.renderDeleteModal}