open-design/apps/landing-page/app/_components
ashleyashli 86dafa9be8
feat(landing): add 19-locale URL routing with full home translations (#2408)
* feat(landing): add 19-locale URL routing with full home translations

Adds locale-prefixed routes (/zh-CN/, /ja/, /de/, …) for 18 non-default
locales while keeping English as the only unprefixed canonical. Generates
proper hreflang + og:locale, points hreflang="en" / x-default at the
unprefixed canonical, and serves localized RSS and plugin search JSON
under each prefix.

Adds a visible language switcher (globe pill + native names) on every
page, replacing the small topbar dropdown. Native-name menu, current
locale marked aria-current, closes on outside click / Escape, only one
open at a time.

Adds app/_lib/home-copy.ts as the source of truth for marketing copy
on the landing page, with full translations for zh-CN, zh-TW, ja, ko,
de, fr, es-ES, pt-BR. Remaining locales (it, pl, hu, ru, uk, tr, ar, fa,
th, id) fall back to English for marketing copy while still getting
fully localized chrome.

Extracts the IntersectionObserver reveal + GitHub stats + wire ticker
script into _components/home-enhancer.astro so localized homepages
animate in the same way as the canonical home.

- New: app/_lib/i18n.ts, app/_lib/home-copy.ts
- New: app/_components/home-enhancer.astro, locale-switcher-enhancer.astro
- New: app/pages/[locale]/{index,[...path]}.astro, blog/rss.xml.ts,
  plugins/search.json.ts

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix(landing): bound localized routing to listing pages only

Detail pages (skills/<slug>, blog/<id>, systems/<slug>, templates/<slug>,
craft/<slug>, plugins/<slug>) no longer fan out across 18 prefixed
locales — they stay at their canonical English URLs. Localized chrome
on listing pages links straight to those English detail URLs.

Generated page count drops from ~6,000+ to ~1,800 and the landing-page
CI build returns to ~50s. Localized homes, listings, and filter index
pages (skills/mode/*, skills/scenario/*, systems/category/*) are all
still produced per locale.

Co-authored-by: Cursor <cursoragent@cursor.com>

---------

Co-authored-by: ashley li <ashleyli@ashleydeMacBook-Air-2.local>
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-21 11:36:15 +08:00
..
font-stylesheet.astro perf(landing): edge-cache HTML and precise-load thumbnails (#2235) 2026-05-19 19:14:25 +08:00
header-enhancer.astro feat(landing-page): add HTML Anything page and responsive header (#2452) 2026-05-20 20:37:34 +08:00
header.tsx feat(landing): add 19-locale URL routing with full home translations (#2408) 2026-05-21 11:36:15 +08:00
home-enhancer.astro feat(landing): add 19-locale URL routing with full home translations (#2408) 2026-05-21 11:36:15 +08:00
lazy-img.astro perf(landing): edge-cache HTML and precise-load thumbnails (#2235) 2026-05-19 19:14:25 +08:00
locale-switcher-enhancer.astro feat(landing): add 19-locale URL routing with full home translations (#2408) 2026-05-21 11:36:15 +08:00
precise-lazyload.astro perf(landing): edge-cache HTML and precise-load thumbnails (#2235) 2026-05-19 19:14:25 +08:00
seo-head.astro feat(landing): add 19-locale URL routing with full home translations (#2408) 2026-05-21 11:36:15 +08:00
site-footer.astro feat(landing): add 19-locale URL routing with full home translations (#2408) 2026-05-21 11:36:15 +08:00
skill-row.astro perf(landing): edge-cache HTML and precise-load thumbnails (#2235) 2026-05-19 19:14:25 +08:00
sub-page-layout.astro feat(landing): add 19-locale URL routing with full home translations (#2408) 2026-05-21 11:36:15 +08:00
system-card.astro feat(landing-page): split catalog into per-facet pages + auto-deploy on content changes (#1158) 2026-05-12 19:24:50 +08:00
topbar.astro feat(landing): add 19-locale URL routing with full home translations (#2408) 2026-05-21 11:36:15 +08:00
wire.tsx fix: sync landing source-of-truth paths (#2066) 2026-05-20 11:44:04 +08:00