Skip to content

Commit 9201d5f

Browse files
nikospapcomwobsoriano
authored andcommitted
fix(clerk-js,types,localizations): Update <Checkout /> header to have x12 prefix when is annual (#5857)
1 parent abc4c82 commit 9201d5f

Some content is hidden

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

44 files changed

+55
-2
lines changed

.changeset/twenty-clouds-rest.md

Lines changed: 7 additions & 0 deletions

packages/clerk-js/src/ui/components/Checkout/CheckoutForm.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,15 @@ export const CheckoutForm = ({
4747
>
4848
<LineItems.Root>
4949
<LineItems.Group borderTop={showDowngradeInfo}>
50-
<LineItems.Title title={plan.name} />
50+
<LineItems.Title
51+
title={plan.name}
52+
description={planPeriod === 'annual' ? localizationKeys('commerce.billedAnnually') : undefined}
53+
/>
5154
{/* TODO(@Commerce): needs localization */}
5255
<LineItems.Description
56+
prefix={planPeriod === 'annual' ? 'x12' : undefined}
5357
text={`${plan.currencySymbol}${planPeriod === 'month' ? plan.amountFormatted : plan.annualMonthlyAmountFormatted}`}
54-
suffix={`per month${planPeriod === 'annual' ? ', times 12 months' : ''}`}
58+
suffix={localizationKeys('commerce.checkout.perMonth')}
5559
/>
5660
</LineItems.Group>
5761
<LineItems.Group

packages/clerk-js/src/ui/elements/LineItems.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,7 @@ function Description({ text, prefix, suffix, truncateText = false, copyText = fa
163163
sx={t => ({
164164
display: 'inline-flex',
165165
justifyContent: 'flex-end',
166+
alignItems: 'center',
166167
gap: t.space.$1,
167168
minWidth: '0',
168169
})}

packages/localizations/src/ar-SA.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ export const arSA: LocalizationResource = {
5151
title__subscriptionBegins: undefined,
5252
title__totalPaid: undefined,
5353
},
54+
perMonth: undefined,
5455
title__paymentSuccessful: undefined,
5556
title__subscriptionSuccessful: undefined,
5657
},

packages/localizations/src/be-BY.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ export const beBY: LocalizationResource = {
5151
title__subscriptionBegins: undefined,
5252
title__totalPaid: undefined,
5353
},
54+
perMonth: undefined,
5455
title__paymentSuccessful: undefined,
5556
title__subscriptionSuccessful: undefined,
5657
},

packages/localizations/src/bg-BG.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ export const bgBG: LocalizationResource = {
5151
title__subscriptionBegins: undefined,
5252
title__totalPaid: undefined,
5353
},
54+
perMonth: undefined,
5455
title__paymentSuccessful: undefined,
5556
title__subscriptionSuccessful: undefined,
5657
},

packages/localizations/src/ca-ES.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ export const caES: LocalizationResource = {
5151
title__subscriptionBegins: undefined,
5252
title__totalPaid: undefined,
5353
},
54+
perMonth: undefined,
5455
title__paymentSuccessful: undefined,
5556
title__subscriptionSuccessful: undefined,
5657
},

packages/localizations/src/cs-CZ.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ export const csCZ: LocalizationResource = {
5151
title__subscriptionBegins: undefined,
5252
title__totalPaid: undefined,
5353
},
54+
perMonth: undefined,
5455
title__paymentSuccessful: undefined,
5556
title__subscriptionSuccessful: undefined,
5657
},

packages/localizations/src/da-DK.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ export const daDK: LocalizationResource = {
5151
title__subscriptionBegins: undefined,
5252
title__totalPaid: undefined,
5353
},
54+
perMonth: undefined,
5455
title__paymentSuccessful: undefined,
5556
title__subscriptionSuccessful: undefined,
5657
},

packages/localizations/src/de-DE.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ export const deDE: LocalizationResource = {
5151
title__subscriptionBegins: undefined,
5252
title__totalPaid: undefined,
5353
},
54+
perMonth: undefined,
5455
title__paymentSuccessful: undefined,
5556
title__subscriptionSuccessful: undefined,
5657
},

0 commit comments

Comments
 (0)