From c73ffc2c541a904d0f3b9b383689b17835bd5f80 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?je=CC=81ro=CC=82me=20boileux?= Date: Wed, 11 Mar 2026 17:37:17 +0100 Subject: [PATCH 1/2] fix: add i18n lang segment to legal routes Legal pages (CGU, privacy policy) were missing the ($lang) route segment, causing 404 errors on /fr/legal/* URLs. --- app/routes/{legal.$slug.tsx => legal.($lang).$slug.tsx} | 0 app/routes/{legal.tsx => legal.($lang).tsx} | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename app/routes/{legal.$slug.tsx => legal.($lang).$slug.tsx} (100%) rename app/routes/{legal.tsx => legal.($lang).tsx} (100%) diff --git a/app/routes/legal.$slug.tsx b/app/routes/legal.($lang).$slug.tsx similarity index 100% rename from app/routes/legal.$slug.tsx rename to app/routes/legal.($lang).$slug.tsx diff --git a/app/routes/legal.tsx b/app/routes/legal.($lang).tsx similarity index 100% rename from app/routes/legal.tsx rename to app/routes/legal.($lang).tsx From 4fa52dc59872e92c1a07d9b3874299915ad17cc8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?je=CC=81ro=CC=82me=20boileux?= Date: Wed, 11 Mar 2026 17:41:14 +0100 Subject: [PATCH 2/2] fix: move legal routes under _main.($lang) for i18n support Legal pages (CGU, privacy policy) were not nested under the _main layout with ($lang) segment, causing 404 on /fr/legal/* URLs. Moved routes to _main.($lang).legal.* and removed redundant LayoutMain wrapper since _main already provides it. --- ...slug.tsx => _main.($lang).legal.$slug.tsx} | 5 +---- app/routes/_main.($lang).legal.tsx | 17 ++++++++++++++++ app/routes/legal.($lang).tsx | 20 ------------------- 3 files changed, 18 insertions(+), 24 deletions(-) rename app/routes/{legal.($lang).$slug.tsx => _main.($lang).legal.$slug.tsx} (89%) create mode 100644 app/routes/_main.($lang).legal.tsx delete mode 100644 app/routes/legal.($lang).tsx diff --git a/app/routes/legal.($lang).$slug.tsx b/app/routes/_main.($lang).legal.$slug.tsx similarity index 89% rename from app/routes/legal.($lang).$slug.tsx rename to app/routes/_main.($lang).legal.$slug.tsx index 415bda52..010b4e3e 100644 --- a/app/routes/legal.($lang).$slug.tsx +++ b/app/routes/_main.($lang).legal.$slug.tsx @@ -12,9 +12,6 @@ export async function loader({ params }: LoaderFunctionArgs) { const { slug } = params; if (!slug) { - // we know we can't render the component - // so throw immediately to stop executing code - // and show the not found page throw new Response('Not Found', { status: 404 }); } @@ -42,7 +39,7 @@ export const meta: MetaFunction = ({ data, params }) => { }); }; -export default function Index() { +export default function LegalPage() { const { page } = useLoaderData(); return (
+ + + + + + + ); +} diff --git a/app/routes/legal.($lang).tsx b/app/routes/legal.($lang).tsx deleted file mode 100644 index 71f9c96f..00000000 --- a/app/routes/legal.($lang).tsx +++ /dev/null @@ -1,20 +0,0 @@ -import { Outlet } from 'react-router'; - -import { Grid, GridItem } from '@ocobo/styled-system/jsx'; - -import { LayoutMain } from '~/components/LayoutMain'; -import { Container } from '~/components/ui/Container'; - -export default function Index() { - return ( - - - - - - - - - - ); -}