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