Skip to content

feat(landing,docs): i18n foundation, content de-dup, and de/it/fr/es - #11

Draft
LKSNDRTMLKV wants to merge 5 commits into
mainfrom
feat/landing-i18n-foundation
Draft

feat(landing,docs): i18n foundation, content de-dup, and de/it/fr/es#11
LKSNDRTMLKV wants to merge 5 commits into
mainfrom
feat/landing-i18n-foundation

Conversation

@LKSNDRTMLKV

@LKSNDRTMLKV LKSNDRTMLKV commented Jul 29, 2026

Copy link
Copy Markdown
Member

Summary

i18n foundation (routing + typed dictionary, landing)

  • Astro native i18n routing with a typed locale registry (src/i18n/config.ts) that fails the build if a locale is referenced without matching translations.
  • Typed UI-string dictionary (src/i18n/ui.ts) driving the shared shell (Nav, Footer, Hero's status badge).
  • Base.astro is locale-aware: <html lang>, og:locale (+ alternates), hreflang/x-default.
  • src/i18n/plural.ts — an Intl.PluralRules helper, not consumed yet.
  • Byproduct fix: the alpha status badge showed two different strings across Hero and Nav — now one dictionary key.

Content de-duplication (new: packages/shared-content)

  • Audited dpp-landing + dpp-docs: the data-boundary table and the 5-step signing mechanism were independently retyped in 4+ places and had already drifted (a table header disagreed; the step count disagreed 4 vs 5).
  • New workspace package holds those facts once, at two depths (summary for landing, detail for docs). index.astro and the docs' "What Odal can and cannot see" page both render from it.
  • /trust (previously an unrouted draft) is now live — shrunk to a short statement + link to the canonical docs breakdown instead of a second full copy.

de/it/fr/es activated — both sites

  • Landing: all 5 locales in Astro's i18n routing with fallback + fallbackType: "rewrite". UI chrome dictionary (~20 strings) translated into all 4 new locales. New LanguageSwitcher.astro (plain links, no JS) in desktop + mobile nav, preserving the current page across a language switch.
  • Docs: Starlight's own locales config, root for English. Starlight ships built-in translated UI strings for German/Italian/French/Spanish (skip-link, search, TOC, etc.) — zero translation work needed for that chrome. Starlight auto-generates its own language-select dropdown in the header, correctly preserving the current page per locale — no custom component needed here.
  • Page prose is deliberately not translated on either site — Hero copy, deadline citations, data-boundary facts, and all 25 docs MDX pages stay English, served under every locale's URL via fallback. Machine-translating regulatory/compliance content without native-speaker review is a real liability surface for this product; the chrome strings are short, low-risk, standard patterns and fine as a first pass, but that practice should not extend to regulatory prose. Zero live users right now makes moving fast on chrome low-risk — the review gate applies before real launch, not before this PR merges.

Known gaps (flagged, not blocking)

  • Landing sitemap: @astrojs/sitemap's i18n config is wired but the generated sitemap only lists the 4 default-locale URLs, not the fallback-generated locale pages. Docs' sitemap does not have this problem — Starlight registers locale routes explicitly, so all 80 locale-prefixed URLs appear correctly. Worth reconciling before real launch.
  • Docs "not yet translated" notice: Starlight can show a visible banner on fallback pages, but only once at least one real file exists per locale directory with a matching filename — i.e. it activates per-page, not per-locale-as-a-whole. With zero prose translated today, no pages qualify, so fallback is currently silent (same class of gap as landing's fallback, no visible marker). Will resolve naturally as real translations land.

Test plan

  • pnpm --filter dpp-landing build/check — green, 0 errors; de/it/fr/es fallback pages generated for every route
  • pnpm --filter dpp-docs build/check — green, 0 errors; 102 pages (up from 22), Pagefind indexed 5 languages
  • Verified in built output (both sites): correct <html lang>, translated chrome, unchanged English prose on fallback pages
  • Verified hreflang + og:locale on landing; hreflang on docs
  • Verified landing's LanguageSwitcher and Starlight's built-in language-select both preserve the current page path across a locale switch (root → /de/trustit/it/trust, not /it/)
  • Live browser checks (dev server, not just static build) on both sites: no console errors, mobile nav toggle's translated aria-label swap works on landing, German page loads correctly on docs
  • Confirmed docs sitemap correctly includes all locale-prefixed URLs (contrast with landing's known gap above)

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jul 29, 2026

Copy link
Copy Markdown

Deploying odal-node-docs with  Cloudflare Pages  Cloudflare Pages

Latest commit: 2feb335
Status: ✅  Deploy successful!
Preview URL: https://95017244.odal-node-docs.pages.dev
Branch Preview URL: https://feat-landing-i18n-foundation.odal-node-docs.pages.dev

View logs

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jul 29, 2026

Copy link
Copy Markdown

Deploying odal-node-landing with  Cloudflare Pages  Cloudflare Pages

Latest commit: 2feb335
Status: ✅  Deploy successful!
Preview URL: https://690d6b61.odal-node-landing.pages.dev
Branch Preview URL: https://feat-landing-i18n-foundation.odal-node-landing.pages.dev

View logs

@LKSNDRTMLKV LKSNDRTMLKV changed the title feat(landing): i18n routing foundation feat(landing,docs): i18n foundation + content de-duplication Jul 29, 2026
@LKSNDRTMLKV LKSNDRTMLKV changed the title feat(landing,docs): i18n foundation + content de-duplication feat(landing): i18n foundation, content de-dup, and de/it/fr/es Jul 29, 2026
@LKSNDRTMLKV LKSNDRTMLKV changed the title feat(landing): i18n foundation, content de-dup, and de/it/fr/es feat(landing,docs): i18n foundation, content de-dup, and de/it/fr/es Jul 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant