@@ -4,7 +4,7 @@ import * as path from 'path';
44import { l10n , LogOutputChannel , ProgressLocation , QuickPickItem , QuickPickItemKind , ThemeIcon , Uri } from 'vscode' ;
55import { EnvironmentManager , PythonEnvironment , PythonEnvironmentApi , PythonEnvironmentInfo } from '../../api' ;
66import { ENVS_EXTENSION_ID } from '../../common/constants' ;
7- import { Common , VenvManagerStringsNoUv } from '../../common/localize' ;
7+ import { Common , VenvManagerCommonStrings , VenvManagerStrings , VenvManagerStringsNoUv } from '../../common/localize' ;
88import { traceInfo } from '../../common/logging' ;
99import { getWorkspacePersistentState } from '../../common/persistentState' ;
1010import { pickEnvironmentFrom } from '../../common/pickers/environments' ;
@@ -209,15 +209,15 @@ export async function getGlobalVenvLocation(): Promise<Uri | undefined> {
209209 const items : FolderQuickPickItem [ ] = [
210210 {
211211 label : Common . browse ,
212- description : VenvManagerStringsNoUv . venvGlobalFolder ,
212+ description : VenvManagerCommonStrings . venvGlobalFolder ,
213213 } ,
214214 ] ;
215215
216216 const venvPaths = getVenvFoldersSetting ( ) ;
217217 if ( venvPaths . length > 0 ) {
218218 items . push (
219219 {
220- label : VenvManagerStringsNoUv . venvGlobalFoldersSetting ,
220+ label : VenvManagerCommonStrings . venvGlobalFoldersSetting ,
221221 kind : QuickPickItemKind . Separator ,
222222 } ,
223223 ...venvPaths . map ( ( p ) => ( {
@@ -243,7 +243,7 @@ export async function getGlobalVenvLocation(): Promise<Uri | undefined> {
243243 }
244244
245245 const selected = await showQuickPick ( items , {
246- placeHolder : VenvManagerStringsNoUv . venvGlobalFolder ,
246+ placeHolder : VenvManagerCommonStrings . venvGlobalFolder ,
247247 ignoreFocusOut : true ,
248248 } ) ;
249249
@@ -269,24 +269,24 @@ async function createWithCustomization(version: string): Promise<boolean | undef
269269 const selection : QuickPickItem | undefined = await showQuickPick (
270270 [
271271 {
272- label : VenvManagerStringsNoUv . quickCreate ,
272+ label : VenvManagerCommonStrings . quickCreate ,
273273 description : VenvManagerStringsNoUv . quickCreateDescription ,
274274 detail : l10n . t ( 'Uses Python version {0} and installs workspace dependencies.' , version ) ,
275275 } ,
276276 {
277- label : VenvManagerStringsNoUv . customize ,
278- description : VenvManagerStringsNoUv . customizeDescription ,
277+ label : VenvManagerCommonStrings . customize ,
278+ description : VenvManagerStrings . customizeDescription ,
279279 } ,
280280 ] ,
281281 {
282- placeHolder : VenvManagerStringsNoUv . selectQuickOrCustomize ,
282+ placeHolder : VenvManagerCommonStrings . selectQuickOrCustomize ,
283283 ignoreFocusOut : true ,
284284 } ,
285285 ) ;
286286
287287 if ( selection === undefined ) {
288288 return undefined ;
289- } else if ( selection . label === VenvManagerStringsNoUv . quickCreate ) {
289+ } else if ( selection . label === VenvManagerCommonStrings . quickCreate ) {
290290 return false ;
291291 }
292292 return true ;
@@ -383,14 +383,14 @@ async function createWithProgress(
383383export function ensureGlobalEnv ( basePythons : PythonEnvironment [ ] , log : LogOutputChannel ) : PythonEnvironment [ ] {
384384 if ( basePythons . length === 0 ) {
385385 log . error ( 'No base python found' ) ;
386- showErrorMessage ( VenvManagerStringsNoUv . venvErrorNoBasePython ) ;
386+ showErrorMessage ( VenvManagerCommonStrings . venvErrorNoBasePython ) ;
387387 throw new Error ( 'No base python found' ) ;
388388 }
389389
390390 const filtered = basePythons . filter ( ( e ) => e . version . startsWith ( '3.' ) ) ;
391391 if ( filtered . length === 0 ) {
392392 log . error ( 'Did not find any base python 3.*' ) ;
393- showErrorMessage ( VenvManagerStringsNoUv . venvErrorNoPython3 ) ;
393+ showErrorMessage ( VenvManagerCommonStrings . venvErrorNoPython3 ) ;
394394 basePythons . forEach ( ( e , i ) => {
395395 log . error ( `${ i } : ${ e . version } : ${ e . environmentPath . fsPath } ` ) ;
396396 } ) ;
@@ -471,15 +471,15 @@ export async function createPythonVenv(
471471 }
472472
473473 const name = await showInputBox ( {
474- prompt : VenvManagerStringsNoUv . venvName ,
474+ prompt : VenvManagerCommonStrings . venvName ,
475475 value : '.venv' ,
476476 ignoreFocusOut : true ,
477477 validateInput : async ( value ) => {
478478 if ( ! value ) {
479- return VenvManagerStringsNoUv . venvNameErrorEmpty ;
479+ return VenvManagerCommonStrings . venvNameErrorEmpty ;
480480 }
481481 if ( await fsapi . pathExists ( path . join ( venvRoot . fsPath , value ) ) ) {
482- return VenvManagerStringsNoUv . venvNameErrorExists ;
482+ return VenvManagerCommonStrings . venvNameErrorExists ;
483483 }
484484 } ,
485485 } ) ;
@@ -527,15 +527,15 @@ export async function removeVenv(environment: PythonEnvironment, log: LogOutputC
527527 const result = await withProgress (
528528 {
529529 location : ProgressLocation . Notification ,
530- title : VenvManagerStringsNoUv . venvRemoving ,
530+ title : VenvManagerCommonStrings . venvRemoving ,
531531 } ,
532532 async ( ) => {
533533 try {
534534 await fsapi . remove ( envPath ) ;
535535 return true ;
536536 } catch ( e ) {
537537 log . error ( `Failed to remove virtual environment: ${ e } ` ) ;
538- showErrorMessage ( VenvManagerStringsNoUv . venvRemoveFailed ) ;
538+ showErrorMessage ( VenvManagerCommonStrings . venvRemoveFailed ) ;
539539 return false ;
540540 }
541541 } ,
0 commit comments