Pass renderer locale to exthost, fixes #85675 (#141095)

* Pass renderer locale to exthost, fixes #85675

* Restrict fix to macOS
This commit is contained in:
Raymond Zhao 2022-02-03 10:23:59 -08:00 committed by GitHub
parent 571a3c3a55
commit 0233e80d64
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -212,6 +212,11 @@ export class LocalProcessExtensionHost implements IExtensionHost {
this._extensionHostProcess = new ExtensionHostProcess(extensionHostCreationResult.id, this._extensionHostStarter);
let lang = processEnv['LANG'];
if (platform.isMacintosh && lang === undefined) {
lang = Intl.DateTimeFormat().resolvedOptions().locale;
}
const env = objects.mixin(processEnv, {
VSCODE_AMD_ENTRYPOINT: 'vs/workbench/api/node/extensionHostProcess',
VSCODE_PIPE_LOGGING: 'true',
@ -219,7 +224,8 @@ export class LocalProcessExtensionHost implements IExtensionHost {
VSCODE_LOG_NATIVE: this._isExtensionDevHost,
VSCODE_IPC_HOOK_EXTHOST: pipeName,
VSCODE_HANDLES_UNCAUGHT_ERRORS: true,
VSCODE_LOG_STACK: !this._isExtensionDevTestFromCli && (this._isExtensionDevHost || !this._environmentService.isBuilt || this._productService.quality !== 'stable' || this._environmentService.verbose)
VSCODE_LOG_STACK: !this._isExtensionDevTestFromCli && (this._isExtensionDevHost || !this._environmentService.isBuilt || this._productService.quality !== 'stable' || this._environmentService.verbose),
'LANG': lang
});
if (this._environmentService.debugExtensionHost.env) {