From 73146094bdf8bba6c97634f92f0f546c2516219f Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 5 Jul 2026 02:11:59 +0000 Subject: [PATCH] i18n: restructure app/ for locale routing + add scaffold --- app/{ => [locale]}/about/page.tsx | 0 app/{ => [locale]}/contact/layout.tsx | 0 app/{ => [locale]}/contact/page.tsx | 0 app/{ => [locale]}/documents/layout.tsx | 0 app/{ => [locale]}/documents/page.tsx | 0 app/{ => [locale]}/fraud/layout.tsx | 0 app/{ => [locale]}/fraud/page.tsx | 0 app/{ => [locale]}/inspection/layout.tsx | 0 app/{ => [locale]}/inspection/page.tsx | 0 app/[locale]/layout.tsx | 77 ++++++++++++++++++++++++ app/{ => [locale]}/page.tsx | 0 app/{ => [locale]}/research/page.tsx | 0 app/{ => [locale]}/rights/page.tsx | 0 app/{ => [locale]}/team/page.tsx | 0 app/{ => [locale]}/volunteer/page.tsx | 0 app/{ => [locale]}/volunteer/page.txt | 0 app/layout.tsx | 72 +--------------------- components/layout/LanguageSwitcher.tsx | 76 +++++++++++++++++++++++ lib/i18n/config.ts | 50 +++++++++++++++ lib/i18n/dictionaries/ar-EG.json | 18 ++++++ lib/i18n/dictionaries/en.json | 17 ++++++ lib/i18n/dictionaries/es.json | 17 ++++++ lib/i18n/dictionaries/fa.json | 18 ++++++ lib/i18n/dictionaries/hi.json | 17 ++++++ lib/i18n/dictionaries/hy.json | 17 ++++++ lib/i18n/dictionaries/ko.json | 17 ++++++ lib/i18n/dictionaries/tl.json | 17 ++++++ lib/i18n/dictionaries/vi.json | 17 ++++++ lib/i18n/dictionaries/zh-Hans.json | 17 ++++++ lib/i18n/get-dictionary.ts | 21 +++++++ middleware.ts | 42 +++++++++++++ 31 files changed, 439 insertions(+), 71 deletions(-) rename app/{ => [locale]}/about/page.tsx (100%) rename app/{ => [locale]}/contact/layout.tsx (100%) rename app/{ => [locale]}/contact/page.tsx (100%) rename app/{ => [locale]}/documents/layout.tsx (100%) rename app/{ => [locale]}/documents/page.tsx (100%) rename app/{ => [locale]}/fraud/layout.tsx (100%) rename app/{ => [locale]}/fraud/page.tsx (100%) rename app/{ => [locale]}/inspection/layout.tsx (100%) rename app/{ => [locale]}/inspection/page.tsx (100%) create mode 100644 app/[locale]/layout.tsx rename app/{ => [locale]}/page.tsx (100%) rename app/{ => [locale]}/research/page.tsx (100%) rename app/{ => [locale]}/rights/page.tsx (100%) rename app/{ => [locale]}/team/page.tsx (100%) rename app/{ => [locale]}/volunteer/page.tsx (100%) rename app/{ => [locale]}/volunteer/page.txt (100%) create mode 100644 components/layout/LanguageSwitcher.tsx create mode 100644 lib/i18n/config.ts create mode 100644 lib/i18n/dictionaries/ar-EG.json create mode 100644 lib/i18n/dictionaries/en.json create mode 100644 lib/i18n/dictionaries/es.json create mode 100644 lib/i18n/dictionaries/fa.json create mode 100644 lib/i18n/dictionaries/hi.json create mode 100644 lib/i18n/dictionaries/hy.json create mode 100644 lib/i18n/dictionaries/ko.json create mode 100644 lib/i18n/dictionaries/tl.json create mode 100644 lib/i18n/dictionaries/vi.json create mode 100644 lib/i18n/dictionaries/zh-Hans.json create mode 100644 lib/i18n/get-dictionary.ts create mode 100644 middleware.ts diff --git a/app/about/page.tsx b/app/[locale]/about/page.tsx similarity index 100% rename from app/about/page.tsx rename to app/[locale]/about/page.tsx diff --git a/app/contact/layout.tsx b/app/[locale]/contact/layout.tsx similarity index 100% rename from app/contact/layout.tsx rename to app/[locale]/contact/layout.tsx diff --git a/app/contact/page.tsx b/app/[locale]/contact/page.tsx similarity index 100% rename from app/contact/page.tsx rename to app/[locale]/contact/page.tsx diff --git a/app/documents/layout.tsx b/app/[locale]/documents/layout.tsx similarity index 100% rename from app/documents/layout.tsx rename to app/[locale]/documents/layout.tsx diff --git a/app/documents/page.tsx b/app/[locale]/documents/page.tsx similarity index 100% rename from app/documents/page.tsx rename to app/[locale]/documents/page.tsx diff --git a/app/fraud/layout.tsx b/app/[locale]/fraud/layout.tsx similarity index 100% rename from app/fraud/layout.tsx rename to app/[locale]/fraud/layout.tsx diff --git a/app/fraud/page.tsx b/app/[locale]/fraud/page.tsx similarity index 100% rename from app/fraud/page.tsx rename to app/[locale]/fraud/page.tsx diff --git a/app/inspection/layout.tsx b/app/[locale]/inspection/layout.tsx similarity index 100% rename from app/inspection/layout.tsx rename to app/[locale]/inspection/layout.tsx diff --git a/app/inspection/page.tsx b/app/[locale]/inspection/page.tsx similarity index 100% rename from app/inspection/page.tsx rename to app/[locale]/inspection/page.tsx diff --git a/app/[locale]/layout.tsx b/app/[locale]/layout.tsx new file mode 100644 index 0000000..429a259 --- /dev/null +++ b/app/[locale]/layout.tsx @@ -0,0 +1,77 @@ +import type { Metadata } from "next"; +import "./globals.css"; +import { Lora, Figtree } from "next/font/google"; +import { Nav } from "@/components/layout/Nav"; +import { Footer } from "@/components/layout/Footer"; +// import { CarCursor } from "@/components/ui/CarCursor"; + +const lora = Lora({ + subsets: ["latin"], + variable: "--font-heading", + weight: ["400", "500", "600", "700"], + style: ["normal", "italic"], + display: "swap", +}); + +const figtree = Figtree({ + subsets: ["latin"], + variable: "--font-body", + weight: ["400", "500", "600", "700", "800", "900"], + display: "swap", +}); + +export const metadata: Metadata = { + metadataBase: new URL( + process.env.NEXT_PUBLIC_SITE_URL ?? "https://getvindicated.org" + ), + title: { + default: "VINdicated | Educate. Empower. Vindicate.", + template: "%s | VINdicated", + }, + description: + "VINdicated is a nonprofit built on the belief that car knowledge should be public knowledge. We break down the systems that allow consumer discrimination to thrive.", + openGraph: { + type: "website", + siteName: "VINdicated", + title: { + default: "VINdicated | Educate. Empower. Vindicate.", + template: "%s | VINdicated", + }, + description: + "VINdicated is a nonprofit built on the belief that car knowledge should be public knowledge. We break down the systems that allow consumer discrimination to thrive.", + url: "/", + images: [ + { + url: "/illus-woman-dealership.png", + alt: "VINdicated", + }, + ], + }, + twitter: { + card: "summary_large_image", + title: { + default: "VINdicated | Educate. Empower. Vindicate.", + template: "%s | VINdicated", + }, + description: + "VINdicated is a nonprofit built on the belief that car knowledge should be public knowledge. We break down the systems that allow consumer discrimination to thrive.", + images: ["/illus-woman-dealership.png"], + }, +}; + +export default function RootLayout({ + children, +}: { + children: React.ReactNode; +}) { + return ( + + + {/* */} +