Fix pluralization of a group notification
Co-authored-by: Fedor Indutny <79877362+indutny-signal@users.noreply.github.com>
This commit is contained in:
parent
842aa1560a
commit
d7dfb0739d
2 changed files with 10 additions and 10 deletions
|
@ -4445,10 +4445,14 @@
|
||||||
},
|
},
|
||||||
"icu:GroupV2--admin-approval-bounce--one": {
|
"icu:GroupV2--admin-approval-bounce--one": {
|
||||||
"messageformat": "{joinerName} requested and cancelled their request to join via the group link",
|
"messageformat": "{joinerName} requested and cancelled their request to join via the group link",
|
||||||
"description": "Shown in timeline or conversation preview when v2 group changes"
|
"description": "(Deleted 2024/08/20) Shown in timeline or conversation preview when v2 group changes"
|
||||||
},
|
},
|
||||||
"icu:GroupV2--admin-approval-bounce": {
|
"icu:GroupV2--admin-approval-bounce": {
|
||||||
"messageformat": "{joinerName} requested and cancelled {numberOfRequests, number} requests to join via the group link",
|
"messageformat": "{joinerName} requested and cancelled {numberOfRequests, number} requests to join via the group link",
|
||||||
|
"description": "(Deleted 2024/08/20) Shown in timeline or conversation preview when v2 group changes"
|
||||||
|
},
|
||||||
|
"icu:GroupV2--admin-approval-bounce--pluralized": {
|
||||||
|
"messageformat": "{joinerName} requested and cancelled {numberOfRequests, plural, one {their request} other {# requests}} to join via the group link",
|
||||||
"description": "Shown in timeline or conversation preview when v2 group changes"
|
"description": "Shown in timeline or conversation preview when v2 group changes"
|
||||||
},
|
},
|
||||||
"icu:GroupV2--group-link-add--disabled--you": {
|
"icu:GroupV2--group-link-add--disabled--you": {
|
||||||
|
|
|
@ -747,17 +747,13 @@ function renderChangeDetail<T extends string | JSX.Element>(
|
||||||
if (detail.type === 'admin-approval-bounce') {
|
if (detail.type === 'admin-approval-bounce') {
|
||||||
const { aci, times, isApprovalPending } = detail;
|
const { aci, times, isApprovalPending } = detail;
|
||||||
|
|
||||||
let firstMessage: T | string;
|
const firstMessage = i18n(
|
||||||
if (times === 1) {
|
'icu:GroupV2--admin-approval-bounce--pluralized',
|
||||||
firstMessage = i18n('icu:GroupV2--admin-approval-bounce--one', {
|
{
|
||||||
joinerName: renderContact(aci),
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
firstMessage = i18n('icu:GroupV2--admin-approval-bounce', {
|
|
||||||
joinerName: renderContact(aci),
|
joinerName: renderContact(aci),
|
||||||
numberOfRequests: times,
|
numberOfRequests: times,
|
||||||
});
|
}
|
||||||
}
|
);
|
||||||
|
|
||||||
if (!isApprovalPending) {
|
if (!isApprovalPending) {
|
||||||
return firstMessage;
|
return firstMessage;
|
||||||
|
|
Loading…
Reference in a new issue