Skip to content

Commit ead95e4

Browse files
sbattenrzhao271deepak1556
authored
Disable passing in locale to Electron on macOS (microsoft#167889) (microsoft#167898)
* Disable passing in locale to Electron on macOS Fixes microsoft#167543 * Update src/main.js Co-authored-by: Robo <[email protected]> * Fix comment and apply PR feedback Co-authored-by: Robo <[email protected]> Co-authored-by: Raymond Zhao <[email protected]> Co-authored-by: Robo <[email protected]>
1 parent 5762c78 commit ead95e4

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

src/main.js

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -100,15 +100,17 @@ if (locale) {
100100
}
101101

102102
// Pass in the locale to Electron so that the
103-
// Windows Control Overlay is rendered correctly on Windows,
104-
// and so that the traffic lights are rendered properly
105-
// on macOS when using a custom titlebar.
103+
// Windows Control Overlay is rendered correctly on Windows.
104+
// For now, don't pass in the locale on macOS due to
105+
// https://github.com/microsoft/vscode/issues/167543.
106106
// If the locale is `qps-ploc`, the Microsoft
107107
// Pseudo Language Language Pack is being used.
108108
// In that case, use `en` as the Electron locale.
109109

110-
const electronLocale = (!locale || locale === 'qps-ploc') ? 'en' : locale;
111-
app.commandLine.appendSwitch('lang', electronLocale);
110+
if (process.platform === 'win32') {
111+
const electronLocale = (!locale || locale === 'qps-ploc') ? 'en' : locale;
112+
app.commandLine.appendSwitch('lang', electronLocale);
113+
}
112114

113115
// Load our code once ready
114116
app.once('ready', function () {

0 commit comments

Comments
 (0)