Skip to content

feat(i18n): implement internationalization framework and spanish tran…#85

Open
Luchi5544 wants to merge 1 commit into
wraith-protocol:developfrom
Luchi5544:feat/i18n-react-i18next
Open

feat(i18n): implement internationalization framework and spanish tran…#85
Luchi5544 wants to merge 1 commit into
wraith-protocol:developfrom
Luchi5544:feat/i18n-react-i18next

Conversation

@Luchi5544

Copy link
Copy Markdown

closes #70

Description

This PR integrates a robust internationalization framework into the Wraith Protocol Demo app using react-i18next and i18next-browser-languagedetector. It extracts all hardcoded user-visible text into translation dictionaries, introduces a locale switcher in the header, and implements persistent preferences.

Key Changes

  • Framework Initialization: Set up react-i18next with browser language detection (src/i18n/index.ts).
  • Locale Switcher Component: Created LocaleSwitcher (src/components/LocaleSwitcher.tsx) that changes languages via react-i18next and persists the selection in localStorage under the key wraith-locale.
  • UI Integration: Added the LocaleSwitcher dropdown to the header right next to the chain switcher.
  • String Extraction: Replaced all user-visible strings inside components (e.g. CkbReceive, CkbSend, SolanaReceive, SolanaSend, StellarReceive, StellarSend, HorizenReceive, HorizenSend, WalletConnect, etc.) with t() function hooks.
  • Dictionaries:
    • src/i18n/en.json: All original English strings.
    • src/i18n/es.json: Full Spanish translations matching all keys.
  • Dependency Configuration: Added a local pnpm-workspace.yaml and .npmrc to ensure node-gyp packages (like keccak, secp256k1, esbuild) can build non-interactively in standard CI/CD and developer environments.

Verification Results

  • Ran npx pnpm format to format code style constraints.
  • Ran npx pnpm run build which successfully ran type checking tsc --noEmit and Vite production bundling with 0 warnings or errors.

@vercel

vercel Bot commented Jun 24, 2026

Copy link
Copy Markdown

@Luchi5544 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 24, 2026

Copy link
Copy Markdown

@Luchi5544 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 truthixify changed the base branch from main to develop June 24, 2026 14:49
@truthixify

Copy link
Copy Markdown
Contributor

i18n scaffolding + Spanish locale + LocaleSwitcher + instrumenting all chain components looks right. 5 conflicts to resolve:

git fetch origin
git rebase origin/develop
git push --force-with-lease

For each conflicted file, keep develop's structure (it has more recent work) and re-apply your t() call replacements on top. The i18n config and the JSON files land clean.

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.

Multilingual support (Spanish for LATAM)

2 participants