From a689aaee1a6b14d8ddc48b68fa34a26c2fcc3cca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jose=20Villase=C3=B1or=20Montfort?= <195970+montfort@users.noreply.github.com> Date: Mon, 18 May 2026 12:05:07 -0600 Subject: [PATCH] fix(website): translate hero tagline on the landing The PR3 landing left the H1 tagline rendered via `{siteConfig.tagline}` directly from docusaurus.config.ts, which bypasses the i18n pipeline. Result: the Spanish home at /es/ showed the English headline even though every other string on the page (pillars, CTAs, captions, features, why paragraph) was already wrapped in . This swaps the tagline for a wrapper and adds the matching key to website/i18n/es/code.json. Layout's `description` prop (used for ) now uses the same translated string via the imperative `translate()` helper, so the meta tag also localizes on /es/. Co-Authored-By: Claude Opus 4.7 (1M context) --- website/i18n/es/code.json | 4 ++++ website/src/components/Hero/index.tsx | 8 +++++--- website/src/pages/index.tsx | 10 +++++++--- 3 files changed, 16 insertions(+), 6 deletions(-) diff --git a/website/i18n/es/code.json b/website/i18n/es/code.json index e6018b4..b30a461 100644 --- a/website/i18n/es/code.json +++ b/website/i18n/es/code.json @@ -1,4 +1,8 @@ { + "hero.tagline": { + "message": "Disciplina cognitiva para la ingeniería asistida por IA", + "description": "Hero tagline (H1 on the landing)" + }, "hero.pillar1": { "message": "Cada decisión queda en el repo", "description": "First hero pillar" diff --git a/website/src/components/Hero/index.tsx b/website/src/components/Hero/index.tsx index f983e20..a906a8c 100644 --- a/website/src/components/Hero/index.tsx +++ b/website/src/components/Hero/index.tsx @@ -2,17 +2,19 @@ import type {ReactNode} from 'react'; import Link from '@docusaurus/Link'; import Translate from '@docusaurus/Translate'; import CodeBlock from '@theme/CodeBlock'; -import useDocusaurusContext from '@docusaurus/useDocusaurusContext'; import styles from './styles.module.css'; const INSTALL = 'curl -fsSL https://raw.githubusercontent.com/StrangeDaysTech/straymark/main/install.sh | sh'; export default function Hero(): ReactNode { - const {siteConfig} = useDocusaurusContext(); return (
-

{siteConfig.tagline}

+

+ + Cognitive discipline for AI-assisted engineering + +

  • diff --git a/website/src/pages/index.tsx b/website/src/pages/index.tsx index 16c7846..699546f 100644 --- a/website/src/pages/index.tsx +++ b/website/src/pages/index.tsx @@ -1,15 +1,19 @@ import type {ReactNode} from 'react'; import Layout from '@theme/Layout'; -import useDocusaurusContext from '@docusaurus/useDocusaurusContext'; +import {translate} from '@docusaurus/Translate'; import Hero from '@site/src/components/Hero'; import WorkflowDiagram from '@site/src/components/WorkflowDiagram'; import WhyExists from '@site/src/components/WhyExists'; import FeatureGrid from '@site/src/components/FeatureGrid'; export default function Home(): ReactNode { - const {siteConfig} = useDocusaurusContext(); + const description = translate({ + id: 'hero.tagline', + message: 'Cognitive discipline for AI-assisted engineering', + description: 'Hero tagline (H1 on the landing)', + }); return ( - +