From 647dc5fc2d359955ff7afdf2a14d6b51cb60c7f7 Mon Sep 17 00:00:00 2001 From: Konrad <11725227+mKoonrad@users.noreply.github.com> Date: Tue, 17 Mar 2026 02:05:27 +0100 Subject: [PATCH] fix(i18n): mark billing messages for translation (#2525) --- .../o.$orgUrl.settings.billing.tsx | 81 +++++++++++-------- 1 file changed, 48 insertions(+), 33 deletions(-) diff --git a/apps/remix/app/routes/_authenticated+/o.$orgUrl.settings.billing.tsx b/apps/remix/app/routes/_authenticated+/o.$orgUrl.settings.billing.tsx index d309cf166..b548ef777 100644 --- a/apps/remix/app/routes/_authenticated+/o.$orgUrl.settings.billing.tsx +++ b/apps/remix/app/routes/_authenticated+/o.$orgUrl.settings.billing.tsx @@ -3,7 +3,7 @@ import { Trans } from '@lingui/react/macro'; import { SubscriptionStatus } from '@prisma/client'; import { Loader } from 'lucide-react'; import type Stripe from 'stripe'; -import { match } from 'ts-pattern'; +import { P, match } from 'ts-pattern'; import { useCurrentOrganisation } from '@documenso/lib/client-only/providers/organisation'; import { canExecuteOrganisationAction } from '@documenso/lib/utils/organisations'; @@ -31,7 +31,7 @@ export default function TeamsSettingBillingPage() { if (isLoadingSubscription || !subscriptionQuery) { return (
- {currentProductName ? (
-
- You are currently subscribed to{' '}
- {currentProductName}
-
- ) : (
- You currently have an active plan
- )}
-
- {organisationSubscription.periodEnd && (
-
- {' '}
- which is set to{' '}
- {organisationSubscription.cancelAtPeriodEnd ? (
-
- end on{' '}
-
- {i18n.date(organisationSubscription.periodEnd)}.
-
-
+ {match(organisationSubscription)
+ .with(
+ { cancelAtPeriodEnd: true, periodEnd: P.nonNullable },
+ ({ periodEnd }) =>
+ currentProductName ? (
+