Use ICU number/plural formatting

This commit is contained in:
Jamie Kyle 2023-04-03 12:03:00 -07:00 committed by GitHub
parent aba8882d0a
commit da24cc5e95
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
30 changed files with 254 additions and 222 deletions

View file

@ -27,6 +27,17 @@ export type Props = {
| 'deleteConversation'
>;
const learnMoreLink = (parts: Array<JSX.Element | string>) => (
<a
href="https://support.signal.org/hc/articles/360007459591"
target="_blank"
rel="noreferrer"
className="module-message-request-actions__message__learn-more"
>
{parts}
</a>
);
export function MandatoryProfileSharingActions({
acceptConversation,
blockAndReportSpam,
@ -49,17 +60,6 @@ export function MandatoryProfileSharingActions({
</strong>
);
const learnMore = (
<a
href="https://support.signal.org/hc/articles/360007459591"
target="_blank"
rel="noreferrer"
className="module-message-request-actions__message__learn-more"
>
{i18n('icu:MessageRequests--learn-more')}
</a>
);
return (
<>
{mrState !== MessageRequestState.default ? (
@ -85,14 +85,14 @@ export function MandatoryProfileSharingActions({
{conversationType === 'direct' ? (
<Intl
i18n={i18n}
id="icu:MessageRequests--profile-sharing--direct"
components={{ firstName: firstNameContact, learnMore }}
id="icu:MessageRequests--profile-sharing--direct--link"
components={{ firstName: firstNameContact, learnMoreLink }}
/>
) : (
<Intl
i18n={i18n}
id="icu:MessageRequests--profile-sharing--group"
components={{ firstName: firstNameContact, learnMore }}
id="icu:MessageRequests--profile-sharing--group--link"
components={{ firstName: firstNameContact, learnMoreLink }}
/>
)}
</p>