From 15605b7f6ccceb0d398e0ccd45b2870a53ca98ca Mon Sep 17 00:00:00 2001 From: Tyler James Leonhardt Date: Fri, 30 Dec 2022 14:48:53 -0500 Subject: [PATCH] Ensure Install & Restart sets locale (#170302) Fixes #167540 --- .../electron-sandbox/localization.contribution.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/vs/workbench/contrib/localization/electron-sandbox/localization.contribution.ts b/src/vs/workbench/contrib/localization/electron-sandbox/localization.contribution.ts index 9cc0a15f0b53a..6a944aa9b1586 100644 --- a/src/vs/workbench/contrib/localization/electron-sandbox/localization.contribution.ts +++ b/src/vs/workbench/contrib/localization/electron-sandbox/localization.contribution.ts @@ -173,9 +173,11 @@ export class LocalizationWorkbenchContribution extends Disposable implements IWo const installAndRestartAction = { label: translations['installAndRestart'], - run: () => { + run: async () => { logUserReaction('installAndRestart'); - this.installExtension(extensionToInstall!).then(() => this.hostService.restart()); + await this.installExtension(extensionToInstall!); + await this.jsonEditingService.write(this.environmentService.argvResource, [{ path: ['locale'], value: locale }], true); + await this.hostService.restart(); } };