mirror of
https://github.com/horizon-rust/horizon-site.git
synced 2026-12-03 19:12:41 +07:00
[PR #36] feat: add i18n support with Spanish translation for homepage and navigation #38
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
horizon-rust/horizon-site#38
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/horizon-rust/horizon-site/pull/36
Author: @josegil1909
Created: 11/1/2026
Status: 🔄 Open
Base:
main← Head:feat/i18n-spanish📝 Commits (2)
1544a60feat: add i18n support with Spanish translation for homepage and navigation12fb392fix(i18n): fix a11y lang annotations and open graph locale for spanish pages📊 Changes
17 files changed (+508 additions, -235 deletions)
View changed files
➕
app/es/page.tsx(+14 -0)📝
app/page.tsx(+4 -89)📝
app/sitemap.ts(+1 -0)📝
components/about.tsx(+28 -27)📝
components/community.tsx(+20 -17)📝
components/contributors.tsx(+2 -2)📝
components/gallery.tsx(+38 -35)📝
components/hero.tsx(+12 -11)➕
components/home-page.tsx(+97 -0)📝
components/parity.tsx(+2 -2)📝
components/site-footer.tsx(+31 -27)📝
components/site-header.tsx(+55 -20)📝
components/site.ts(+3 -3)📝
components/sponsor.tsx(+2 -2)➕
lib/i18n.ts(+17 -0)➕
messages/en.json(+91 -0)➕
messages/es.json(+91 -0)📄 Description
Summary
Introduces lightweight, zero-dependency internationalization (i18n) support starting with Spanish, addressing #29.
Architectural Decisions
Zero External Dependencies:
messages/en.jsonandmessages/es.json) with strict type inference (lib/i18n.ts).Non-invasive Routing & Invariant Preservation:
/,/hub,/mods,/docs,/releases,/data/roadmap.json, etc.) without moving the app under a dynamic[locale]catch-all (which would break Turbopack metadata handlers and API proxy routes)./eswith localized static metadata, sitemap inclusion, and identical prerendering (○ (Static)).Navigation & Switcher:
SiteHeaderdetects locale from pathname and includes a clean language toggle button (EN/ES) in both desktop and mobile menus.SiteFooterupdates disclaimer and project notices to match the active language.Verification
npx eslint .: Pass (no warnings or errors).npm run build: Pass (110/110 static pages generated, including/esand/).Closes #29
🤖 Generated with Google Antigravity
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.