fix: i18n requests locale files that don't exist on disk - #1423
fix: i18n requests locale files that don't exist on disk#1423xtantaudio wants to merge 1 commit into
Conversation
|
Someone is attempting to deploy a commit to the Meshtastic Team on Vercel. A member of the Team first needs to authorize it. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (4)
Included review availability: Your plan provides up to 4 included reviews per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe PR derives i18n fallbacks from shipped locale folders, centralizes initialization options, validates locale loading against disk files, and updates ChangesLocale resolution
Estimated code review effort: 3 (Moderate) | ~20 minutes Merge Risk: ⚪ Minimal · up to The change normalizes browser locale variants to the shipped translation folders, preventing failed locale requests without changing broader application behavior. No actionable merge-blocking risk remains beyond normal checks and review. Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
e834c49 to
e1e9daf
Compare
The browser's reported locale (e.g. en-US) was interpolated directly into the translation file request path, but the shipped locale files only exist under the base language code (en), not the full regional variant. Every page load produced 11 404s for missing translation JSON files. Normalized the requested locale to match what's actually shipped before the i18next backend fetches it. Verified: page load now produces zero 404 requests for locale files.
e1e9daf to
c493736
Compare
Problem
The browser's reported locale (e.g.
en-US) is interpolated directly into the translation file request path, but the shipped locale files only exist under the base language code (en), not the full regional variant. Every page load produces 11 404s for missing translation JSON files.Fix
Normalized the requested locale to match what's actually shipped before the i18next backend fetches it.
Verification
Verified page load now produces zero 404 requests for locale files, tested against multiple browser-reported locale variants.
Summary by CodeRabbit
Bug Fixes
en-US.Tests