Add language support #3
No reviewers
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
uchar/website!3
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "add-language-support"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Pull request overview
Adds internationalization (i18n) support to the Next.js App Router setup using
next-intl, introducing locale-based routing and translated UI/content across the marketing site.Changes:
/[locale]) andnext-intlconfiguration (routing, request config, navigation helpers).messages/{uz,ru,en}.json.Reviewed changes
Copilot reviewed 29 out of 36 changed files in this pull request and generated 11 comments.
Show a summary per file
next-intlmiddleware wrapper (intended for locale routing).next-intl.next-intlprovider, and wraps pages in shared Layout.next-intl+ other dependencies.next-intl+ MDX plugins..vscodeworkspace folder.Comments suppressed due to low confidence (2)
src/app/[locale]/(main)/page.tsx:12
PagePropsis used as a type but isn’t imported or defined anywhere in the repository. Unless you rely on generated.next/typesbeing present during type-checking, this will failtscin CI. Prefer typingpropsinline (e.g.{params: {locale: string}}) or import the correct type from Next if available in your version.src/app/[locale]/(main)/privacy/layout.tsx:6
LayoutProps<'/[locale]/privacy'>is used but not imported/declared anywhere in the repository, which can break type-checking. Prefer an explicit props type for this layout (e.g.{ children: React.ReactNode; params: { locale: string } }) or import the correct Next type if your version provides it.💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
useMDXComponentsno longer merges in thecomponentsargument and always returns an empty object. This can break MDX rendering where callers pass custom components (and diverges from Next MDX’s expected pattern). Keep the(components: MDXComponents) => ({...components, ...custom})shape so passed components aren’t dropped.@ -0,0 +12,4 @@}export default async function Privacy(props: PageProps<"/[locale]/privacy">) {const { locale } = await (props.params)PagePropsis referenced but not imported/declared in the repo, which will break type-checking unless.next/typesis generated and included. Consider typing the params explicitly (e.g.{ params: { locale: string } }) or importing the appropriate Next type for your version.@ -0,0 +1,50 @@import { type Metadata } from 'next'In a Next.js App Router layout,
<body>must be a direct child of<html>. Wrapping<body>withNextIntlClientProviderwill produce invalid layout structure and can error at runtime. Move the provider inside<body>(wrapping the app content).@ -0,0 +7,4 @@import { hasLocale, NextIntlClientProvider } from 'next-intl'import { notFound } from 'next/navigation'import { getMessages, setRequestLocale } from 'next-intl/server'import { Layout } from '@/components/Layout'NextIntlClientProvideris rendered withoutmessages(and optionallylocale). Since client components useuseTranslations, the messages need to be provided/serialized (typically viagetMessages()/useMessages()fromnext-intl/server). Without this, translations in client components can fail at runtime. Load messages for the current locale and pass them into the provider.This file introduces
//@ts-ignoredirectives and also uses semicolons/double quotes, which conflicts with the repo’s Prettier config (semi: false,singleQuote: true). Please run Prettier and replace@ts-ignorewith a typed fix or@ts-expect-errorplus a reason so suppression is intentional and tracked.This introduces Tailwind classes like
h-256.5,w-256.5,h-112, andmax-w-91.5that aren’t part of Tailwind’s default scale and aren’t defined in the project’s theme. These styles likely won’t be generated, causing layout regressions. Use arbitrary values (e.g.h-[1026px],max-w-[366px]) or define matching theme tokens.//@ts-ignoreon the Framer Motion element hides the underlying type mismatch. Prefer fixing the component typings (or using@ts-expect-errorwith a short reason) to avoid silently masking future issues.usePreviousno longer returnsundefinedon the first render because the ref is initialized with0 as unknown as T. This changes behavior and breaks theprevIndex === undefinedcheck below (it will never be true), which can affect animation direction on first render. Initialize the ref asundefined(e.g.useRef<T | undefined>(undefined)) and update the return type/logic accordingly.//@ts-ignoreis being used to silence type errors onmotion.div. This can hide real issues and makes upgrades harder. Prefer fixing the typing (e.g., ensure correctmotioncomponent typings /asusage) or use a narrower suppression (@ts-expect-errorwith a reason) so CI fails if the issue disappears.Tailwind classes like
max-w-91.5are not valid with the current Tailwind theme (no custom spacing scale is defined in src/styles/tailwind.css). These styles likely won’t be generated, changing layout sizing. Prefer arbitrary values (e.g.max-w-[366px]) or add explicit theme tokens.@ -0,0 +6,4 @@export const proxy = async (request: NextRequest) => {return i18middleware(request)}This file won’t be picked up by Next.js as middleware. Next expects a top-level
middleware.ts/middleware.js(orsrc/middleware.ts) exportingmiddleware/default, not an exportedproxyfunction insrc/proxy.ts. Rename/move this tosrc/middleware.tsand export the middleware function accordingly soconfig.matcheris applied.I kindly request @xelopsys to turn off AI reviews, this contradicts our Anti-AI stance & policy.