Skip to content

Replace vscode-nls with @vscode/l10n - #65

Merged
GrahamStrickland merged 4 commits into
masterfrom
task/11-replace-vscode-nls-with-vscodel10n-vscodel10n
Jul 23, 2026
Merged

Replace vscode-nls with @vscode/l10n#65
GrahamStrickland merged 4 commits into
masterfrom
task/11-replace-vscode-nls-with-vscodel10n-vscodel10n

Conversation

@GrahamStrickland

Copy link
Copy Markdown

vscode-nls is in maintenance mode. It was only doing the {0} placeholder substitution here — the lookup was already hand-rolled against package.nls*.json — so @vscode/l10n.t() drops straight into its place.

Call sites deliberately stay off vscode.l10n.t(). Two structural blockers:

  1. debugger.ts bundles this module and runs as a standalone adapter process (vscode is external in client/build.js), where require('vscode') throws. @vscode/l10n exists for exactly that case.
  2. The formatter webview localizes by computed key — formatEditor.ts:82 passes the manifest's own %key% strings through verbatim — which a literal-message API cannot express.

package.nls*.json stays regardless: 46 of its 76 keys localize the manifest. Moving runtime strings to l10n/bundle.l10n.*.json would mean two message stores and duplicated translations for no user-visible gain, and only becomes worthwhile if #12 stops the webview deriving labels from the manifest.

Also in here:

Adapter bundle drops 59.0 KB → 53.6 KB. Client tests 88 → 98; server 78 unchanged. CI green on all three runners.

Bumps client to 1.4.2, server to 0.10.2.

Closes #11

🤖 Generated with Claude Code

GrahamStrickland and others added 4 commits July 23, 2026 10:51
Closes #11

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@GrahamStrickland GrahamStrickland linked an issue Jul 23, 2026 that may be closed by this pull request
@GrahamStrickland
GrahamStrickland merged commit d2bc1ca into master Jul 23, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Replace vscode-nls with @vscode/l10n / vscode.l10n

1 participant