feat(i18n): wire locale switcher, verify translations, and add CI check#41
feat(i18n): wire locale switcher, verify translations, and add CI check#41legend4tech wants to merge 2 commits into
Conversation
ogazboiz
left a comment
There was a problem hiding this comment.
this is good work, the locale switcher actually works (reads locale from useParams, routes by swapping the locale segment, correct for next-intl localePrefix always), you dropped the fake fr/pt/hi languages so the switcher list (en/es/tl) now matches middleware.ts, the tl.json translations are filled in, check-locales.js passes, and the ci.yml is valid. one fix before merge:
- prettier (the lint gate) fails on the 2 new files. run: npx prettier --write .github/workflows/ci.yml scripts/check-locales.js then commit.
heads up: the CI check you added only runs check-locales, not prettier/tsc, so it won't self-catch formatting, the repo npm run lint gate will. fix the prettier and i'll merge.
if you want to keep contributing, join us on Telegram: https://t.me/+DOylgFv1jyJlNzM0
Done u can merge |
Description
This PR resolves the outstanding internationalization (i18n) issues by wiring up the locale switcher, fixing missing translations, and introducing CI safeguards to prevent future locale drift.
What's Changed
es.jsonandtl.jsonand found 15 keys holding English copy (e.g. "Asset", "Liquidated", "Dashboard"). These have all been accurately translated to Spanish and Tagalog.next-intlnavigation hooks. Changing the language now actively updates the URL locale segment (e.g.,/en/settings->/es/settings) and naturally persists the choice via cookies.scripts/check-locales.jsto rigorously flatten and compare every JSON key againsten.json.npm run check-localesscript topackage.json..github/workflows/ci.ymlto automatically run this parity check on pushes and PRs tomain, ensuring no keys are ever missed or orphaned during development.Out of Scope
esandtl.Checklist
npm run check-localespasses without errors.closes #7