Repository navigation
Description
Found during bug bash on 0.10.0-bug-bash-1.
Summary
Two user-facing Local Quick Start port errors are built as raw template literals and never pass through vscode.l10n.t(), so they render in English regardless of display language. A sibling message a few lines away in the same function is localized correctly, so the inconsistency is within a single code path.
The three messages
From the provisioning path in the shipped bundle (extension/main.js):
// NOT localized — raw template literal
const e = `Ports ${QUICK_START_PORT}-${QUICK_START_PORT_BAND_END-1} are all in use. Free one and retry.`;
// NOT localized — raw template literal
const e = `Port ${W} is already in use. Choose a different port or free it, then retry.`;
// localized correctly
N = C.t("Port {0} was busy, using {1} instead.", String(QUICK_START_PORT), String(k));Both strings reach the user: each is passed to setStatus(..., InstanceState.Error, ..., e) and stageEvent("checking", "error", e, e), which render in the Quick Start panel.
Impact
Non-English users get localized text on the success path and untranslated English on both failure paths — exactly where a clear message matters most. Neither string is present in l10n/bundle.l10n.json, since neither is marked for extraction.
Steps to reproduce
- Set VS Code display language to a non-English locale.
- Occupy port 10260 (
nc -l 10260, or any other listener on127.0.0.1:10260). - Open the Local Quick Start panel and start an instance.
- The resulting port error appears in English.
Suggested fix
Wrap both in vscode.l10n.t() with positional placeholders, matching the style already used by the success message:
const e = vscode.l10n.t(
"Ports {0}-{1} are all in use. Free one and retry.",
String(QUICK_START_PORT),
String(QUICK_START_PORT_BAND_END - 1),
);
const e = vscode.l10n.t(
"Port {0} is already in use. Choose a different port or free it, then retry.",
String(W),
);Note on the first message's wording
Separately from localization, the "all in use" text is inaccurate: the port search samples at most 11 ports out of the 100-port band before emitting it. Whatever wording is adopted should not claim the whole range was checked. Happy to file that separately if useful.
Related
Possibly adjacent to #603 (localization strategy for static English strings), though that issue covers shell completions and internal packages rather than these Quick Start strings.
Activity
Fix the Local Quick Start bug-bash issues (#851, #852, #854, #855, #856…
test(local-quickstart): pin the manifest-level bug-bash fixes in Jest
Fix the Local Quick Start bug-bash issues (#851, #852, #855, #856, #857…
tnaum-ms commentedon Aug 6, 2026
Fixed by #866, merged into
feature/local-quickstartas 2803a38: the port and setup messages go throughl10n.t(), including the bare'in progress'marker that was reaching the message bar untranslated, andcontributions.test.tsnow fails if any of them stops being extracted.Closing by hand rather than automatically: #866 targeted
feature/local-quickstart, not the default branch, so GitHub ignores closing keywords and creates no link. Ships with 0.10.0.