Skip to content

Commit 5354075

Browse files
committed
build fixes
1 parent 39d44dc commit 5354075

File tree

11 files changed

+38
-14
lines changed

11 files changed

+38
-14
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: 4 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",
@@ -60,6 +62,7 @@ export default {
6062
"cart.": "",
6163

6264
"checkout.title": "Fizetés",
65+
"checkout.placeorder": "Rendelés leadása",
6366
"checkout.back": "Vissza a kosárhoz",
6467
"checkout.inyourcart": "A kosaradban",
6568
"checkout.chooseaddress": "Válassz egy címet",
@@ -221,6 +224,7 @@ export default {
221224
"account.address.email": "E-mail",
222225

223226
"account.password": "Jelszó",
227+
"account.password_hint": "A jelszó biztonsági okokból nem jelenik meg",
224228
"account.old_password": "Régi jelszó",
225229
"account.new_password": "Új jelszó",
226230
"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: 4 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",
@@ -60,6 +62,7 @@ export default {
6062
"cart.": "",
6163

6264
"checkout.title": "Checkout",
65+
"checkout.placeorder": "Place Order",
6366
"checkout.back": "Back to shopping cart",
6467
"checkout.inyourcart": "In your Cart",
6568
"checkout.chooseaddress": "Choose an address",
@@ -221,6 +224,7 @@ export default {
221224
"account.address.email": "E-mail",
222225

223226
"account.password": "Password",
227+
"account.password_hint": "The password is not shown for security reasons",
224228
"account.old_password": "Old password",
225229
"account.new_password": "New password",
226230
"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/payment-button/index.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,7 @@ const PayPalPaymentButton = ({
259259
}
260260

261261
const ManualTestPaymentButton = ({ notReady }: { notReady: boolean }) => {
262+
const t = useScopedI18n("checkout")
262263
const [submitting, setSubmitting] = useState(false)
263264
const [errorMessage, setErrorMessage] = useState<string | null>(null)
264265

@@ -284,7 +285,7 @@ const ManualTestPaymentButton = ({ notReady }: { notReady: boolean }) => {
284285
size="large"
285286
data-testid="submit-order-button"
286287
>
287-
Place order
288+
{t("placeorder")}
288289
</Button>
289290
<ErrorMessage
290291
error={errorMessage}

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",

0 commit comments

Comments
 (0)