Conversation
Prepare for adding
📝 WalkthroughWalkthroughThis pull request updates language code mappings and locale metadata by modifying the Google Translate language mappings and adding support for three new locales (Catalan, Italian, Latin American Spanish) while reorganizing contributor attribution lists. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@src/common/GoogleTranslate.ts`:
- Line 22: The GOOGLE_LANGUAGE_MAP contains a mixed-case key "fr-FR" that
doesn't match how locales are looked up (the code lowercases the stored locale
before indexing GOOGLE_LANGUAGE_MAP), causing French to fall back to English;
update the map key to the lowercase form "fr-fr" (and audit other entries for
consistent lowercasing) so that the lookup in the code that lowercases locales
correctly finds the French mapping.
In `@src/locales/languages.ts`:
- Around line 148-153: The languages map adds "es-latam" but the locale
resolution currently falls back to the first "es*" key (currently "es-es")
because exact browser subtags like "es-MX", "es-AR", "es-419" don't match;
update the locale resolution to map those regional subtags to "es-latam" or
extend the fallback logic so getBrowserLocale / the languages lookup prefers
specific region matches (e.g., check full locale, then explicit alias map for
["es-MX","es-AR","es-419"] -> "es-latam", then generic "es") and ensure the code
that iterates es* keys (referenced near the existing selection at line ~216)
uses this alias map.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 8e451cbc-f999-4f22-b8cb-a25bb4b91480
📒 Files selected for processing (5)
src/common/GoogleTranslate.tssrc/locales/languages.tssrc/locales/list/ca-ca.jsonsrc/locales/list/es-latam.jsonsrc/locales/list/it-it.json
What does this PR do?
Screenshots
Did you test your code?
Yes, apart from message translation
Checklist
Summary by CodeRabbit