Skip to content

Commit fd7b824

Browse files
authored
feat(localizations,ui): Render monetary amounts according to locale (#8918)
1 parent 59f7327 commit fd7b824

43 files changed

Lines changed: 314 additions & 166 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.changeset/fair-currency-hugs.md‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
'@clerk/localizations': minor
3+
'@clerk/ui': minor
4+
---
5+
6+
Monetary amounts are now formatted using your application's locale. For example, with the locale set to `fr-FR`, a USD 1000 amount now renders as `1 000,00 $US`; previously, it rendered as `$1,000.00` regardless of your application's configured locale.

‎packages/localizations/src/bn-IN.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,9 +209,9 @@ export const bnIN: LocalizationResource = {
209209
subtotalRenewal: undefined,
210210
switchPlan: 'এই প্ল্যানে পরিবর্তন করুন',
211211
switchToAnnual: 'বার্ষিকে স্যুইচ করুন',
212-
switchToAnnualWithAnnualPrice: 'বার্ষিকে স্যুইচ করুন {{currency}}{{price}} / বছর',
212+
switchToAnnualWithAnnualPrice: 'বার্ষিকে স্যুইচ করুন {{price}} / বছর',
213213
switchToMonthly: 'মাসিকে স্যুইচ করুন',
214-
switchToMonthlyWithPrice: 'মাসিকে স্যুইচ করুন {{currency}}{{price}} / মাস',
214+
switchToMonthlyWithPrice: 'মাসিকে স্যুইচ করুন {{price}} / মাস',
215215
totalDue: 'মোট বকেয়া',
216216
totalDuePerPeriod: undefined,
217217
totalDueToday: 'আজকের মোট বকেয়া',

‎packages/localizations/src/ca-ES.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -210,9 +210,9 @@ export const caES: LocalizationResource = {
210210
subtotalRenewal: undefined,
211211
switchPlan: 'Canviar a aquest pla',
212212
switchToAnnual: 'Canviar a anual',
213-
switchToAnnualWithAnnualPrice: 'Canviar a anual {{currency}}{{price}} / any',
213+
switchToAnnualWithAnnualPrice: 'Canviar a anual {{price}} / any',
214214
switchToMonthly: 'Canviar a mensual',
215-
switchToMonthlyWithPrice: 'Canviar a mensual {{currency}}{{price}} / mes',
215+
switchToMonthlyWithPrice: 'Canviar a mensual {{price}} / mes',
216216
totalDue: 'Total a pagar',
217217
totalDuePerPeriod: undefined,
218218
totalDueToday: 'Total a pagar avui',

‎packages/localizations/src/cs-CZ.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -207,9 +207,9 @@ export const csCZ: LocalizationResource = {
207207
subtotalRenewal: undefined,
208208
switchPlan: 'Přepnout na tento plán',
209209
switchToAnnual: 'Přepnout na roční',
210-
switchToAnnualWithAnnualPrice: 'Přepnout na roční {{currency}}{{price}} / rok',
210+
switchToAnnualWithAnnualPrice: 'Přepnout na roční {{price}} / rok',
211211
switchToMonthly: 'Přepnout na měsíční',
212-
switchToMonthlyWithPrice: 'Přepnout na měsíční {{currency}}{{price}} / měsíc',
212+
switchToMonthlyWithPrice: 'Přepnout na měsíční {{price}} / měsíc',
213213
totalDue: 'Celkem k zaplacení',
214214
totalDuePerPeriod: undefined,
215215
totalDueToday: 'Celkem k zaplacení dnes',

‎packages/localizations/src/de-DE.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,9 +209,9 @@ export const deDE: LocalizationResource = {
209209
subtotalRenewal: undefined,
210210
switchPlan: 'Zu diesem Plan wechseln',
211211
switchToAnnual: 'Wechsel zu jährlich',
212-
switchToAnnualWithAnnualPrice: 'Auf jährlich wechseln {{currency}}{{price}} / Jahr',
212+
switchToAnnualWithAnnualPrice: 'Auf jährlich wechseln {{price}} / Jahr',
213213
switchToMonthly: 'Wechsel zu monatlich',
214-
switchToMonthlyWithPrice: 'Auf monatlich wechseln {{currency}}{{price}} / Monat',
214+
switchToMonthlyWithPrice: 'Auf monatlich wechseln {{price}} / Monat',
215215
totalDue: 'Gesamtbetrag',
216216
totalDuePerPeriod: undefined,
217217
totalDueToday: 'Heute fällig',

‎packages/localizations/src/en-US.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -198,9 +198,9 @@ export const enUS: LocalizationResource = {
198198
subtotalRenewal: 'Subtotal per period',
199199
switchPlan: 'Switch to this plan',
200200
switchToAnnual: 'Switch to annual',
201-
switchToAnnualWithAnnualPrice: 'Switch to annual {{currency}}{{price}} / year',
201+
switchToAnnualWithAnnualPrice: 'Switch to annual {{price}} / year',
202202
switchToMonthly: 'Switch to monthly',
203-
switchToMonthlyWithPrice: 'Switch to monthly {{currency}}{{price}} / month',
203+
switchToMonthlyWithPrice: 'Switch to monthly {{price}} / month',
204204
totalDue: 'Total due',
205205
totalDuePerPeriod: 'Total per period',
206206
totalDueToday: 'Total due today',

‎packages/localizations/src/es-ES.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,9 +209,9 @@ export const esES: LocalizationResource = {
209209
subtotalRenewal: undefined,
210210
switchPlan: 'Cambiar a este plan',
211211
switchToAnnual: 'Cambiar a anual',
212-
switchToAnnualWithAnnualPrice: 'Cambiar a anual {{currency}}{{price}} / año',
212+
switchToAnnualWithAnnualPrice: 'Cambiar a anual {{price}} / año',
213213
switchToMonthly: 'Cambiar a mensual',
214-
switchToMonthlyWithPrice: 'Cambiar a mensual {{currency}}{{price}} / mes',
214+
switchToMonthlyWithPrice: 'Cambiar a mensual {{price}} / mes',
215215
totalDue: 'Total a pagar',
216216
totalDuePerPeriod: undefined,
217217
totalDueToday: 'Total a pagar hoy',

‎packages/localizations/src/fa-IR.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -208,9 +208,9 @@ export const faIR: LocalizationResource = {
208208
subtotalRenewal: undefined,
209209
switchPlan: 'به این طرح تغییر دهید',
210210
switchToAnnual: 'به سالانه تغییر دهید',
211-
switchToAnnualWithAnnualPrice: 'تغییر به سالانه {{currency}}{{price}} / سال',
211+
switchToAnnualWithAnnualPrice: 'تغییر به سالانه {{price}} / سال',
212212
switchToMonthly: 'به ماهانه تغییر دهید',
213-
switchToMonthlyWithPrice: 'تغییر به ماهانه {{currency}}{{price}} / ماه',
213+
switchToMonthlyWithPrice: 'تغییر به ماهانه {{price}} / ماه',
214214
totalDue: 'کل مبلغ سررسید',
215215
totalDuePerPeriod: undefined,
216216
totalDueToday: 'سررسید کل امروز',

‎packages/localizations/src/fr-FR.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -211,9 +211,9 @@ export const frFR: LocalizationResource = {
211211
subtotalRenewal: undefined,
212212
switchPlan: 'Changer de plan',
213213
switchToAnnual: "Passer à l'annuel",
214-
switchToAnnualWithAnnualPrice: 'Passer à l’annuel {{currency}}{{price}} / an',
214+
switchToAnnualWithAnnualPrice: 'Passer à l’annuel {{price}} / an',
215215
switchToMonthly: 'Passer au mensuel',
216-
switchToMonthlyWithPrice: 'Passer au mensuel {{currency}}{{price}} / mois',
216+
switchToMonthlyWithPrice: 'Passer au mensuel {{price}} / mois',
217217
totalDue: 'Total dû',
218218
totalDuePerPeriod: undefined,
219219
totalDueToday: "Total dû aujourd'hui",

‎packages/localizations/src/hi-IN.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,9 +209,9 @@ export const hiIN: LocalizationResource = {
209209
subtotalRenewal: undefined,
210210
switchPlan: 'इस योजना पर स्विच करें',
211211
switchToAnnual: 'वार्षिक पर स्विच करें',
212-
switchToAnnualWithAnnualPrice: 'वार्षिक पर स्विच करें {{currency}}{{price}} / वर्ष',
212+
switchToAnnualWithAnnualPrice: 'वार्षिक पर स्विच करें {{price}} / वर्ष',
213213
switchToMonthly: 'मासिक पर स्विच करें',
214-
switchToMonthlyWithPrice: 'मासिक पर स्विच करें {{currency}}{{price}} / माह',
214+
switchToMonthlyWithPrice: 'मासिक पर स्विच करें {{price}} / माह',
215215
totalDue: 'कुल देय',
216216
totalDuePerPeriod: undefined,
217217
totalDueToday: 'आज का कुल देय',

0 commit comments

Comments
 (0)