提交 a5deafe7 编写于 作者: J Joao Moreno

use user-friendly names for extension recommendations

fixes #13888
上级 65b4157f
......@@ -2,7 +2,7 @@
"name": "code-oss-dev",
"version": "1.7.0",
"electronVersion": "1.3.8",
"distro": "b1e023235579beebbb3cc127676cc91cc7f3e823",
"distro": "d919533e6cd6a495abe667cb3d47bc6ac2a4846b",
"author": {
"name": "Microsoft Corporation"
},
......@@ -113,4 +113,4 @@
"windows-mutex": "^0.2.0",
"fsevents": "0.3.8"
}
}
}
\ No newline at end of file
......@@ -25,7 +25,7 @@ export interface IProductConfiguration {
itemUrl: string;
};
extensionTips: { [id: string]: string; };
extensionImportantTips: { [id: string]: string; };
extensionImportantTips: { [id: string]: { name: string; pattern: string; }; };
crashReporter: Electron.CrashReporterStartOptions;
welcomePage: string;
enableTelemetry: boolean;
......
......@@ -26,7 +26,7 @@ export class ExtensionTipsService implements IExtensionTipsService {
private _recommendations: { [id: string]: boolean; } = Object.create(null);
private _availableRecommendations: { [pattern: string]: string[] } = Object.create(null);
private importantRecommendations: { [pattern: string]: string[] };
private importantRecommendations: { [id: string]: { name: string; pattern: string; } };
private importantRecommendationsIgnoreList: string[];
private _disposables: IDisposable[] = [];
......@@ -127,13 +127,13 @@ export class ExtensionTipsService implements IExtensionTipsService {
.filter(id => this.importantRecommendationsIgnoreList.indexOf(id) === -1)
.filter(id => local.every(local => `${local.manifest.publisher}.${local.manifest.name}` !== id))
.forEach(id => {
const pattern = this.importantRecommendations[id];
const { pattern, name } = this.importantRecommendations[id];
if (!match(pattern, uri.fsPath)) {
return;
}
const message = localize('reallyRecommended', "It is recommended to install the '{0}' extension.", id);
const message = localize('reallyRecommended', "It is recommended to install the '{0}' extension.", name);
const recommendationsAction = this.instantiationService.createInstance(ShowRecommendedExtensionsAction, ShowRecommendedExtensionsAction.ID, localize('showRecommendations', "Show Recommendations"));
const options = [
recommendationsAction.label,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册