Environment
|
|
| Extension |
ms-python.vscode-python-envs 1.36.0 |
| VS Code |
1.136.1 (Windows 11, 10.0.26200) |
| conda |
26.7.2 (miniforge3) |
| Display language |
Korean (ko) |
Steps to reproduce
- Set the VS Code display language to any non-English locale that ships a translation bundle (e.g.
ko).
- Run Python: Create Environment → Conda.
- Pick the first option —
명명됨 (the localized "Named").
- Pick a Python version.
Expected
An input box appears ("Enter the name of the conda environment to create"), and after submitting a name the environment is created.
Actual
Nothing happens at all:
- no input box,
- no error notification,
- not a single line written to the Python Environments output channel.
The command silently returns and no environment is created.
Cause
In the step-based conda flow, the env-type step stores the localized label into envType:
const t = await showQuickPickWithButtons([
{ label: CondaStrings.condaNamed, description: CondaStrings.condaNamedDescription }, // l10n.t("Named")
{ label: CondaStrings.condaPrefix, description: CondaStrings.condaPrefixDescription },
], { placeHolder: CondaStrings.condaSelectEnvType, ignoreFocusOut: true, showBackButton: true });
return t ? (e.envType = t.label, p) : null;
but the following (Python-version) step dispatches on a hardcoded English literal:
return a ? (e.pythonVersion = a.description, "Named" === e.envType ? v : g) : null;
bundle.l10n.ko.json contains "Named": "명명됨", so envType === "명명됨", the comparison is false, and the flow is routed to g — the prefix location step — instead of v, the name-input step.
Steps g and m then complete without showing any UI when the workspace has exactly one project (getLocation returns the project path directly) and no existing .conda directory. So prefix gets set while envName remains undefined.
The final dispatch does compare against the localized constants, so it matches neither branch and falls through:
return a.envType === CondaStrings.condaNamed && a.envName
? await createNamedCondaEnvironment(t, n, r, a.envName, a.pythonVersion)
: a.envType === CondaStrings.condaPrefix && a.prefix
? await createPrefixCondaEnvironment(t, n, r, a.fsPath, a.pythonVersion)
: void 0; // <-- silently reached
That accounts for all three symptoms: no input box (step v never runs), no log output (conda is never invoked), no error (the flow resolves to undefined).
Notes
- Prefix still works in a localized UI by accident: step
p routes to g either way, and the final dispatch's condaPrefix branch does match.
- This affects every locale that ships a bundle, since all of them translate
Named.
Suggested fix
Compare against CondaStrings.condaNamed rather than the literal "Named" — or better, keep a locale-independent discriminator (e.g. store 'named' | 'prefix' in envType) and use the localized string for display only.
Related to #1766 (a separate bug in the same conda creation flow, reproducible independently of the display language).
Environment
ms-python.vscode-python-envs1.36.0ko)Steps to reproduce
ko).명명됨(the localized "Named").Expected
An input box appears ("Enter the name of the conda environment to create"), and after submitting a name the environment is created.
Actual
Nothing happens at all:
The command silently returns and no environment is created.
Cause
In the step-based conda flow, the env-type step stores the localized label into
envType:but the following (Python-version) step dispatches on a hardcoded English literal:
bundle.l10n.ko.jsoncontains"Named": "명명됨", soenvType === "명명됨", the comparison is false, and the flow is routed tog— the prefix location step — instead ofv, the name-input step.Steps
gandmthen complete without showing any UI when the workspace has exactly one project (getLocationreturns the project path directly) and no existing.condadirectory. Soprefixgets set whileenvNameremainsundefined.The final dispatch does compare against the localized constants, so it matches neither branch and falls through:
That accounts for all three symptoms: no input box (step
vnever runs), no log output (conda is never invoked), no error (the flow resolves toundefined).Notes
proutes togeither way, and the final dispatch'scondaPrefixbranch does match.Named.Suggested fix
Compare against
CondaStrings.condaNamedrather than the literal"Named"— or better, keep a locale-independent discriminator (e.g. store'named' | 'prefix'inenvType) and use the localized string for display only.Related to #1766 (a separate bug in the same conda creation flow, reproducible independently of the display language).