Skip to content

Commit

Permalink
Fix terminal locale handling (#169072)
Browse files Browse the repository at this point in the history
Switch back to using app.getLocale()
  • Loading branch information
rzhao271 authored Dec 14, 2022
1 parent baea24b commit 1ad8d51
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -580,11 +580,11 @@ async function resolveNlsConfiguration() {
// VS Code moves to Electron 22.
// Ref https://github.com/microsoft/vscode/issues/159813
// and https://github.com/electron/electron/pull/36035
if ('getPreferredSystemLanguages' in app
&& typeof app.getPreferredSystemLanguages === 'function'
&& app.getPreferredSystemLanguages().length) {
appLocale = app.getPreferredSystemLanguages()[0];
}
// if ('getPreferredSystemLanguages' in app
// && typeof app.getPreferredSystemLanguages === 'function'
// && app.getPreferredSystemLanguages().length) {
// appLocale = app.getPreferredSystemLanguages()[0];
// }
if (!appLocale) {
nlsConfiguration = { locale: 'en', availableLanguages: {} };
} else {
Expand Down

2 comments on commit 1ad8d51

@shurkabes
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMG_20221214_235814_255

@LukaHietala
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMG_20221214_235814_255

So TikTok advertising on Github... Great!

Please sign in to comment.