Commit fb3f827d authored by Mark Florian's avatar Mark Florian

Merge branch...

Merge branch '325797-follow-up-update-the-nmembers-translation-string-in-the-approval-modal' into 'master'

Follow-up: Update the nMembers translation string in the approval modal

See merge request gitlab-org/gitlab!60108
parents f7edac3f b6ff25c2
......@@ -10,9 +10,12 @@ const i18n = {
regularRule: {
primaryButtonText: __('Remove approvers'),
modalTitle: __('Remove approvers?'),
removeWarningText: s__(
'ApprovalRuleRemove|You are about to remove the %{name} approver group which has %{nMembers}.',
),
removeWarningText: (i) =>
n__(
'ApprovalRuleRemove|You are about to remove the %{name} approver group which has %{strongStart}%{count} member%{strongEnd}. Approvals from this member are not revoked.',
'ApprovalRuleRemove|You are about to remove the %{name} approver group which has %{strongStart}%{count} members%{strongEnd}. Approvals from these members are not revoked.',
i,
),
},
externalRule: {
primaryButtonText: s__('ApprovalRuleRemove|Remove approval gate'),
......@@ -41,6 +44,9 @@ export default {
isExternalApprovalRule() {
return this.rule?.ruleType === RULE_TYPE_EXTERNAL_APPROVAL;
},
approversCount() {
return this.rule.approvers.length;
},
membersText() {
return n__(
'ApprovalRuleRemove|%d member',
......@@ -48,13 +54,6 @@ export default {
this.rule.approvers.length,
);
},
revokeWarningText() {
return n__(
'ApprovalRuleRemove|Approvals from this member are not revoked.',
'ApprovalRuleRemove|Approvals from these members are not revoked.',
this.rule.approvers.length,
);
},
modalTitle() {
return this.isExternalApprovalRule
? i18n.externalRule.modalTitle
......@@ -63,7 +62,7 @@ export default {
modalText() {
return this.isExternalApprovalRule
? i18n.externalRule.removeWarningText
: `${i18n.regularRule.removeWarningText} ${this.revokeWarningText}`;
: i18n.regularRule.removeWarningText(this.approversCount);
},
primaryButtonProps() {
const text = this.isExternalApprovalRule
......@@ -106,8 +105,12 @@ export default {
<template #name>
<strong>{{ rule.name }}</strong>
</template>
<template #nMembers>
<strong>{{ membersText }}</strong>
<template #strong="{ content }">
<strong>
<gl-sprintf :message="content">
<template #count>{{ approversCount }}</template>
</gl-sprintf>
</strong>
</template>
</gl-sprintf>
</p>
......
---
title: Improve approvals modal translation strings
merge_request: 60108
author:
type: changed
......@@ -4047,11 +4047,6 @@ msgid_plural "ApprovalRuleRemove|%d members"
msgstr[0] ""
msgstr[1] ""
msgid "ApprovalRuleRemove|Approvals from this member are not revoked."
msgid_plural "ApprovalRuleRemove|Approvals from these members are not revoked."
msgstr[0] ""
msgstr[1] ""
msgid "ApprovalRuleRemove|Remove approval gate"
msgstr ""
......@@ -4061,8 +4056,10 @@ msgstr ""
msgid "ApprovalRuleRemove|You are about to remove the %{name} approval gate. Approval from this service is not revoked."
msgstr ""
msgid "ApprovalRuleRemove|You are about to remove the %{name} approver group which has %{nMembers}."
msgstr ""
msgid "ApprovalRuleRemove|You are about to remove the %{name} approver group which has %{strongStart}%{count} member%{strongEnd}. Approvals from this member are not revoked."
msgid_plural "ApprovalRuleRemove|You are about to remove the %{name} approver group which has %{strongStart}%{count} members%{strongEnd}. Approvals from these members are not revoked."
msgstr[0] ""
msgstr[1] ""
msgid "ApprovalRuleSummary|%d member"
msgid_plural "ApprovalRuleSummary|%d members"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment