Rallly is an open-source scheduling and collaboration tool designed to make organizing events and meetings easier.
TypeScript i18nextnext-authnextjspostgresqlprismareact-emailt3-stacktailwindcsstrpcturborepotypescriptzod
💄 Default paywall to yearly billing and clarify interval labels (#2982)
Luke Vella29ff11895a93
diff --git a/apps/web/public/locales/en/app.json b/apps/web/public/locales/en/app.jsonindex 3bcae6780..6e5d15363 100644--- a/apps/web/public/locales/en/app.json+++ b/apps/web/public/locales/en/app.json@@ -50,8 +50,6 @@"alreadyLoggedInDescription": "Continue to your dashboard or sign out to use a different account.","alreadyLoggedInTitle": "You're already signed in","alreadyMember": "This person is already a member of this space",- "annualDiscount": "Pay for {payMonths, number} months, get 12.",- "annualSavings": "Save {amount} with yearly billing","apiAccessUpgradeDescription": "Create API keys to manage your polls programmatically. Included with Pro, with a shared limit of {count} requests per minute across your space.","apiAccessUpgradeTitle": "Upgrade for API access","apiKeyCreated": "API key created",@@ -166,6 +164,7 @@"contactSupportEmail": "Or email us at <0>[email protected]</0>","content": "Content","continue": "Continue",+ "continueToCheckout": "Continue to checkout","continueWithEmail": "Continue with email","controlPanel": "Control Panel","copied": "Copied",@@ -563,6 +562,7 @@"pendingInvites": "Pending invites","pendingInvitesAlertDescription": "{count, plural, one {There is # pending invite} other {There are # pending invites}}","perSeatMonth": "/seat/mo",+ "perSeatMonthBilledYearly": "/seat/mo, billed yearly","planFree": "Free","planHobbyDescription": "For casual users","planProDescription": "For professionals and power users",@@ -790,7 +790,6 @@"upcomingEventsEmptyStateTitle": "No upcoming events","updateAvailable": "Update available","updateEventTypeError": "Failed to update event type",- "upgrade": "Upgrade","upgradePromptTitle": "Upgrade to Pro","upgradeToPro": "Upgrade to Pro","uploadImage": "Upload",@@ -825,6 +824,8 @@"whiteLabelAddonDescription": "This add-on allows you to brand Rallly with your own logo and colors.","wrongVerificationCode": "Your verification code is incorrect","yahoo": "Yahoo",+ "yearlyBilling": "Yearly billing",+ "yearlyBillingDescription": "{yearlyPrice} per year, save {savings}.","yes": "Yes","yesUpdateTimezone": "Yes, update my time zone","you": "You",diff --git a/apps/web/src/features/billing/components/pay-wall-dialog.tsx b/apps/web/src/features/billing/components/pay-wall-dialog.tsxindex 7333fe698..b95b14f00 100644--- a/apps/web/src/features/billing/components/pay-wall-dialog.tsx+++ b/apps/web/src/features/billing/components/pay-wall-dialog.tsx@@ -117,7 +117,7 @@ export function PayWallDialog({onOpenChange: (open: boolean) => void;}) {const [selectedPlan, setSelectedPlan] = React.useState<SpaceTier>("pro");- const [isAnnual, setIsAnnual] = React.useState(false);+ const [isAnnual, setIsAnnual] = React.useState(true);const trigger = usePayWallStore((state) => state.trigger);const handleChangePlan = (value: string) => {@@ -142,7 +142,7 @@ export function PayWallDialog({onOpenChange(open);if (!open) {setSelectedPlan("pro");- setIsAnnual(false);+ setIsAnnual(true);}}}>@@ -187,7 +187,14 @@ export function PayWallDialog({title={PLAN_NAMES.PRO}price={getProPrice()}priceLabel={- <Trans i18nKey="perSeatMonth" defaults="/seat/mo" />+ isAnnual ? (+ <Trans+ i18nKey="perSeatMonthBilledYearly"+ defaults="/seat/mo, billed yearly"+ />+ ) : (+ <Trans i18nKey="perSeatMonth" defaults="/seat/mo" />+ )}/></RadioGroup>@@ -204,10 +211,19 @@ export function PayWallDialog({<div className="flex-1"><div className="text-sm"><Trans- defaults="Save {amount} with yearly billing"- i18nKey="annualSavings"+ i18nKey="yearlyBilling"+ defaults="Yearly billing"+ />+ </div>+ <div className="mt-1 text-muted-foreground text-sm">+ <Trans+ defaults="{yearlyPrice} per year, save {savings}."+ i18nKey="yearlyBillingDescription"values={{- amount: currencyFormatter.format(+ yearlyPrice: currencyFormatter.format(+ pricingData.yearly.amount / 100,+ ),+ savings: currencyFormatter.format((pricingData.monthly.amount * 12 -pricingData.yearly.amount) /100,@@ -215,23 +231,12 @@ export function PayWallDialog({}}/></div>- <div className="text-muted-foreground text-sm">- <Trans- defaults="Pay for {payMonths, number} months, get 12."- i18nKey="annualDiscount"- values={{- payMonths: 8,- }}- />- </div>- </div>- <div className="mt-1">- <Switch- checked={isAnnual}- onCheckedChange={setIsAnnual}- id="annual-switch"- /></div>+ <Switch+ checked={isAnnual}+ onCheckedChange={setIsAnnual}+ id="annual-switch"+ /></label>)}{selectedPlan === "pro" ? (@@ -250,7 +255,10 @@ export function PayWallDialog({});}}>- <Trans i18nKey="upgrade" defaults="Upgrade" />+ <Trans+ i18nKey="continueToCheckout"+ defaults="Continue to checkout"+ /></UpgradeButton></TabsContent>) : (