Fix incorrect system language#4519
Conversation
Ensure method exits immediately after finding a matching language code to prevent unnecessary checks and potential overwriting of SystemLanguageCode.
There was a problem hiding this comment.
Pull request overview
Fixes the startup language selection when the user chooses “System” by preventing the detected system language code from being overwritten with the default language after a successful match.
Changes:
- Exit early from
InitSystemLanguageCode()once a matching system language is found, preserving the matched language code. - Keep the default fallback (
en) only for the no-match case.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughA single-line change adds an early return statement to the ChangesSystem Language Code Initialization
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~5 minutes Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 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.
1 issue found across 1 file
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
DavidGBrett
left a comment
There was a problem hiding this comment.
LGTM!
Thank you for the fix!
Fix #4518
Summary by cubic
Ensure system language detection stops on the first match to prevent overwriting and select the correct language. Fixes incorrect language selection in some cases (issue #4518).
Summary of changes
Release Note
Fixes a bug that could set the app to the wrong language on startup.
Written for commit 9721804. Summary will update on new commits.