Skip to content

feat(web): add i18n runtime with Portuguese translation and language toggle (fixes #35) - #47

Closed
evandroribeiro94 wants to merge 1 commit into
devodii:mainfrom
evandroribeiro94:feat/issue-35-portuguese-translation
Closed

evandroribeiro94 wants to merge 1 commit into
devodii:mainfrom
evandroribeiro94:feat/issue-35-portuguese-translation

Conversation

@evandroribeiro94

Copy link
Copy Markdown

Summary

Fixes #35

This PR introduces full internationalization (i18n) to the HackProof web application using i18next and react-i18next, extracting all UI strings into structured message files and adding pt-PT as the first translation alongside English.

What was built

  1. i18n Runtime:
    • Initialized i18next with initReactI18next in apps/web/src/i18n/index.ts.
    • Extracted 103 distinct UI strings across all pages and components into src/i18n/locales/en.json and src/i18n/locales/pt.json.
    • Excluded raw project descriptions and AI chat completions as requested by the specification.
  2. Language Toggle:
    • Built LanguageToggle component in apps/web/src/components/layout/language-toggle.tsx.
    • Persists language selection in local storage via the existing useLocalStorageState hook with Zod validation (hackproof-language).
    • Integrated toggle into the footer (components/layout/site-footer.tsx).
    • Switching language dynamically updates the entire application without requiring a page reload.
  3. CI Check:
    • Created apps/web/scripts/check-i18n.mjs which validates complete key parity between translation locales, checks for empty translations, and scans components for leftover hardcoded strings.
    • Added check:i18n npm script to apps/web/package.json.

Verification

  • pnpm run check:i18n -> PASS (103 translation keys verified with zero missing keys)
  • tsc -b && vite build -> PASS (Clean build in 1.47s)
  • oxlint -> PASS (0 errors)

@vercel

vercel Bot commented Oct 31, 2026

Copy link
Copy Markdown

Someone is attempting to deploy a commit to the Payroutes OSS Team on Vercel.

A member of the Team first needs to authorize it.

@devodii devodii closed this Nov 1, 2026
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.

Portuguese translation of the UI

2 participants