Repository navigation
Description
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
- Pick an extension that currently relies on
vscode-nls(check package.json) and has somelocalize(calls in it - migrate from the
vscode-nlsusage to the newvscode.l10nAPI. I'm leaving this intentionally vague so you look at the typings to guide you on usage - 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.
Some examples: #164566 #163662
- html-language-features Martin Aeschlimann (@aeschli)
- json-language-features Martin Aeschlimann (@aeschli)
- css-language-features Martin Aeschlimann (@aeschli)
- debug-auto-launch Connor Peet (@connor4312)
- debug-server-ready Connor Peet (@connor4312)
- js-debug Connor Peet (@connor4312)
- emmet Raymond Zhao (@rzhao271)
- markdown-language-features Matt Bierner (@mjbvz)
- media-preview Matt Bierner (@mjbvz)
- simple-browser Matt Bierner (@mjbvz)
- typescript-language-features Matt Bierner (@mjbvz)
- php-language-features roblourens
- references-view Johannes Rieken (@jrieken)
- configuration-editing Matt Bierner (@mjbvz)
- extension-editing Matt Bierner (@mjbvz)
- grunt Matt Bierner (@mjbvz)
- gulp Matt Bierner (@mjbvz)
- Jake Matt Bierner (@mjbvz)
- merge-conflict Matt Bierner (@mjbvz)
- npm Matt Bierner (@mjbvz)
Activity
[-]Move built-in extensions off `vscode-nls` and on to the l10n API[/-][+]Move built-in extensions off `vscode-nls` and on to the `l10n` API[/+]adopt `vscode.l10n` in references view
31 remaining items
[css/json/html] move to l10n (for #164438)
[css/json/html] move to l10n (#165725)
Use l10n instead of vscode-nls (#71)
chore: adopt new localization pipeline
chore: adopt new localization pipeline (#1515)