Skip to content

Enable translations for extension code for the web - #155355

Merged
TylerLeonhardt merged 2 commits into
mainfrom
tyler/translations-for-web-in-code
Aug 8, 2022
Merged

TylerLeonhardt merged 2 commits into
mainfrom
tyler/translations-for-web-in-code

Conversation

@TylerLeonhardt

Copy link
Copy Markdown
Member

This PR fixes #

Depends on microsoft/vscode-nls#42

In short, the strategy is to load the message bundles ahead of time and then when the extension is getting loaded, return the pre-loaded strings.

The strategies are slightly different because the scanners are slightly different:

  • Built-in only has a map that contains the current locale and the default English.
  • Marketplace extensions has a map of all NLS bundle files in the package

Please review this very harshly. This is code I am unfamiliar with and is owned by several folks.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@alexdima Alexandru Dima (alexdima) left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks super reasonable! I just left a couple of comments. Once you tackle those, could we please create a build with this so we could test it?

@alexdima Alexandru Dima (alexdima) left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

👍

@TylerLeonhardt
TylerLeonhardt marked this pull request as ready for review August 8, 2022 16:10
@TylerLeonhardt

Copy link
Copy Markdown
Member Author

Actually this PR doesn't take advantage of vscode-nls 5.1.0 yet so this can just be merged in independently

@TylerLeonhardt
TylerLeonhardt merged commit 49394cc into main Aug 8, 2022
@TylerLeonhardt
TylerLeonhardt deleted the tyler/translations-for-web-in-code branch August 8, 2022 16:11
@vscodenpa VS Code Bot (vscodenpa) added this to the August 2022 milestone Aug 8, 2022
Joyce Er (joyceerhl) pushed a commit that referenced this pull request Aug 10, 2022
@github-actions github-actions Bot locked and limited conversation to collaborators Sep 26, 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.

4 participants