Skip to content

Commit 4db4857

Browse files
chore(i18n): update translations
1 parent 9b3a173 commit 4db4857

42 files changed

Lines changed: 8203 additions & 115 deletions

Some content is hidden

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

clients/apps/web/src/app/(main)/[organization]/portal/Navigation.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'use client'
22

3-
import { usePortalTranslations } from '@/components/CustomerPortal/PortalLocaleProvider'
3+
import { useTranslations } from '@/components/CustomerPortal/PortalLocaleProvider'
44
import { usePortalAuthenticatedUser } from '@/hooks/queries/customerPortal'
55
import { createClientSideAPI } from '@/utils/client'
66
import { hasBillingPermission } from '@/utils/customerPortal'
@@ -73,7 +73,7 @@ const NavigationContent = ({
7373
searchParams: URLSearchParams
7474
}) => {
7575
const router = useRouter()
76-
const t = usePortalTranslations()
76+
const t = useTranslations()
7777
const { data: authenticatedUser } = usePortalAuthenticatedUser(api)
7878

7979
const buildPath = (path: string) => {

clients/apps/web/src/components/CustomerPortal/ChangeEmailForm.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'use client'
22

3-
import { usePortalTranslations } from '@/components/CustomerPortal/PortalLocaleProvider'
3+
import { useTranslations } from '@/components/CustomerPortal/PortalLocaleProvider'
44
import { useCustomerEmailUpdateRequest } from '@/hooks/queries/customerPortal'
55
import { setValidationErrors } from '@/utils/api/errors'
66
import type { schemas } from '@polar-sh/client'
@@ -14,7 +14,7 @@ interface ChangeEmailFormProps {
1414
}
1515

1616
const ChangeEmailForm = ({ customer }: ChangeEmailFormProps) => {
17-
const t = usePortalTranslations()
17+
const t = useTranslations()
1818
const [isEditing, setIsEditing] = useState(false)
1919
const [successEmail, setSuccessEmail] = useState<string | null>(null)
2020
const emailUpdateRequest = useCustomerEmailUpdateRequest()

clients/apps/web/src/components/CustomerPortal/CurrentPeriodOverview.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { formatCurrency } from '@polar-sh/currency'
44
import { useMemo } from 'react'
55
import ProductPriceLabel from '../Products/ProductPriceLabel'
66
import { OverviewSummaryCard } from './OverviewSummaryCard'
7-
import { usePortalTranslations } from './PortalLocaleProvider'
7+
import { useTranslations } from './PortalLocaleProvider'
88

99
interface CurrentPeriodOverviewProps {
1010
subscription: schemas['CustomerSubscription']
@@ -17,7 +17,7 @@ export const CurrentPeriodOverview = ({
1717
products,
1818
api,
1919
}: CurrentPeriodOverviewProps) => {
20-
const t = usePortalTranslations()
20+
const t = useTranslations()
2121
const { data: subscriptionPreview } = useCustomerSubscriptionChargePreview(
2222
api,
2323
subscription.id,

clients/apps/web/src/components/CustomerPortal/CustomerCancellationModal.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import {
2222
import { useRouter } from 'next/navigation'
2323
import { useCallback } from 'react'
2424
import { useForm } from 'react-hook-form'
25-
import { usePortalTranslations } from './PortalLocaleProvider'
25+
import { useTranslations } from './PortalLocaleProvider'
2626
import { toast } from '../Toast/use-toast'
2727

2828
const CancellationReasonRadio = ({
@@ -58,7 +58,7 @@ const CustomerCancellationModal = ({
5858
...props
5959
}: CustomerCancellationModalProps) => {
6060
const router = useRouter()
61-
const t = usePortalTranslations()
61+
const t = useTranslations()
6262

6363
const handleCancel = useCallback(() => {
6464
onAbort?.()
@@ -113,7 +113,9 @@ const CustomerCancellationModal = ({
113113
modalContent={
114114
<div className="flex flex-col gap-y-6 p-6 sm:p-12">
115115
<div className="flex flex-col gap-y-2">
116-
<h3 className="text-2xl">{t('portal.subscription.cancel.heading')}</h3>
116+
<h3 className="text-2xl">
117+
{t('portal.subscription.cancel.heading')}
118+
</h3>
117119
<p className="dark:text-polar-500 leading-relaxed text-balance text-gray-500">
118120
{t('portal.subscription.cancel.description')}
119121
</p>

clients/apps/web/src/components/CustomerPortal/CustomerChangePlanModal.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import { useRouter } from 'next/navigation'
1515
import { useCallback, useMemo, useState } from 'react'
1616
import { resolveBenefitIcon } from '../Benefit/utils'
1717
import ProductPriceLabel from '../Products/ProductPriceLabel'
18-
import { usePortalTranslations } from './PortalLocaleProvider'
18+
import { useTranslations } from './PortalLocaleProvider'
1919
import { toast } from '../Toast/use-toast'
2020

2121
const ProductPriceListItem = ({
@@ -60,7 +60,7 @@ const CustomerChangePlanModal = ({
6060
) => void
6161
}) => {
6262
const router = useRouter()
63-
const t = usePortalTranslations()
63+
const t = useTranslations()
6464
const products = useMemo(
6565
() =>
6666
_products.filter((p) => p.is_recurring && !hasLegacyRecurringPrices(p)),
@@ -238,7 +238,9 @@ const CustomerChangePlanModal = ({
238238
if (data) {
239239
toast({
240240
title: t('portal.subscription.changePlan.update.successTitle'),
241-
description: t('portal.subscription.changePlan.update.successDescription'),
241+
description: t(
242+
'portal.subscription.changePlan.update.successDescription',
243+
),
242244
})
243245
onUserSubscriptionUpdate(data)
244246
router.refresh()

clients/apps/web/src/components/CustomerPortal/CustomerPortalGrantsComplex.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import { useCustomerBenefitGrants } from '@/hooks/queries/customerPortal'
44
import { Client } from '@polar-sh/client'
5-
import { usePortalTranslations } from '@/components/CustomerPortal/PortalLocaleProvider'
5+
import { useTranslations } from '@/components/CustomerPortal/PortalLocaleProvider'
66
import { Input } from '@polar-sh/orbit'
77
import { List, ListItem } from '@polar-sh/ui/components/atoms/List'
88
import { Loader2, Search } from 'lucide-react'
@@ -21,7 +21,7 @@ export const CustomerPortalGrantsComplex = ({
2121
subscriptionId,
2222
orderId,
2323
}: CustomerPortalGrantsComplexProps) => {
24-
const t = usePortalTranslations()
24+
const t = useTranslations()
2525
const [searchQuery, setSearchQuery] = useState('')
2626
const [currentPage, setCurrentPage] = useState(1)
2727
const pageSize = 10

clients/apps/web/src/components/CustomerPortal/CustomerPortalGrantsSimple.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import { Client, schemas } from '@polar-sh/client'
44
import { List, ListItem } from '@polar-sh/ui/components/atoms/List'
55
import { BenefitGrant } from '../Benefit/BenefitGrant'
6-
import { usePortalTranslations } from '@/components/CustomerPortal/PortalLocaleProvider'
6+
import { useTranslations } from '@/components/CustomerPortal/PortalLocaleProvider'
77

88
export interface CustomerPortalGrantsSimpleProps {
99
organization?: schemas['CustomerOrganization']
@@ -15,7 +15,7 @@ export const CustomerPortalGrantsSimple = ({
1515
api,
1616
benefitGrants,
1717
}: CustomerPortalGrantsSimpleProps) => {
18-
const t = usePortalTranslations()
18+
const t = useTranslations()
1919
return (
2020
<div className="flex w-full flex-col gap-4">
2121
<h3 className="text-xl">{t('portal.benefits.title')}</h3>

clients/apps/web/src/components/CustomerPortal/CustomerPortalOrder.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import { OrderDownloadActions } from '../Orders/OrderDownloadActions'
1313
import { DetailRow } from '../Shared/DetailRow'
1414
import { CustomerPortalGrants } from './CustomerPortalGrants'
1515
import { OrderPaymentRetryModal } from './OrderPaymentRetryModal'
16-
import { usePortalTranslations } from './PortalLocaleProvider'
16+
import { useTranslations } from './PortalLocaleProvider'
1717
import { SeatManagementTable } from './SeatManagementTable'
1818

1919
const getOrderStatusDisplayTitle = (
@@ -50,7 +50,7 @@ const CustomerPortalOrder = ({
5050
customerSessionToken: string
5151
themingPreset: ThemingPresetProps
5252
}) => {
53-
const t = usePortalTranslations()
53+
const t = useTranslations()
5454
const orderStatusDisplayTitle = getOrderStatusDisplayTitle(t)
5555
const [isPaymentModalOpen, setIsPaymentModalOpen] = useState(false)
5656

clients/apps/web/src/components/CustomerPortal/CustomerPortalOrders.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import { InlineModal } from '../Modal/InlineModal'
1111
import { useModal } from '../Modal/useModal'
1212
import { OrderStatus } from '../Orders/OrderStatus'
1313
import CustomerPortalOrder from './CustomerPortalOrder'
14-
import { usePortalTranslations } from './PortalLocaleProvider'
14+
import { useTranslations } from './PortalLocaleProvider'
1515

1616
export interface CustomerPortalOrdersProps {
1717
organization: schemas['CustomerOrganization']
@@ -24,7 +24,7 @@ export const CustomerPortalOrders = ({
2424
orders,
2525
customerSessionToken,
2626
}: CustomerPortalOrdersProps) => {
27-
const t = usePortalTranslations()
27+
const t = useTranslations()
2828
const api = createClientSideAPI(customerSessionToken)
2929

3030
const [selectedOrder, setSelectedOrder] = useState<

clients/apps/web/src/components/CustomerPortal/CustomerPortalOverview.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { createClientSideAPI } from '@/utils/client'
55
import { hasBillingPermission } from '@/utils/customerPortal'
66
import AllInclusiveOutlined from '@mui/icons-material/AllInclusiveOutlined'
77
import { schemas } from '@polar-sh/client'
8-
import { usePortalTranslations } from './PortalLocaleProvider'
8+
import { useTranslations } from './PortalLocaleProvider'
99
import { CurrentPeriodOverview } from './CurrentPeriodOverview'
1010
import { CustomerPortalGrants } from './CustomerPortalGrants'
1111
import { CustomerPortalOrders } from './CustomerPortalOrders'
@@ -32,7 +32,7 @@ export const CustomerPortalOverview = ({
3232
orders,
3333
customerSessionToken,
3434
}: CustomerPortalProps) => {
35-
const t = usePortalTranslations()
35+
const t = useTranslations()
3636
const api = createClientSideAPI(customerSessionToken)
3737

3838
// Check if the user has billing permissions
@@ -84,7 +84,9 @@ export const CustomerPortalOverview = ({
8484
{activeClaimedSubscriptions.length > 0 && (
8585
<div className="flex flex-col gap-y-4">
8686
<div className="flex flex-col gap-y-2">
87-
<h3 className="text-xl">{t('portal.overview.teamSeatAccess.title')}</h3>
87+
<h3 className="text-xl">
88+
{t('portal.overview.teamSeatAccess.title')}
89+
</h3>
8890
<p className="dark:text-polar-500 text-gray-500">
8991
{t('portal.overview.teamSeatAccess.description')}
9092
</p>

0 commit comments

Comments
 (0)