Skip to content
This repository was archived by the owner on Oct 23, 2025. It is now read-only.

Commit 3533972

Browse files
update phrasing on different notifications (#556)
fixes microsoft/vscode-python-environments#348 fixes microsoft/vscode-python-environments#513 fixes microsoft/vscode-python-environments#511 --------- Co-authored-by: Courtney Webster <[email protected]>
1 parent 0331667 commit 3533972

File tree

4 files changed

+22
-7
lines changed

4 files changed

+22
-7
lines changed

src/common/localize.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ export namespace PackageManagement {
3434
export const commonPackages = l10n.t('Common Packages');
3535
export const selectPackagesToInstall = l10n.t('Select packages to install');
3636
export const enterPackageNames = l10n.t('Enter package names');
37-
export const searchCommonPackages = l10n.t('Search common `PyPI` packages');
38-
export const searchCommonPackagesDescription = l10n.t('Search and Install common `PyPI` packages');
37+
export const searchCommonPackages = l10n.t('Search `PyPI` packages');
38+
export const searchCommonPackagesDescription = l10n.t('Search and install popular `PyPI` packages');
3939
export const workspaceDependencies = l10n.t('Install project dependencies');
4040
export const workspaceDependenciesDescription = l10n.t('Install packages found in dependency files.');
4141
export const selectPackagesToUninstall = l10n.t('Select packages to uninstall');
@@ -90,8 +90,6 @@ export namespace VenvManagerStrings {
9090
export const venvName = l10n.t('Enter a name for the virtual environment');
9191
export const venvNameErrorEmpty = l10n.t('Name cannot be empty');
9292
export const venvNameErrorExists = l10n.t('A folder with the same name already exists');
93-
94-
export const venvCreating = l10n.t('Creating virtual environment');
9593
export const venvCreateFailed = l10n.t('Failed to create virtual environment');
9694

9795
export const venvRemoving = l10n.t('Removing virtual environment');

src/features/creators/newPackageProject.ts

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,20 @@ export class NewPackageProject implements PythonProjectCreator {
140140
quickCreate: true,
141141
});
142142
} else {
143-
window.showErrorMessage(l10n.t('Creating virtual environment failed during package creation.'));
143+
const action = await window.showErrorMessage(
144+
l10n.t(
145+
'A virtual environment could not be created for the new package "{0}" because your default environment manager does not support this operation and no alternative was available.',
146+
packageName,
147+
),
148+
l10n.t('Create custom environment'),
149+
);
150+
if (action === l10n.t('Create custom environment')) {
151+
await commands.executeCommand('python-envs.createAny', {
152+
uri: createdPackage.uri,
153+
selectEnvironment: true,
154+
});
155+
createdEnv = await this.envManagers.getEnvironment(createdPackage.uri);
156+
}
144157
}
145158
}
146159
}

src/features/terminal/shellStartupSetupHandlers.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export async function handleSettingUpShellProfile(
1313
const shells = providers.map((p) => p.shellType).join(', ');
1414
const response = await showInformationMessage(
1515
l10n.t(
16-
'To use "{0}" activation, the shell profiles need to be set up. Do you want to set it up now?',
16+
'To enable "{0}" activation, your shell profile(s) need to be updated to include the necessary startup scripts. Would you like to proceed with these changes?',
1717
ACT_TYPE_SHELL,
1818
),
1919
{ modal: true, detail: l10n.t('Shells: {0}', shells) },

src/managers/builtin/venvUtils.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,11 @@ async function createWithProgress(
288288
return await withProgress(
289289
{
290290
location: ProgressLocation.Notification,
291-
title: VenvManagerStrings.venvCreating,
291+
title: l10n.t(
292+
'Creating virtual environment named {0} using python version {1}.',
293+
path.basename(envPath),
294+
basePython.version,
295+
),
292296
},
293297
async () => {
294298
try {

0 commit comments

Comments
 (0)