Skip to content

Commit

Permalink
wording
Browse files Browse the repository at this point in the history
  • Loading branch information
bpasero committed Dec 17, 2024
1 parent 1e00dd9 commit cfa7e8b
Show file tree
Hide file tree
Showing 10 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion src/vs/workbench/api/browser/mainThreadCustomEditors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -742,7 +742,7 @@ class RestartExtensionHostAction extends Action2 {
async run(accessor: ServicesAccessor): Promise<void> {
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();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ export class NativeWorkspaceEditingService extends AbstractWorkspaceEditingServi
}

async enterWorkspace(workspaceUri: URI): Promise<void> {
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;
}
Expand Down

0 comments on commit cfa7e8b

Please sign in to comment.