From ce8a1f59305190ff16bcbdcb26b0e307e41ec9d0 Mon Sep 17 00:00:00 2001 From: Alvaro <110414366+alvaro-signal@users.noreply.github.com> Date: Mon, 23 Jan 2023 13:42:40 -0700 Subject: [PATCH] Don't use the term gift --- _locales/en/messages.json | 114 +++++++++++++++--- ts/components/OutgoingGiftBadgeModal.tsx | 8 +- ts/components/ToastManager.tsx | 4 +- ts/components/conversation/Message.tsx | 28 ++--- ts/components/conversation/Quote.tsx | 2 +- ts/models/messages.ts | 16 ++- .../state/ducks/conversations_test.ts | 4 +- 7 files changed, 130 insertions(+), 46 deletions(-) diff --git a/_locales/en/messages.json b/_locales/en/messages.json index ef3e4ad7245d..0f5fa2c2ae39 100644 --- a/_locales/en/messages.json +++ b/_locales/en/messages.json @@ -2283,83 +2283,159 @@ }, "giftBadge--missing": { "message": "Unable to fetch gift badge details", - "description": "Aria label for gift badge when we can't fetch the details" + "description": "(deleted 2023/01/20) Aria label for gift badge when we can't fetch the details" + }, + "icu:donation--missing": { + "messageformat": "Unable to fetch donation details", + "description": "Aria label for donation when we can't fetch the details." }, "message--giftBadge--unopened--incoming": { "message": "View this message on mobile to open it", - "description": "Shown in a message's bubble when you've received a gift badge from a contact" + "description": "(deleted 2023/01/20) Shown in a message's bubble when you've received a gift badge from a contact" + }, + "icu:message--donation--unopened--incoming": { + "messageformat": "View this message on mobile to open it", + "description": "Shown in a message's bubble when you've received a donation badge from a contact" }, "message--giftBadge--unopened--outgoing": { "message": "Tap this message on mobile to view your gift", - "description": "Shown in a message's bubble when you've sent a gift badge to a contact" + "description": "(deleted 2023/01/20) Shown in a message's bubble when you've sent a gift badge to a contact" + }, + "icu:message--donation--unopened--outgoing": { + "messageformat": "Tap this message on mobile to view your donation", + "description": "Shown in a message's bubble when you've sent a donation badge to a contact." }, "message--giftBadge--unopened--label": { "message": "Gift", - "description": "Shown in a message's bubble when you've received a gift badge from a contact" + "description": "(deleted 2023/01/20) Shown in a message's bubble when you've received a gift badge from a contact" + }, + "icu:message--donation--unopened--label": { + "messageformat": "{sender} donated to Signal on your behalf", + "description": "Shown in a message's bubble when you've received a donation badge from a contact." }, "message--giftBadge--unopened--toast--incoming": { "message": "Check your phone to open gift", - "description": "Shown when you've clicked on an incoming gift badge you haven't yet redeemed" + "description": "(deleted 2023/01/20) Shown when you've clicked on an incoming gift badge you haven't yet redeemed" + }, + "icu:message--donation--unopened--toast--incoming": { + "messageformat": "Check your phone to open this donation", + "description": "Shown when you've clicked on an incoming donation you haven't yet redeemed." }, "message--giftBadge--unopened--toast--outgoing": { "message": "Check your phone to view your gift", - "description": "Shown when you've clicked on an outgoing gift badge" + "description": "(deleted 2023/01/20) Shown when you've clicked on an outgoing gift badge" + }, + "icu:message--donation--unopened--toast--outgoing": { + "messageformat": "Check your phone to view your donation", + "description": "Shown when you've clicked on an outgoing donation badge." }, "message--giftBadge--preview--unopened": { "message": "You received a gift", - "description": "Shown to label the gift badge in notifications and the left pane" + "description": "(deleted 2023/01/20) Shown to label the gift badge in notifications and the left pane" + }, + "icu:message--donation--preview--unopened": { + "messageformat": "{sender} donated for you", + "description": "Shown to label the donation badge in notifications and the left pane." }, "message--giftBadge--preview--redeemed": { "message": "You redeemed a gift badge", - "description": "Shown to label the redeemed gift badge in notifications and the left pane" + "description": "(deleted 2023/01/20) Shown to label the redeemed gift badge in notifications and the left pane" + }, + "icu:message--donation--preview--redeemed": { + "messageformat": "You redeemed a donation", + "description": "Shown to label the redeemed donation badge in notifications and the left pane." }, "message--giftBadge--preview--sent": { "message": "You sent a gift badge", - "description": "Shown to label a gift badge you've sent in notifications and the left pane" + "description": "(deleted 2023/01/20) Shown to label a gift badge you've sent in notifications and the left pane" + }, + "icu:message--donation--preview--sent": { + "messageformat": "You donated for {recipient}", + "description": "Shown to label a donation badge you've sent in notifications and the left pane" }, "message--giftBadge": { "message": "Gift Badge", - "description": "Shown to label the gift badge you've redeemed on another device" + "description": "(deleted 2023/01/20) Shown to label the gift badge you've redeemed on another device" + }, + "icu:message--donation": { + "messageformat": "Donation", + "description": "Shown to label the donation badge you've redeemed on another device." }, "quote--giftBadge": { "message": "Gift", - "description": "Shown to label a gift badge you've replied to" + "description": "(deleted 2023/01/20) Shown to label a gift badge you've replied to" + }, + "icu:quote--donation": { + "messageformat": "Donation", + "description": "Shown to label a donation badge you've replied to." }, "message--giftBadge--remaining--days": { "message": "$days$ days remaining", - "description": "Describes how long remains for the gift badge you've redeemed on another device (only rendered for days > 1)" + "description": "(deleted 2023/01/20) Describes how long remains for the donation badge you've redeemed on another device (only rendered for days > 1)" + }, + "icu:message--donation--remaining--days": { + "messageformat": "{days} days remaining", + "description": "Describes how long remains for the donation badge you've redeemed on another device (only rendered for days > 1)." }, "message--giftBadge--remaining--hours": { "message": "$hours$ hours remaining", - "description": "Describes how long remains for the gift badge you've redeemed on another device (only rendered for hours > 1)" + "description": "(deleted 2023/01/20) Describes how long remains for the donation badge you've redeemed on another device (only rendered for hours > 1)" + }, + "icu:message--donation--remaining--hours": { + "messageformat": "{hours} hours remaining", + "description": "Describes how long remains for the donation badge you've redeemed on another device (only rendered for hours > 1)" }, "message--giftBadge--remaining--minutes": { "message": "$minutes$ minutes remaining", - "description": "Describes how long remains for the gift badge you've redeemed on another device (only rendered for minutes > 1)" + "description": "(deleted 2023/01/20) Describes how long remains for the donation badge you've redeemed on another device (only rendered for minutes > 1)" + }, + "icu:message--donation--remaining--minutes": { + "messageformat": "{minutes, plural, one {1 minute} other {# minutes}} remaining", + "description": "(deleted 2023/01/20) Describes how long remains for the donation badge you've redeemed on another device." }, "message--giftBadge--remaining--one-minute": { "message": "1 minute remaining", - "description": "Describes how long remains for the gift badge you've redeemed on another device" + "description": "(deleted 2023/01/20) Describes how long remains for the donation badge you've redeemed on another device" }, "message--giftBadge--expired": { "message": "Expired", - "description": "Shows that a gift badge is expired" + "description": "(deleted 2023/01/20) Shows that a gift badge is expired" + }, + "icu:message--donation--expired": { + "messageformat": "Expired", + "description": "Shows that a donation badge is expired" }, "message--giftBadge--view": { "message": "View", "description": "Shown when you've sent a gift badge to someone then opened it" }, + "icu:message--donation--view": { + "messageformat": "View", + "description": "Shown when you've sent a donation badge to someone then opened it" + }, "message--giftBadge--redeemed": { "message": "Redeemed", - "description": "Shown when you've redeemed the gift badge on another device" + "description": "(deleted 2023/01/20) Shown when you've redeemed the gift badge on another device" + }, + "icu:message--donation--redeemed": { + "messageformat": "Redeemed", + "description": "Shown when you've redeemed the donation badge on another device" }, "modal--giftBadge--title": { "message": "Thanks for your support!", - "description": "The title of the outgoing gift badge detail dialog" + "description": "(deleted 2023/01/20) The title of the outgoing gift badge detail dialog" + }, + "icu:modal--donation--title": { + "messageformat": "Thanks for your support!", + "description": "The title of the outgoing donation badge detail dialog" }, "modal--giftBadge--description": { "message": "You've gifted a badge to $name$. When they accept, they'll be given a choice to show or hide their badge.", - "description": "The description of the outgoing gift badge detail dialog" + "description": "(deleted 2023/01/20) The description of the outgoing gift badge detail dialog" + }, + "icu:modal--donation--description": { + "messageformat": "You've made a donation to Signal on behalf of {name}. They'll be given the option to show their support on their profile.", + "description": "The description of the outgoing donation badge detail dialog" }, "stickers--toast--InstallFailed": { "message": "Sticker pack could not be installed", diff --git a/ts/components/OutgoingGiftBadgeModal.tsx b/ts/components/OutgoingGiftBadgeModal.tsx index f2d7ba5c6264..4b802b856136 100644 --- a/ts/components/OutgoingGiftBadgeModal.tsx +++ b/ts/components/OutgoingGiftBadgeModal.tsx @@ -48,7 +48,7 @@ export function OutgoingGiftBadgeModal({ `${CLASS_NAME}__badge`, `${CLASS_NAME}__badge--missing` )} - aria-label={i18n('giftBadge--missing')} + aria-label={i18n('icu:donation--missing')} /> ); @@ -63,14 +63,14 @@ export function OutgoingGiftBadgeModal({ >