Skip to content

Commit 59c9040

Browse files
committed
fix(clerk-js,types,localizations): Adjust invalid plan change alert wording
1 parent de9c01a commit 59c9040

File tree

4 files changed

+12
-1
lines changed

4 files changed

+12
-1
lines changed

.changeset/orange-doors-notice.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@clerk/localizations': patch
3+
'@clerk/clerk-js': patch
4+
'@clerk/types': patch
5+
---

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,11 @@ export const InvalidPlanScreen = () => {
8282
<Alert
8383
variant='info'
8484
colorScheme='info'
85-
title={localizationKeys('commerce.cannotSubscribeMonthly')}
85+
title={
86+
planFromError.annual_monthly_amount_formatted !== '0'
87+
? localizationKeys('commerce.cannotSubscribeMonthly')
88+
: localizationKeys('commerce.cannotSubscribeMonthlyNoAnnual')
89+
}
8690
/>
8791
</Box>
8892
</Flex>

packages/localizations/src/en-US.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ export const enUS: LocalizationResource = {
6767
cancelSubscriptionTitle: 'Cancel {{plan}} Subscription?',
6868
cannotSubscribeMonthly:
6969
'You cannot subscribe to this plan by paying monthly. To subscribe to this plan, you need to choose to pay annually.',
70+
cannotSubscribeMonthlyNoAnnual: 'You cannot subscribe to this plan with an existing annual subscription.',
7071
checkout: {
7172
description__paymentSuccessful: 'Your payment was successful.',
7273
description__subscriptionSuccessful: 'Your new subscription is all set.',

packages/types/src/localization.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,7 @@ export type __internal_LocalizationResource = {
199199
monthly: LocalizationValue;
200200
annually: LocalizationValue;
201201
cannotSubscribeMonthly: LocalizationValue;
202+
cannotSubscribeMonthlyNoAnnual: LocalizationValue;
202203
pricingTable: {
203204
billingCycle: LocalizationValue;
204205
included: LocalizationValue;

0 commit comments

Comments
 (0)