提交 8ebb596b 编写于 作者: P Pine Wu

Address feedbacks

上级 d41ffa21
......@@ -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: {
......
......@@ -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;
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册