-
Notifications
You must be signed in to change notification settings - Fork 27.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Announce results of extension search #59128
Conversation
@@ -69,6 +70,18 @@ const SearchBuiltInExtensionsContext = new RawContextKey<boolean>('searchBuiltIn | |||
const RecommendedExtensionsContext = new RawContextKey<boolean>('recommendedExtensions', false); | |||
const DefaultRecommendedExtensionsContext = new RawContextKey<boolean>('defaultRecommendedExtensions', false); | |||
const GroupByServersContext = new RawContextKey<boolean>('groupByServersContext', false); | |||
const viewIdNameMappings: { [id: string]: string } = { | |||
'extensions.listView': localize('marketPlace', "Marketplace"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use consistent quoting style. For example always prefer single quotes over double quotes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is true, but not when we localize strings. If we use single quotes on the string that is to be localized, then the localization doesnt work.
We have an exception on our pre check in hook for this. If double quotes were used elsewhere, then I wouldnt have been able to commit in the first place
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can still prefer single quotes first and fallback to backtick if string includes single quotes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The rest of the file is using double quotes, so I'll keep so for consistency's sake
return; | ||
} | ||
if (viewIdNameMappings[viewId]) { | ||
alert(localize('extensionsFoundInSection', "{0} extensions found in the {1} section.", count, viewIdNameMappings[viewId])); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When count
is 1, extensions
is wrong.
if (viewIdNameMappings[viewId]) { | ||
alert(localize('extensionsFoundInSection', "{0} extensions found in the {1} section.", count, viewIdNameMappings[viewId])); | ||
} else { | ||
alert(localize('extensionsFound', "{0} extensions found.", count)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above.
This PR fixes #52611 by announcing the number of search results when an extension search is made.