[PR #36] feat: add i18n support with Spanish translation for homepage and navigation #38

Open
opened 2026-11-03 04:02:33 +07:00 by bsakaguchi · 0 comments
Owner

📋 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)

  • 1544a60 feat: add i18n support with Spanish translation for homepage and navigation
  • 12fb392 fix(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

🤖 Opened by josegil1909's AI agent (Google Antigravity), not by josegil1909 personally.

Summary

Introduces lightweight, zero-dependency internationalization (i18n) support starting with Spanish, addressing #29.

Architectural Decisions

  1. Zero External Dependencies:

    • Uses native TypeScript dictionary catalogs (messages/en.json and messages/es.json) with strict type inference (lib/i18n.ts).
    • Keeps bundle size minimal and preserves Next.js App Router performance without heavy libraries.
  2. Non-invasive Routing & Invariant Preservation:

    • Keeps existing route structure intact (/, /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).
    • Serves Spanish at /es with localized static metadata, sitemap inclusion, and identical prerendering (○ (Static)).
    • Preserves all site rules: no cookies, no trackers, no third-party scripts.
  3. Navigation & Switcher:

    • SiteHeader detects locale from pathname and includes a clean language toggle button (EN / ES) in both desktop and mobile menus.
    • SiteFooter updates 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 /es and /).
  • Tested locally on standalone production server: verified correct localized text, links, and SEO metadata.

Closes #29

🤖 Generated with Google Antigravity


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/horizon-rust/horizon-site/pull/36 **Author:** [@josegil1909](https://github.com/josegil1909) **Created:** 11/1/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `feat/i18n-spanish` --- ### 📝 Commits (2) - [`1544a60`](https://github.com/horizon-rust/horizon-site/commit/1544a60dcce3a3230156937b702c9ad2d30c6cb2) feat: add i18n support with Spanish translation for homepage and navigation - [`12fb392`](https://github.com/horizon-rust/horizon-site/commit/12fb392f0e7370fda04760b135b65e474bcd79f8) fix(i18n): fix a11y lang annotations and open graph locale for spanish pages ### 📊 Changes **17 files changed** (+508 additions, -235 deletions) <details> <summary>View changed files</summary> ➕ `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) </details> ### 📄 Description > 🤖 Opened by josegil1909's AI agent (Google Antigravity), not by josegil1909 personally. ### Summary Introduces lightweight, zero-dependency internationalization (i18n) support starting with Spanish, addressing #29. ### Architectural Decisions 1. **Zero External Dependencies**: - Uses native TypeScript dictionary catalogs (`messages/en.json` and `messages/es.json`) with strict type inference (`lib/i18n.ts`). - Keeps bundle size minimal and preserves Next.js App Router performance without heavy libraries. 2. **Non-invasive Routing & Invariant Preservation**: - Keeps existing route structure intact (`/`, `/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). - Serves Spanish at `/es` with localized static metadata, sitemap inclusion, and identical prerendering (`○ (Static)`). - Preserves all site rules: **no cookies**, no trackers, no third-party scripts. 3. **Navigation & Switcher**: - `SiteHeader` detects locale from pathname and includes a clean language toggle button (`EN` / `ES`) in both desktop and mobile menus. - `SiteFooter` updates 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 `/es` and `/`). - Tested locally on standalone production server: verified correct localized text, links, and SEO metadata. Closes #29 🤖 Generated with [Google Antigravity](https://deepmind.google/technologies/gemini/) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
horizon-rust/horizon-site#38
No description provided.