Skip to content

Commit 70348b0

Browse files
authored
1 parent c6f507d commit 70348b0

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/vs/workbench/contrib/extensions/browser/extensionRecommendationNotificationService.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ type ExtensionWorkspaceRecommendationsNotificationClassification = {
4141

4242
const ignoreImportantExtensionRecommendationStorageKey = 'extensionsAssistant/importantRecommendationsIgnore';
4343
const donotShowWorkspaceRecommendationsStorageKey = 'extensionsAssistant/workspaceRecommendationsIgnore';
44-
const choiceNever = localize('neverShowAgain', "Don't Show Again");
4544

4645
type RecommendationsNotificationActions = {
4746
onDidInstallRecommendedExtensions(extensions: IExtension[]): void;
@@ -258,14 +257,17 @@ export class ExtensionRecommendationNotificationService extends Disposable imple
258257
searchValue = source === RecommendationSource.WORKSPACE ? '@recommended' : extensions.map(extensionId => `@id:${extensionId.identifier.id}`).join(' ');
259258
}
260259

260+
const donotShowAgainLabel = source === RecommendationSource.WORKSPACE ? localize('donotShowAgain', "Don't Show Again for this Repository")
261+
: extensions.length > 1 ? localize('donotShowAgainExtension', "Don't Show Again for these Extensions") : localize('donotShowAgainExtensionSingle', "Don't Show Again for this Extension");
262+
261263
return raceCancellablePromises([
262-
this._registerP(this.showRecommendationsNotification(extensions, message, searchValue, source, recommendationsNotificationActions)),
264+
this._registerP(this.showRecommendationsNotification(extensions, message, searchValue, donotShowAgainLabel, source, recommendationsNotificationActions)),
263265
this._registerP(this.waitUntilRecommendationsAreInstalled(extensions))
264266
]);
265267

266268
}
267269

268-
private showRecommendationsNotification(extensions: IExtension[], message: string, searchValue: string, source: RecommendationSource,
270+
private showRecommendationsNotification(extensions: IExtension[], message: string, searchValue: string, donotShowAgainLabel: string, source: RecommendationSource,
269271
{ onDidInstallRecommendedExtensions, onDidShowRecommendedExtensions, onDidCancelRecommendedExtensions, onDidNeverShowRecommendedExtensionsAgain }: RecommendationsNotificationActions): CancelablePromise<RecommendationsNotificationResult> {
270272
return createCancelablePromise<RecommendationsNotificationResult>(async token => {
271273
let accepted = false;
@@ -296,7 +298,7 @@ export class ExtensionRecommendationNotificationService extends Disposable imple
296298
this.runAction(this.instantiationService.createInstance(SearchExtensionsAction, searchValue));
297299
}
298300
}, {
299-
label: choiceNever,
301+
label: donotShowAgainLabel,
300302
isSecondary: true,
301303
run: () => {
302304
onDidNeverShowRecommendedExtensionsAgain(extensions);

0 commit comments

Comments
 (0)