Skip to content

Commit cd92a62

Browse files
committed
new python folder: update language
1 parent 2d50984 commit cd92a62

File tree

2 files changed

+39
-18
lines changed

2 files changed

+39
-18
lines changed

extensions/positron-python/src/client/common/utils/localize.ts

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -480,7 +480,10 @@ export namespace CreateEnv {
480480
export const installingPackages = l10n.t('Installing packages...');
481481
export const errorCreatingEnvironment = l10n.t('Error while creating virtual environment.');
482482
export const selectPythonPlaceHolder = l10n.t('Select a Python installation to create the virtual environment');
483-
export const providerDescription = l10n.t('Creates a `.venv` virtual environment in the current workspace');
483+
// --- Start Positron ---
484+
// export const providerDescription = l10n.t('Creates a `.venv` virtual environment in the current workspace');
485+
export const providerDescription = l10n.t('Create a new ".venv" environment with an existing interpreter');
486+
// --- End Positron ---
484487
export const error = l10n.t('Creating virtual environment failed with error.');
485488
export const tomlExtrasQuickPickTitle = l10n.t('Select optional dependencies to install from pyproject.toml');
486489
export const requirementsQuickPickTitle = l10n.t('Select dependencies to install');
@@ -507,7 +510,12 @@ export namespace CreateEnv {
507510
'Select the version of Python to install in the environment',
508511
);
509512
export const creating = l10n.t('Creating conda environment...');
510-
export const providerDescription = l10n.t('Creates a `.conda` Conda environment in the current workspace');
513+
// --- Start Positron ---
514+
// export const providerDescription = l10n.t('Creates a `.conda` Conda environment in the current workspace');
515+
export const providerDescription = l10n.t(
516+
'Install a new interpreter with conda and create a new ".conda" environment',
517+
);
518+
// --- End Positron ---
511519

512520
export const recreate = l10n.t('Delete and Recreate');
513521
export const recreateDescription = l10n.t('Delete existing ".conda" environment and create a new one');
@@ -522,7 +530,9 @@ export namespace CreateEnv {
522530

523531
// --- Start Positron ---
524532
export namespace Uv {
525-
export const providerDescription = l10n.t('Creates a `uv` virtual environment in the current workspace');
533+
export const providerDescription = l10n.t(
534+
'Install a new interpreter with uv and create a new ".venv" environment',
535+
);
526536
}
527537
// --- End Positron ---
528538

src/vs/workbench/browser/positronNewFolderFlow/components/steps/pythonEnvironmentStep.tsx

Lines changed: 26 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -120,14 +120,14 @@ export const PythonEnvironmentStep = (props: PropsWithChildren<NewFolderFlowStep
120120
identifier: EnvironmentSetupType.NewEnvironment,
121121
title: localize(
122122
'pythonEnvironmentStep.newEnvironment.radioLabel',
123-
"Create a new Python environment (Recommended)"
123+
"Create a new virtual environment (Recommended)"
124124
)
125125
}),
126126
new RadioButtonItem({
127127
identifier: EnvironmentSetupType.ExistingEnvironment,
128128
title: localize(
129129
'pythonEnvironmentStep.existingEnvironment.radioLabel',
130-
"Use an existing Python installation"
130+
"Use an existing environment"
131131
)
132132
})
133133
];
@@ -335,26 +335,31 @@ export const PythonEnvironmentStep = (props: PropsWithChildren<NewFolderFlowStep
335335

336336
// Construct the interpreter dropdown title.
337337
const interpreterDropdownTitle = () => {
338+
const interpreterOrVersion = (context.usesCondaEnv || context.usesUvEnv) ? 'version' : 'interpreter';
339+
338340
// If interpreters is undefined, show a loading message.
339341
if (interpretersLoading()) {
340342
return localize(
341343
'pythonInterpreterSubStep.dropDown.title.loading',
342-
"Loading interpreters..."
344+
"Loading {0}s...",
345+
interpreterOrVersion
343346
);
344347
}
345348

346349
// If interpreters is empty, show a message that no interpreters were found.
347350
if (!interpretersAvailable()) {
348351
return localize(
349352
'pythonInterpreterSubStep.dropDown.title.noInterpreters',
350-
"No interpreters found."
353+
"No {0}s found.",
354+
interpreterOrVersion
351355
);
352356
}
353357

354358
// Otherwise, show the default title.
355359
return localize(
356360
'pythonInterpreterSubStep.dropDown.title',
357-
"Select a Python interpreter"
361+
"Select a Python {0}",
362+
interpreterOrVersion
358363
);
359364
};
360365

@@ -447,14 +452,14 @@ export const PythonEnvironmentStep = (props: PropsWithChildren<NewFolderFlowStep
447452
<FlowFormattedText type={FlowFormattedTextType.Info}>
448453
{(() => localize(
449454
'pythonEnvironmentSubStep.description',
450-
"Select a Python environment"
455+
"Select a way to create a new Python environment"
451456
))()}
452457
</FlowFormattedText>
453458
}
454459
feedback={envProviderStepFeedback()}
455460
title={(() => localize(
456461
'pythonEnvironmentSubStep.label',
457-
"Python Environment"
462+
"Environment Creation"
458463
))()}
459464
>
460465
<DropDownListBox
@@ -478,17 +483,23 @@ export const PythonEnvironmentStep = (props: PropsWithChildren<NewFolderFlowStep
478483
}
479484
{/* Show the Python interpreter dropdown */}
480485
<PositronFlowSubStep
481-
description={(() =>
482-
localize(
486+
description={(() => {
487+
const whatToSelect = (context.usesCondaEnv || context.usesUvEnv) ? 'a Python version to install' : 'an existing interpreter';
488+
return localize(
483489
'pythonInterpreterSubStep.description',
484-
"Select a Python interpreter"
485-
))()}
490+
"Select {0}",
491+
whatToSelect
492+
)
493+
})()}
486494
feedback={interpreterStepFeedback()}
487-
title={(() =>
488-
localize(
495+
title={(() => {
496+
const interpreterOrVersion = (context.usesCondaEnv || context.usesUvEnv) ? 'Version' : 'Interpreter';
497+
return localize(
489498
'pythonInterpreterSubStep.title',
490-
"Python Interpreter"
491-
))()}
499+
"Python {0}",
500+
interpreterOrVersion
501+
)
502+
})()}
492503
>
493504
<DropDownListBox
494505
createItem={(item) => (

0 commit comments

Comments
 (0)