New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add app.getSystemLocale() method #35697
feat: add app.getSystemLocale() method #35697
Conversation
e48afc1
to
f28d1c2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Love it.
API LGTM
f8677e4
to
7de0965
Compare
Co-authored-by: Charles Kerr <charles@charleskerr.com>
6811bba
to
5441c9e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM pending API review and some minor style changes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
API LGTM.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
impl looks fine.
Deferring to @deepak1556's better wisdom on the macOS string underscores vs dashes, since I didn't know about that issue. Looks like the new test code ensures the values are hyphenated 👍
1d49ce6
to
3f13ff3
Compare
API LGTM |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
API LGTM
Release Notes Persisted
|
I have automatically backported this PR to "21-x-y", please check out #35794 |
* feat: add app.getSystemLocale() method * Update shell/browser/electron_browser_main_parts.cc Co-authored-by: Charles Kerr <charles@charleskerr.com> * Change methods to be const * Apply PR feedback * Fix mac compile * Add missing scope * Apply style changes * Change note * Add braces to get the comment indentation right * Change to static * Apply PR feedback * Fix the documentation * Remove extraneous file Co-authored-by: Charles Kerr <charles@charleskerr.com>
Description of Change
This PR adds a method to fetch the OS locale from Chromium. That way, even when the application is in a certain locale, the program can still know the system locale and make recommendations based off of that.
Downstream: microsoft/vscode#159813 and PR microsoft/vscode#159958.
CC @deepak1556
Checklist
npm test
passesRelease Notes
Notes: Added
app.getSystemLocale()
method.