diff --git a/src/vs/editor/browser/services/openerService.ts b/src/vs/editor/browser/services/openerService.ts index 48cf5fbd4ad3227cbb169e41177da52cc3fb1b44..f732093c32b3cc2145f87fca2b43952571ecb48b 100644 --- a/src/vs/editor/browser/services/openerService.ts +++ b/src/vs/editor/browser/services/openerService.ts @@ -17,6 +17,7 @@ import { LinkedList } from 'vs/base/common/linkedList'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; import { IDialogService } from 'vs/platform/dialogs/common/dialogs'; import { localize } from 'vs/nls'; +import { IProductService } from 'vs/platform/product/common/product'; export class OpenerService implements IOpenerService { @@ -28,7 +29,8 @@ export class OpenerService implements IOpenerService { @ICodeEditorService private readonly _editorService: ICodeEditorService, @ICommandService private readonly _commandService: ICommandService, @IConfigurationService private readonly _configurationService: IConfigurationService, - @IDialogService private readonly _dialogService: IDialogService + @IDialogService private readonly _dialogService: IDialogService, + @IProductService private readonly _productService: IProductService ) { // } @@ -73,7 +75,12 @@ export class OpenerService implements IOpenerService { return this._dialogService.confirm({ title: localize('openExternalLink', 'Open External Link'), type: 'question', - message: localize('openExternalLinkAt', 'Do you want to leave VS Code to open the external website at') + ` ${resource.toString()}?`, + message: localize( + 'openExternalLinkAt', + 'Do you want {0} to open the external website at {1}?', + this._productService.productConfiguration.nameShort, + resource.toString(true) + ), primaryButton: localize('openLink', 'Open Link'), secondaryButton: localize('cancel', 'Cancel'), checkbox: { diff --git a/src/vs/nls.d.ts b/src/vs/nls.d.ts index 38bbd076068b4623623b28afc0be83fc85242c4e..3942ff08669b403bd8f7a77e49b8d8623fde88f0 100644 --- a/src/vs/nls.d.ts +++ b/src/vs/nls.d.ts @@ -8,5 +8,12 @@ export interface ILocalizeInfo { comment: string[]; } +/** + * Localize a message. `message` can contain `{n}` notation where it is replaced by the nth value in `...args`. + */ export declare function localize(info: ILocalizeInfo, message: string, ...args: (string | number | boolean | undefined | null)[]): string; + +/** + * Localize a message. `message` can contain `{n}` notation where it is replaced by the nth value in `...args`. + */ export declare function localize(key: string, message: string, ...args: (string | number | boolean | undefined | null)[]): string;