Skip to content

feat(i18n): scaffold react-i18next with Spanish locale baseline#58

Open
Mubking-dev wants to merge 1 commit into
wraith-protocol:developfrom
Mubking-dev:my-feature
Open

feat(i18n): scaffold react-i18next with Spanish locale baseline#58
Mubking-dev wants to merge 1 commit into
wraith-protocol:developfrom
Mubking-dev:my-feature

Conversation

@Mubking-dev

Copy link
Copy Markdown
Contributor

Summary

Closes #27

Scaffolds full i18n support using react-i18next, with Spanish as the first non-English locale.

Changes

  • src/i18n/en.json — English translation source for all UI strings
  • src/i18n/es.json — Spanish baseline (full structural parity with EN)
  • src/i18n/index.ts — locale detection via localStoragenavigator.language'en'
  • src/main.tsx — imports i18n config before React renders
  • src/components/*.tsx (×9) — all visible strings wrapped in t()
  • src/components/Header.tsx — EN ↔ ES switcher added next to theme toggle
  • scripts/lint-i18n.mjs — CI script; exits 1 if hardcoded JSX strings found
  • scripts/generate-og.mjs — post-build; emits dist/en/ and dist/es/ with locale-specific OG/meta tags
  • package.json — added lint:i18n and generate:og scripts
  • .github/workflows/ci.ymlpnpm lint:i18n runs before build on every push

Acceptance criteria

  • All visible strings extracted
  • en.json + es.json complete
  • Locale switcher present (Header, next to theme toggle)
  • localStorage persistence + navigator.language default
  • CI lint catches hardcoded strings
  • Per-locale OG images (dist/en/ and dist/es/)

Testing

pnpm dev          # visit localhost:5173, toggle EN ↔ ES in header
pnpm lint:i18n    # should print: no hardcoded JSX strings found in 10 component(s)
pnpm build && node scripts/generate-og.mjs  # check dist/en/ and dist/es/

@vercel

vercel Bot commented Jun 27, 2026

Copy link
Copy Markdown

@mubking is attempting to deploy a commit to the truthixify's projects Team on Vercel.

A member of the Team first needs to authorize it.

@drips-wave

drips-wave Bot commented Jun 27, 2026

Copy link
Copy Markdown

@Mubking-dev Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@truthixify

Copy link
Copy Markdown
Contributor

After #59 (OG generator) just landed alongside this one, conflicts on pnpm-lock.yaml and src/components/Hero.tsx. Quick rebase:

git fetch origin
git rebase origin/develop
pnpm install  # regenerates lockfile with both your i18n deps + OG deps
# Hero.tsx: keep develop's <head> additions, then re-apply your t() wrappings
git add -u
git rebase --continue
git push --force-with-lease

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.

i18n scaffolding + Spanish locale baseline

3 participants