From cecbddc49639884e2cba5881274e5d6818c21e12 Mon Sep 17 00:00:00 2001 From: ordinarthur <@arthurbarre.js@gmail.com> Date: Mon, 18 May 2026 09:46:42 +0200 Subject: [PATCH] refactor(landing): mono-langue FR + quick wins optimisations conversion MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Retire le système i18n EN (apps/landing/src/i18n/, pages /en/*) ajouté en 4f3417f. Source unique de copy dans src/copy.ts (FR uniquement). Switcher de langue retiré du header, sitemap nettoyé des hreflang. - Header : micro-baseline « Logiciel de relance de factures impayées » sous le wordmark pour lever l'ambiguïté du nom (§1). - CTA principal : « Lancer Rubis » → « Démarrer mon essai 14 jours » avec sous-texte sur Hero / FinalCTA / Pricing (§5). - Essai 30 j → 14 j sur landing + CGV §6.2 (§3). - Blog promu en nav primaire avec label « Ressources » (§6). Doc d'arbitrage : docs/tech/landing-optimisations.md. Co-Authored-By: Claude Opus 4.7 --- apps/landing/astro.config.mjs | 9 - apps/landing/src/components/SiteFooter.tsx | 37 +- apps/landing/src/components/SiteHeader.tsx | 49 +-- .../src/components/sections/AutoBanking.tsx | 18 +- apps/landing/src/components/sections/FAQ.tsx | 10 +- .../src/components/sections/FinalCTA.tsx | 13 +- .../src/components/sections/Footnotes.tsx | 10 +- .../src/components/sections/Gamification.tsx | 10 +- apps/landing/src/components/sections/Hero.tsx | 20 +- .../src/components/sections/HowItWorks.tsx | 12 +- .../landing/src/components/sections/Legal.tsx | 22 +- .../src/components/sections/Pricing.tsx | 14 +- .../src/components/sections/Promise.tsx | 10 +- .../landing/src/components/sections/Stats.tsx | 10 +- apps/landing/src/{i18n/fr.ts => copy.ts} | 34 +- apps/landing/src/i18n/en.ts | 381 ----------------- apps/landing/src/i18n/index.ts | 43 -- apps/landing/src/i18n/types.ts | 15 - apps/landing/src/layouts/Layout.astro | 19 +- apps/landing/src/pages/blog/[slug].astro | 4 +- apps/landing/src/pages/blog/index.astro | 16 +- apps/landing/src/pages/cgv.astro | 2 +- apps/landing/src/pages/changelog/index.astro | 38 +- apps/landing/src/pages/en/blog/index.astro | 57 --- apps/landing/src/pages/en/cgv.astro | 76 ---- .../src/pages/en/changelog/index.astro | 388 ------------------ .../src/pages/en/confidentialite.astro | 86 ---- apps/landing/src/pages/en/index.astro | 99 ----- .../src/pages/en/mentions-legales.astro | 91 ---- apps/landing/src/pages/index.astro | 35 +- apps/landing/src/pages/sitemap.xml.ts | 33 +- docs/tech/landing-optimisations.md | 178 ++++++++ 32 files changed, 340 insertions(+), 1499 deletions(-) rename apps/landing/src/{i18n/fr.ts => copy.ts} (95%) delete mode 100644 apps/landing/src/i18n/en.ts delete mode 100644 apps/landing/src/i18n/index.ts delete mode 100644 apps/landing/src/i18n/types.ts delete mode 100644 apps/landing/src/pages/en/blog/index.astro delete mode 100644 apps/landing/src/pages/en/cgv.astro delete mode 100644 apps/landing/src/pages/en/changelog/index.astro delete mode 100644 apps/landing/src/pages/en/confidentialite.astro delete mode 100644 apps/landing/src/pages/en/index.astro delete mode 100644 apps/landing/src/pages/en/mentions-legales.astro create mode 100644 docs/tech/landing-optimisations.md 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 (