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

Test: Finalized Localization API #164500

Closed
2 tasks done
TylerLeonhardt opened this issue Oct 24, 2022 · 1 comment
Closed
2 tasks done

Test: Finalized Localization API #164500

TylerLeonhardt opened this issue Oct 24, 2022 · 1 comment

Comments

@TylerLeonhardt
Copy link
Member

TylerLeonhardt commented Oct 24, 2022

Refs: #158213

Complexity: 4

Create Issue


This iteration we have finalized the localization l10n API 🎉 Since this API has been reviewed and tested a ton from non-built-in extensions, I thought it would be fitting to focus the finalization of this API on extensions that ship with VS Code. The goal here is to replace vscode-nls's localize() calls with the new vscode.l10n.t calls.

Step 1: change the code

  1. Pick an extension that currently relies on vscode-nls (check package.json) and has some localize( calls in it
  2. migrate from the vscode-nls usage to the new vscode.l10n API. I'm leaving this intentionally vague so you look at the typings to guide you on usage
  3. Since you've now migrated an extension, you might as well submit a PR 😄

Step 2: testing the change

You can easily verify the English works by triggering some of strings you've changed and ensuring that they're still English and that parameters work and whatnot.

I wish I could have you test against an actual language, but that would be way too involved since you'd need to modify a Language Pack you have already installed (hacky) or wait for the PR to go in, and then wait for the translations to flow through and then wait for a Language Pack to be released.

I can go ahead and verify your changes once the PRs are in and the translations have flown to a released Language Pack.

@lszomoru
Copy link
Member

Great job @TylerLeonhardt 👏🏻

@lszomoru lszomoru removed their assignment Oct 25, 2022
@joyceerhl joyceerhl removed their assignment Oct 25, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Dec 9, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants