Repository navigation
feat(web): add i18n runtime with Portuguese translation and language toggle (fixes #35) - #47
Closed
evandroribeiro94 wants to merge 1 commit into
Closed
evandroribeiro94 wants to merge 1 commit into
evandroribeiro94 wants to merge 1 commit into
Conversation
|
Someone is attempting to deploy a commit to the Payroutes OSS Team on Vercel. A member of the Team first needs to authorize it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #35
This PR introduces full internationalization (i18n) to the HackProof web application using
i18nextandreact-i18next, extracting all UI strings into structured message files and addingpt-PTas the first translation alongside English.What was built
i18nextwithinitReactI18nextinapps/web/src/i18n/index.ts.src/i18n/locales/en.jsonandsrc/i18n/locales/pt.json.LanguageTogglecomponent inapps/web/src/components/layout/language-toggle.tsx.useLocalStorageStatehook with Zod validation (hackproof-language).components/layout/site-footer.tsx).apps/web/scripts/check-i18n.mjswhich validates complete key parity between translation locales, checks for empty translations, and scans components for leftover hardcoded strings.check:i18nnpm script toapps/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)