Skip to content

show set display language action for lang pack extensions #154925

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

Merged
merged 1 commit into from
Jul 13, 2022

Conversation

sandy081
Copy link
Member

show set display language action for lang pack extensions

Fixes #154461

@sandy081 sandy081 enabled auto-merge July 12, 2022 12:39
@sandy081 sandy081 self-assigned this Jul 12, 2022
@sandy081 sandy081 requested a review from TylerLeonhardt July 12, 2022 12:39
@vscodenpa vscodenpa added this to the July 2022 milestone Jul 12, 2022
Comment on lines +268 to +276
if (!this.extension) {
return;
}
if (this.extension.isBuiltin) {
return;
}
if (this.extensionsWorkbenchService.canSetLanguage(this.extension)) {
return;
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: maybe combine these if's?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would like to have separate checks for each condition for readability (I think its personal :) )

Comment on lines +1256 to +1262
if (!isWeb) {
return false;
}

if (!extension.gallery) {
return false;
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: is 2 ifs really more readable than 1?

@sandy081 sandy081 merged commit 764d227 into main Jul 13, 2022
@sandy081 sandy081 deleted the sandy081/extensions-set-display-lang branch July 13, 2022 05:29
@TylerLeonhardt
Copy link
Member

@sandy081 does this change work alright for the pseudo language pack?

@sandy081
Copy link
Member Author

Is that a special language pack? May I know how to try it?

Yoyokrazy pushed a commit to Yoyokrazy/vscode that referenced this pull request Jul 13, 2022
…s-set-display-lang

show set display language action for lang pack extensions
andreamah pushed a commit that referenced this pull request Jul 14, 2022
…play-lang

show set display language action for lang pack extensions
@github-actions github-actions bot locked and limited conversation to collaborators Aug 27, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Web: Language extensions should not be installable
3 participants