From 5d9d2123ec787b66dd5ccdd3ca9553b367e707db Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Mon, 25 Sep 2023 16:24:46 +0200 Subject: [PATCH] better phrasing of extensions in prompts (#193990) --- .../api/browser/mainThreadExtensionService.ts | 2 +- .../services/extensions/browser/extensionUrlHandler.ts | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/vs/workbench/api/browser/mainThreadExtensionService.ts b/src/vs/workbench/api/browser/mainThreadExtensionService.ts index cbddc0c233b..b95542aab51 100644 --- a/src/vs/workbench/api/browser/mainThreadExtensionService.ts +++ b/src/vs/workbench/api/browser/mainThreadExtensionService.ts @@ -168,7 +168,7 @@ export class MainThreadExtensionService implements MainThreadExtensionServiceSha if (dependencyExtension) { this._notificationService.notify({ severity: Severity.Error, - message: localize('uninstalledDep', "Cannot activate the '{0}' extension because it depends on the '{1}' extension, which is not installed. Would you like to install the extension and reload the window?", extName, dependencyExtension.displayName), + message: localize('uninstalledDep', "Cannot activate the '{0}' extension because it depends on the extension '{1}' from '{2}', which is not installed. Would you like to install the extension and reload the window?", extName, dependencyExtension.displayName, dependencyExtension.publisherDisplayName), actions: { primary: [new Action('install', localize('install missing dep', "Install and Reload"), '', true, () => this._extensionsWorkbenchService.install(dependencyExtension!) diff --git a/src/vs/workbench/services/extensions/browser/extensionUrlHandler.ts b/src/vs/workbench/services/extensions/browser/extensionUrlHandler.ts index 89afd43ec70..6004d19d518 100644 --- a/src/vs/workbench/services/extensions/browser/extensionUrlHandler.ts +++ b/src/vs/workbench/services/extensions/browser/extensionUrlHandler.ts @@ -159,7 +159,7 @@ class ExtensionUrlHandler implements IExtensionUrlHandler, IURLHandler { await this.handleUnhandledURL(uri, { id: extensionId }, options); return true; } else { - extensionDisplayName = extension.displayName || extension.name; + extensionDisplayName = extension.displayName ?? ''; } } else { extensionDisplayName = initialHandler.extensionDisplayName; @@ -177,11 +177,11 @@ class ExtensionUrlHandler implements IExtensionUrlHandler, IURLHandler { } const result = await this.dialogService.confirm({ - message: localize('confirmUrl', "Allow an extension to open this URI?", extensionId), + message: localize('confirmUrl', "Allow '{0}' extension to open this URI?", extensionDisplayName), checkbox: { label: localize('rememberConfirmUrl', "Don't ask again for this extension."), }, - detail: `${extensionDisplayName} (${extensionId}) wants to open a URI:\n\n${uriString}`, + detail: uriString, primaryButton: localize({ key: 'open', comment: ['&& denotes a mnemonic'] }, "&&Open") }); @@ -267,8 +267,8 @@ class ExtensionUrlHandler implements IExtensionUrlHandler, IURLHandler { // Install the Extension and reload the window to handle. const result = await this.dialogService.confirm({ - message: localize('installAndHandle', "Extension '{0}' is not installed. Would you like to install the extension and open this URL?", galleryExtension.displayName || galleryExtension.name), - detail: `${galleryExtension.displayName || galleryExtension.name} (${extensionIdentifier.id}) wants to open a URL:\n\n${uri.toString()}`, + message: localize('installAndHandle', "Would you like to install '{0}' extension from '{1}' to open this URI?", galleryExtension.displayName, galleryExtension.publisherDisplayName), + detail: `${localize('installDetail', "'{0}' extension wants to open a URI:", galleryExtension.displayName)}\n\n${uri.toString()}`, primaryButton: localize({ key: 'install and open', comment: ['&& denotes a mnemonic'] }, "&&Install and Open") });