From cfa7e8b8f7716280d3a7a524a5f53d8cd97a510a Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Tue, 17 Dec 2024 09:42:37 +0100 Subject: [PATCH] wording --- src/vs/workbench/api/browser/mainThreadCustomEditors.ts | 2 +- .../contrib/customEditor/common/customTextEditorModel.ts | 2 +- ...xtensionEnablementWorkspaceTrustTransitionParticipant.ts | 2 +- .../extensions/browser/extensionsWorkbenchService.ts | 2 +- .../contrib/notebook/common/notebookEditorInput.ts | 4 ++-- .../contrib/relauncher/browser/relauncher.contribution.ts | 2 +- .../services/extensions/common/abstractExtensionService.ts | 6 +++--- .../extensions/electron-sandbox/nativeExtensionService.ts | 2 +- .../userDataProfile/browser/userDataProfileManagement.ts | 2 +- .../workspaces/electron-sandbox/workspaceEditingService.ts | 2 +- 10 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/vs/workbench/api/browser/mainThreadCustomEditors.ts b/src/vs/workbench/api/browser/mainThreadCustomEditors.ts index 4fb33a99f168b..b2747586df68a 100644 --- a/src/vs/workbench/api/browser/mainThreadCustomEditors.ts +++ b/src/vs/workbench/api/browser/mainThreadCustomEditors.ts @@ -389,7 +389,7 @@ class MainThreadCustomEditorModel extends ResourceWorkingCopy implements ICustom this._register(workingCopyService.registerWorkingCopy(this)); this._register(extensionService.onWillStop(e => { - e.veto(true, localize('vetoExtHostRestart', "A custom editor for '{0}' is open.", this.name)); + e.veto(true, localize('vetoExtHostRestart', "An extension provided editor for '{0}' is still open.", this.name)); })); } diff --git a/src/vs/workbench/contrib/customEditor/common/customTextEditorModel.ts b/src/vs/workbench/contrib/customEditor/common/customTextEditorModel.ts index 0ca157683f9db..67f2374b26d5a 100644 --- a/src/vs/workbench/contrib/customEditor/common/customTextEditorModel.ts +++ b/src/vs/workbench/contrib/customEditor/common/customTextEditorModel.ts @@ -66,7 +66,7 @@ export class CustomTextEditorModel extends Disposable implements ICustomEditorMo })); this._register(extensionService.onWillStop(e => { - e.veto(true, localize('vetoExtHostRestart', "A custom text editor for '{0}' is open.", this.resource.path)); + e.veto(true, localize('vetoExtHostRestart', "An extension provided text editor for '{0}' is still open.", this.name)); })); } diff --git a/src/vs/workbench/contrib/extensions/browser/extensionEnablementWorkspaceTrustTransitionParticipant.ts b/src/vs/workbench/contrib/extensions/browser/extensionEnablementWorkspaceTrustTransitionParticipant.ts index 55de158e6b8f0..47065f253b469 100644 --- a/src/vs/workbench/contrib/extensions/browser/extensionEnablementWorkspaceTrustTransitionParticipant.ts +++ b/src/vs/workbench/contrib/extensions/browser/extensionEnablementWorkspaceTrustTransitionParticipant.ts @@ -39,7 +39,7 @@ export class ExtensionEnablementWorkspaceTrustTransitionParticipant extends Disp if (environmentService.remoteAuthority) { hostService.reload(); } else { - const stopped = await extensionService.stopExtensionHosts(localize('restartExtensionHost.reason', "Restarting extension host due to workspace trust change.")); + const stopped = await extensionService.stopExtensionHosts(localize('restartExtensionHost.reason', "Changing workspace trust")); await extensionEnablementService.updateExtensionsEnablementsWhenWorkspaceTrustChanges(); if (stopped) { extensionService.startExtensionHosts(); diff --git a/src/vs/workbench/contrib/extensions/browser/extensionsWorkbenchService.ts b/src/vs/workbench/contrib/extensions/browser/extensionsWorkbenchService.ts index 1a28f0027eec6..ae7df7d09b38c 100644 --- a/src/vs/workbench/contrib/extensions/browser/extensionsWorkbenchService.ts +++ b/src/vs/workbench/contrib/extensions/browser/extensionsWorkbenchService.ts @@ -1585,7 +1585,7 @@ export class ExtensionsWorkbenchService extends Disposable implements IExtension } if (toAdd.length || toRemove.length) { - if (await this.extensionService.stopExtensionHosts(nls.localize('restart', "Enable or Disable extensions"), auto)) { + if (await this.extensionService.stopExtensionHosts(nls.localize('restart', "Changing extension enablement"), auto)) { await this.extensionService.startExtensionHosts({ toAdd, toRemove }); if (auto) { this.notificationService.notify({ diff --git a/src/vs/workbench/contrib/notebook/common/notebookEditorInput.ts b/src/vs/workbench/contrib/notebook/common/notebookEditorInput.ts index 92c066a28e7b6..06cff10fb6405 100644 --- a/src/vs/workbench/contrib/notebook/common/notebookEditorInput.ts +++ b/src/vs/workbench/contrib/notebook/common/notebookEditorInput.ts @@ -91,8 +91,8 @@ export class NotebookEditorInput extends AbstractResourceEditorInput { } const reason = e.auto - ? localize('vetoAutoExtHostRestart', "One of the opened editors is a notebook editor.") - : localize('vetoExtHostRestart', "Notebook '{0}' could not be saved.", this.resource.path); + ? localize('vetoAutoExtHostRestart', "An extension provided notebook for '{0}' is still open.", this.getName()) + : localize('vetoExtHostRestart', "An extension provided notebook for '{0}' could not be saved.", this.getName()); e.veto((async () => { const editors = editorService.findEditors(this); diff --git a/src/vs/workbench/contrib/relauncher/browser/relauncher.contribution.ts b/src/vs/workbench/contrib/relauncher/browser/relauncher.contribution.ts index 3cb188be749bf..54b2cff5b80ca 100644 --- a/src/vs/workbench/contrib/relauncher/browser/relauncher.contribution.ts +++ b/src/vs/workbench/contrib/relauncher/browser/relauncher.contribution.ts @@ -224,7 +224,7 @@ export class WorkspaceChangeExtHostRelauncher extends Disposable implements IWor if (environmentService.remoteAuthority) { hostService.reload(); // TODO@aeschli, workaround } else if (isNative) { - const stopped = await extensionService.stopExtensionHosts(localize('restartExtensionHost.reason', "Restarting extension host due to a workspace folder change.")); + const stopped = await extensionService.stopExtensionHosts(localize('restartExtensionHost.reason', "Changing workspace folders")); if (stopped) { extensionService.startExtensionHosts(); } diff --git a/src/vs/workbench/services/extensions/common/abstractExtensionService.ts b/src/vs/workbench/services/extensions/common/abstractExtensionService.ts index f958af6df1717..f313c221ad3fe 100644 --- a/src/vs/workbench/services/extensions/common/abstractExtensionService.ts +++ b/src/vs/workbench/services/extensions/common/abstractExtensionService.ts @@ -765,10 +765,10 @@ export abstract class AbstractExtensionService extends Disposable implements IEx let overrideVeto = false; await this._dialogService.prompt({ type: Severity.Warning, - message: nls.localize('extensionStopVetoMessage', "The following operation was blocked: {0}", reason), + message: nls.localize('extensionStopVetoMessage', "Extension restart was prevented but is required for: {0}. Do you want to proceed anyways?", reason), detail: vetoReasonsArray.length === 1 ? - nls.localize('extensionStopVetoDetailsOne', "The reason for blocking the operation: {0}", vetoReasonsArray[0]) : - nls.localize('extensionStopVetoDetailsMany', "The reasons for blocking the operation:\n- {0}", vetoReasonsArray.join('\n -')), + nls.localize('extensionStopVetoDetailsOne', "Reason: {0}", vetoReasonsArray[0]) : + nls.localize('extensionStopVetoDetailsMany', "Reasons:\n- {0}", vetoReasonsArray.join('\n -')), buttons: [ { label: nls.localize('ok', "OK"), diff --git a/src/vs/workbench/services/extensions/electron-sandbox/nativeExtensionService.ts b/src/vs/workbench/services/extensions/electron-sandbox/nativeExtensionService.ts index 8adc7c19fe7a9..33eabcc36ddf6 100644 --- a/src/vs/workbench/services/extensions/electron-sandbox/nativeExtensionService.ts +++ b/src/vs/workbench/services/extensions/electron-sandbox/nativeExtensionService.ts @@ -742,7 +742,7 @@ class RestartExtensionHostAction extends Action2 { async run(accessor: ServicesAccessor): Promise { const extensionService = accessor.get(IExtensionService); - const stopped = await extensionService.stopExtensionHosts(nls.localize('restartExtensionHost.reason', "Restarting extension host on explicit request.")); + const stopped = await extensionService.stopExtensionHosts(nls.localize('restartExtensionHost.reason', "An explicit request")); if (stopped) { extensionService.startExtensionHosts(); } diff --git a/src/vs/workbench/services/userDataProfile/browser/userDataProfileManagement.ts b/src/vs/workbench/services/userDataProfile/browser/userDataProfileManagement.ts index 88b466660775c..e4b29d57e5395 100644 --- a/src/vs/workbench/services/userDataProfile/browser/userDataProfileManagement.ts +++ b/src/vs/workbench/services/userDataProfile/browser/userDataProfileManagement.ts @@ -198,7 +198,7 @@ export class UserDataProfileManagementService extends Disposable implements IUse if (shouldRestartExtensionHosts) { if (!isRemoteWindow) { - if (!(await this.extensionService.stopExtensionHosts(localize('switch profile', "Switching to a profile.")))) { + if (!(await this.extensionService.stopExtensionHosts(localize('switch profile', "Switching to a profile")))) { // If extension host did not stop, do not switch profile if (this.userDataProfilesService.profiles.some(p => p.id === this.userDataProfileService.currentProfile.id)) { await this.userDataProfilesService.setProfileForWorkspace(toWorkspaceIdentifier(this.workspaceContextService.getWorkspace()), this.userDataProfileService.currentProfile); diff --git a/src/vs/workbench/services/workspaces/electron-sandbox/workspaceEditingService.ts b/src/vs/workbench/services/workspaces/electron-sandbox/workspaceEditingService.ts index 625f69f60b94c..c285804f40a6d 100644 --- a/src/vs/workbench/services/workspaces/electron-sandbox/workspaceEditingService.ts +++ b/src/vs/workbench/services/workspaces/electron-sandbox/workspaceEditingService.ts @@ -174,7 +174,7 @@ export class NativeWorkspaceEditingService extends AbstractWorkspaceEditingServi } async enterWorkspace(workspaceUri: URI): Promise { - const stopped = await this.extensionService.stopExtensionHosts(localize('restartExtensionHost.reason', "Opening a multi-root workspace.")); + const stopped = await this.extensionService.stopExtensionHosts(localize('restartExtensionHost.reason', "Opening a multi-root workspace")); if (!stopped) { return; }