diff --git a/apps/landing/astro.config.mjs b/apps/landing/astro.config.mjs index a841fa5..c7d057e 100644 --- a/apps/landing/astro.config.mjs +++ b/apps/landing/astro.config.mjs @@ -23,15 +23,6 @@ export default defineConfig({ adapter: node({ mode: "standalone", }), - i18n: { - // FR par défaut, EN sous /en/* — `prefixDefaultLocale: false` garde - // les URLs FR canoniques à la racine pour ne pas casser le SEO existant. - defaultLocale: "fr", - locales: ["fr", "en"], - routing: { - prefixDefaultLocale: false, - }, - }, integrations: [ react(), ], diff --git a/apps/landing/src/components/SiteFooter.tsx b/apps/landing/src/components/SiteFooter.tsx index b95221b..1509164 100644 --- a/apps/landing/src/components/SiteFooter.tsx +++ b/apps/landing/src/components/SiteFooter.tsx @@ -1,44 +1,37 @@ import { Brand } from "@rubis/ui"; -import { getTranslations, type Locale } from "../i18n"; +import { copy } from "../copy"; const CURRENT_YEAR = new Date().getFullYear(); -type SiteFooterProps = { - locale?: Locale; -}; - /** * Footer public commun à toutes les pages rubis.pro/*. * Liens légaux + tagline. Pas de réseaux sociaux V1. */ -export function SiteFooter({ locale = "fr" }: SiteFooterProps) { - const t = getTranslations(locale); - const prefix = locale === "fr" ? "" : "/en"; - +export function SiteFooter() { return ( diff --git a/apps/landing/src/components/SiteHeader.tsx b/apps/landing/src/components/SiteHeader.tsx index d46d0d1..c6516f9 100644 --- a/apps/landing/src/components/SiteHeader.tsx +++ b/apps/landing/src/components/SiteHeader.tsx @@ -1,5 +1,5 @@ import { Brand, Button, cn } from "@rubis/ui"; -import { getTranslations, getAlternateUrl, type Locale } from "../i18n"; +import { copy } from "../copy"; const APP_URL = "https://app.rubis.pro"; @@ -7,29 +7,12 @@ type SiteHeaderProps = { /** Si true, fond opaque + bordure (utile sur les pages blog où on n'a pas de hero). Sinon transparent + sticky-blur. */ solid?: boolean; className?: string; - locale?: Locale; - /** Path courant — sert à construire le lien switcher vers la locale alternative. */ - currentPath?: string; }; /** * Header public commun à toutes les pages rubis.pro/*. - * Reçoit la locale via Layout.astro, expose un switcher FR/EN qui préserve - * la page courante. */ -export function SiteHeader({ - solid = false, - className, - locale = "fr", - currentPath = "/", -}: SiteHeaderProps) { - const t = getTranslations(locale); - const target: Locale = locale === "fr" ? "en" : "fr"; - const altUrl = getAlternateUrl(currentPath, target); - const homeHref = locale === "fr" ? "/" : "/en/"; - const pricingHref = locale === "fr" ? "/#pricing" : "/en/#pricing"; - const blogHref = locale === "fr" ? "/blog" : "/en/blog"; - +export function SiteHeader({ solid = false, className }: SiteHeaderProps) { return (
- + + + {copy.nav.baseline} + -
diff --git a/apps/landing/src/components/sections/AutoBanking.tsx b/apps/landing/src/components/sections/AutoBanking.tsx index 038b92c..4efd900 100644 --- a/apps/landing/src/components/sections/AutoBanking.tsx +++ b/apps/landing/src/components/sections/AutoBanking.tsx @@ -1,12 +1,8 @@ import { CheckCircle2, ShieldCheck, Sparkles, Building2 } from "lucide-react"; -import { getTranslations, type Locale } from "../../i18n"; +import { copy } from "../../copy"; -type AutoBankingProps = { - locale?: Locale; -}; - -export function AutoBanking({ locale = "fr" }: AutoBankingProps) { - const t = getTranslations(locale).autoBanking; +export function AutoBanking() { + const t = copy.autoBanking; return (
@@ -62,7 +58,7 @@ export function AutoBanking({ locale = "fr" }: AutoBankingProps) {
- +
@@ -84,9 +80,9 @@ function Benefit({ children }: { children: React.ReactNode }) { ); } -function DetectedPaymentMock({ locale }: { locale: Locale }) { - const t = getTranslations(locale).autoBanking; - const amount = locale === "fr" ? "4 189,40 €" : "€4,189.40"; +function DetectedPaymentMock() { + const t = copy.autoBanking; + const amount = "4 189,40 €"; return (
-

{t.hint}

+

{t.ctaHint}

+

{t.hint}

); diff --git a/apps/landing/src/components/sections/Footnotes.tsx b/apps/landing/src/components/sections/Footnotes.tsx index 218e8da..6a40a22 100644 --- a/apps/landing/src/components/sections/Footnotes.tsx +++ b/apps/landing/src/components/sections/Footnotes.tsx @@ -1,11 +1,7 @@ -import { getTranslations, type Locale } from "../../i18n"; +import { copy } from "../../copy"; -type FootnotesProps = { - locale?: Locale; -}; - -export function Footnotes({ locale = "fr" }: FootnotesProps) { - const t = getTranslations(locale).footnotes; +export function Footnotes() { + const t = copy.footnotes; return (