Skip to content
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

Localize full plugin data #11334

Merged
merged 1 commit into from
Jun 24, 2022
Merged

Localize full plugin data #11334

merged 1 commit into from
Jun 24, 2022

Conversation

msujew
Copy link
Member

@msujew msujew commented Jun 24, 2022

What it does

Closes #11316

Instead of only localizing the contributes part of plugins (such as menus, commands, etc), we should localize everything, including the name and description property of the plugin.

How to test

  1. Assert that the ms-vscode.node-debug2 extension exists as a built-in extension.
  2. Open the vsx-registry view and scroll down to the extension. The description should not be %extension.description% but an actual text value.
  3. Delete the extension from the plugins directory and restart the server/app.
  4. Search for the ms-vscode.node-debug2 extension in the vsx-registry and install it. The description should not change to %extension.description% but continue saying Node.js debugging support.
  5. Uninstall the extension again, and change the local to another language. I used zh-cn.
  6. Installing the extension again should change the description to a localized value.

Review checklist

Reminder for reviewers

@msujew msujew added the localization issues related to localization/internalization/nls label Jun 24, 2022
Copy link
Contributor

@colin-grant-work colin-grant-work left a comment

Choose a reason for hiding this comment

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

I'm not entirely sure how the data for plugins that have not yet been installed is handled. Searching for node-debug2 while using the application in Chinese, I get this:

image

And once I install, I get this:

image

Otherwise, works very well, so if there's no convenient way to fix the content before we download, this is a significant improvement.

@msujew
Copy link
Member Author

msujew commented Jun 24, 2022

@colin-grant-work The open-vsx API does not allow us to set the locale when searching for an extension and only replaces what it can find in the english package.nls.json. We don't have access to the actual localization files while searching for extensions, so that's the best we can do for now.

Copy link
Contributor

@colin-grant-work colin-grant-work left a comment

Choose a reason for hiding this comment

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

This fixes what's in our power to fix, and I see no regressions. 👍

@msujew msujew merged commit 6c815fa into master Jun 24, 2022
@msujew msujew deleted the msujew/localize-full-plugin branch June 24, 2022 17:13
@github-actions github-actions bot added this to the 1.27.0 milestone Jun 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
localization issues related to localization/internalization/nls
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement Internationalized Text Interpolation for Plugin Descriptions
2 participants