Skip to content

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

Merged
truthixify merged 4 commits into
wraith-protocol:developfrom
Mubking-dev:my-feature
Jun 29, 2026
Merged

feat(i18n): scaffold react-i18next with Spanish locale baseline#58
truthixify merged 4 commits 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

@Mubking-dev Mubking-dev force-pushed the my-feature branch 2 times, most recently from 17b048d to 9a88de8 Compare June 29, 2026 08:58
@Mubking-dev

Copy link
Copy Markdown
Contributor Author

please merge

@truthixify

Copy link
Copy Markdown
Contributor

After #63 (SEO) just landed, only pnpm-lock.yaml conflict left. Quick rebase:

git fetch origin
git rebase origin/develop
pnpm install
git add pnpm-lock.yaml
git rebase --continue
git push --force-with-lease

@Mubking-dev

Copy link
Copy Markdown
Contributor Author

@truthixify pnpm-lock.yaml conflict resolved

@truthixify

Copy link
Copy Markdown
Contributor

Sorry — Footer.tsx conflict now after #64 (status badge) just landed. Quick rebase:

git fetch origin
git rebase origin/develop
# Footer.tsx: keep develop's status badge + re-apply your t() wrappings
git add src/components/Footer.tsx
git rebase --continue
git push --force-with-lease

@Mubking-dev

Copy link
Copy Markdown
Contributor Author

@truthixify footer conflict resolved

@truthixify

Copy link
Copy Markdown
Contributor

Footer rebase done + clean merge. react-i18next + Spanish locale + lint-i18n script + OG generator + extensive t() wrappings across components. Substantial site-wide i18n landing after multiple rebase rounds. Thanks @Mubking-dev.

@truthixify truthixify merged commit cc977b2 into wraith-protocol:develop Jun 29, 2026
0 of 2 checks passed
@Mubking-dev

Copy link
Copy Markdown
Contributor Author

@truthixify please can i apply for more project in this repo?

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