Skip to content

Commit 46d51b4

Browse files
committed
build fixes
1 parent 39d44dc commit 46d51b4

File tree

10 files changed

+34
-13
lines changed

10 files changed

+34
-13
lines changed

src/app/[countryCode]/(checkout)/checkout/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import CheckoutSummary from "@modules/checkout/templates/checkout-summary"
1212
import { getCart } from "@lib/data"
1313

1414
export const metadata: Metadata = {
15-
title: "Checkout",
15+
title: "checkout.title",
1616
}
1717

1818
const fetchCart = async () => {

src/locales/hu.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,11 @@ export default {
4040

4141
"cart.title": "Kosár",
4242
"cart.desc": "Tekintsd meg a kosarad",
43+
"cart.taxes_desc": "A kosárban szereplő összeg nem tartalmazza az ÁFA-t és a szállítási díjat.",
4344
"cart.subtotal": "Részösszeg",
4445
"cart.discount": "Kedvezmény",
4546
"cart.shipping": "Szállítás",
47+
"cart.taxes": "ÁFA",
4648
"cart.giftcard": "Ajándékkártya",
4749
"cart.total": "Összeg",
4850
"cart.summary": "Összegzés",
@@ -221,6 +223,7 @@ export default {
221223
"account.address.email": "E-mail",
222224

223225
"account.password": "Jelszó",
226+
"account.password_hint": "A jelszó biztonsági okokból nem jelenik meg",
224227
"account.old_password": "Régi jelszó",
225228
"account.new_password": "Új jelszó",
226229
"account.confirm_password": "Jelszó megerősítése",

src/locales/locale-provider.tsx

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
'use client';
2+
3+
import type { ReactNode } from 'react';
4+
import { I18nProviderClient } from '../locales/client';
5+
6+
type ProviderProps = {
7+
countryCode: string;
8+
children: ReactNode;
9+
};
10+
11+
// {/* <main className="relative"><LocalizationProvider>{props.children}</LocalizationProvider></main> */}
12+
export function LocalizationProvider({ countryCode, children }: ProviderProps) {
13+
return (
14+
<I18nProviderClient locale={countryCode} fallback={<p>??? ... ???</p>}>
15+
{children}
16+
</I18nProviderClient>
17+
);
18+
}

src/locales/server.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
// https://next-international.vercel.app/docs/app-setup
22
// locales/server.ts
3-
import { createI18nServer } from 'next-international/server'
3+
import { createI18nServer, setStaticParamsLocale } from 'next-international/server'
44

55
export const { getI18n, getScopedI18n, getStaticParams, getCurrentLocale } = createI18nServer({
66
us: () => import('./us'),
77
hu: () => import('./hu')
88
}, {
99
segmentName: "countryCode"
10-
})
10+
})
11+
12+
// see: https://github.com/QuiiBz/next-international/issues/411
13+
export const setStaticParams = (locale: string) => setStaticParamsLocale(locale);

src/locales/us.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,11 @@ export default {
4040

4141
"cart.title": "Cart",
4242
"cart.desc": "View your cart",
43+
"cart.taxes_desc": "Cart total excluding shipping and taxes.",
4344
"cart.subtotal": "Subtotal",
4445
"cart.discount": "Discount",
4546
"cart.shipping": "Shipping",
47+
"cart.taxes": "Taxes",
4648
"cart.giftcard": "Gift card",
4749
"cart.total": "Total",
4850
"cart.summary": "Summary",
@@ -221,6 +223,7 @@ export default {
221223
"account.address.email": "E-mail",
222224

223225
"account.password": "Password",
226+
"account.password_hint": "The password is not shown for security reasons",
224227
"account.old_password": "Old password",
225228
"account.new_password": "New password",
226229
"account.confirm_password": "Confirm password",

src/modules/account/components/profile-password/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ const ProfileName: React.FC<MyInformationProps> = ({ customer }) => {
3838
<AccountInfo
3939
label={t("password")}
4040
currentInfo={
41-
<span>The password is not shown for security reasons</span>
41+
<span>{t("password_hint")}</span>
4242
}
4343
isSuccess={successState}
4444
isError={!!state.error}

src/modules/checkout/components/submit-button/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export function SubmitButton({
1111
'data-testid': dataTestId
1212
}: {
1313
children: React.ReactNode
14-
variant?: "primary" | "secondary" | "transparent" | "danger" | null
14+
variant?: "primary" | "secondary" | "transparent" | "danger" | undefined
1515
className?: string
1616
'data-testid'?: string
1717
}) {

src/modules/common/components/cart-totals/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ const CartTotals: React.FC<CartTotalsProps> = ({ data }) => {
3838
<div className="flex items-center justify-between">
3939
<span className="flex gap-x-1 items-center">
4040
{t("subtotal")}
41-
<Tooltip content="Cart total excluding shipping and taxes.">
41+
<Tooltip content={t("taxes_desc")}>
4242
<InformationCircleSolid color="var(--fg-muted)" />
4343
</Tooltip>
4444
</span>
@@ -65,7 +65,7 @@ const CartTotals: React.FC<CartTotalsProps> = ({ data }) => {
6565
</span>
6666
</div>
6767
<div className="flex justify-between">
68-
<span className="flex gap-x-1 items-center ">Taxes</span>
68+
<span className="flex gap-x-1 items-center ">{t("taxes")}</span>
6969
<span data-testid="cart-taxes" data-value={tax_total || 0}>
7070
{getAmount(tax_total)}
7171
</span>

src/modules/common/components/filter-radio-group/index.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ const FilterRadioGroup = ({
4747
value={i.value}
4848
/>
4949
<Label
50-
placeholder={i.label}
5150
htmlFor={i.value}
5251
className={clx(
5352
"!txt-compact-small !transform-none text-ui-fg-subtle hover:cursor-pointer",

src/modules/products/components/product-tabs/accordion.tsx

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ const Accordion: React.FC<AccordionProps> & {
2727
Item: React.FC<AccordionItemProps>
2828
} = ({ children, ...props }) => {
2929
return (
30-
/* @ts-expect-error */
3130
<AccordionPrimitive.Root {...props}>{children}</AccordionPrimitive.Root>
3231
)
3332
}
@@ -45,7 +44,6 @@ const Item: React.FC<AccordionItemProps> = ({
4544
...props
4645
}) => {
4746
return (
48-
/* @ts-expect-error */
4947
<AccordionPrimitive.Item
5048
{...props}
5149
className={clx(
@@ -54,14 +52,12 @@ const Item: React.FC<AccordionItemProps> = ({
5452
className
5553
)}
5654
>
57-
{/* @ts-expect-error */}
5855
<AccordionPrimitive.Header className="px-1">
5956
<div className="flex flex-col">
6057
<div className="flex w-full items-center justify-between">
6158
<div className="flex items-center gap-4">
6259
<Text className="text-ui-fg-subtle text-sm">{title}</Text>
6360
</div>
64-
{/* @ts-expect-error */}
6561
<AccordionPrimitive.Trigger>
6662
{customTrigger || <MorphingTrigger />}
6763
</AccordionPrimitive.Trigger>
@@ -73,7 +69,6 @@ const Item: React.FC<AccordionItemProps> = ({
7369
)}
7470
</div>
7571
</AccordionPrimitive.Header>
76-
{/* @ts-expect-error */}
7772
<AccordionPrimitive.Content
7873
forceMount={forceMountContent}
7974
className={clx(

0 commit comments

Comments
 (0)