Skip to content

Commit d456077

Browse files
Internationalize backup cost string
1 parent cb22552 commit d456077

File tree

2 files changed

+11
-6
lines changed

2 files changed

+11
-6
lines changed

_locales/en/messages.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7088,6 +7088,10 @@
70887088
"messageformat": "Your subscription was not found. Renew to continue using Signal Secure Backups.",
70897089
"description": "Description when a backup subscription used to exist but is not active"
70907090
},
7091+
"icu:Preferences--backup-subscription-monthly-cost": {
7092+
"messageformat": "{cost} / month",
7093+
"description": "Text displaying the cost per month of the backup plan. Cost is an internationalized string, e.g. '$2.99' or '2,99 €'"
7094+
},
70917095
"icu:Preferences--backup-messages-plan__description": {
70927096
"messageformat": "Text + {mediaDayCount, plural, one {# day} other {# days}} media backup",
70937097
"description": "Description of a backup plan that backups all of their messages (text) and recent ~45 days of media"

ts/components/PreferencesBackups.tsx

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -325,12 +325,13 @@ function getSubscriptionDetails({
325325
<>
326326
{subscriptionStatus.cost ? (
327327
<div className="Preferences--backups-summary__subscription-price">
328-
{new Intl.NumberFormat(locale, {
329-
style: 'currency',
330-
currency: subscriptionStatus.cost.currencyCode,
331-
currencyDisplay: 'narrowSymbol',
332-
}).format(subscriptionStatus.cost.amount)}{' '}
333-
/ month
328+
{i18n('icu:Preferences--backup-subscription-monthly-cost', {
329+
cost: new Intl.NumberFormat(locale, {
330+
style: 'currency',
331+
currency: subscriptionStatus.cost.currencyCode,
332+
currencyDisplay: 'narrowSymbol',
333+
}).format(subscriptionStatus.cost.amount),
334+
})}
334335
</div>
335336
) : null}
336337
{subscriptionStatus.renewalTimestamp ? (

0 commit comments

Comments
 (0)