Internationalize backup cost string

This commit is contained in:
trevor-signal
2025-09-29 15:15:52 -04:00
committed by GitHub
parent cb22552cad
commit d456077b26
2 changed files with 11 additions and 6 deletions

View File

@@ -7088,6 +7088,10 @@
"messageformat": "Your subscription was not found. Renew to continue using Signal Secure Backups.",
"description": "Description when a backup subscription used to exist but is not active"
},
"icu:Preferences--backup-subscription-monthly-cost": {
"messageformat": "{cost} / month",
"description": "Text displaying the cost per month of the backup plan. Cost is an internationalized string, e.g. '$2.99' or '2,99 €'"
},
"icu:Preferences--backup-messages-plan__description": {
"messageformat": "Text + {mediaDayCount, plural, one {# day} other {# days}} media backup",
"description": "Description of a backup plan that backups all of their messages (text) and recent ~45 days of media"

View File

@@ -325,12 +325,13 @@ function getSubscriptionDetails({
<>
{subscriptionStatus.cost ? (
<div className="Preferences--backups-summary__subscription-price">
{new Intl.NumberFormat(locale, {
style: 'currency',
currency: subscriptionStatus.cost.currencyCode,
currencyDisplay: 'narrowSymbol',
}).format(subscriptionStatus.cost.amount)}{' '}
/ month
{i18n('icu:Preferences--backup-subscription-monthly-cost', {
cost: new Intl.NumberFormat(locale, {
style: 'currency',
currency: subscriptionStatus.cost.currencyCode,
currencyDisplay: 'narrowSymbol',
}).format(subscriptionStatus.cost.amount),
})}
</div>
) : null}
{subscriptionStatus.renewalTimestamp ? (