22// Licensed under the MIT License.
33
44import { inject , injectable , named } from 'inversify' ;
5- import { CancellationToken , Uri , workspace } from 'vscode' ;
5+ import { CancellationToken , l10n , Uri , workspace } from 'vscode' ;
66import { Cancellation } from '../../platform/common/cancellation' ;
77import { STANDARD_OUTPUT_CHANNEL } from '../../platform/common/constants' ;
88import { IFileSystem } from '../../platform/common/platform/types' ;
@@ -166,7 +166,7 @@ export class DeepnoteToolkitInstaller implements IDeepnoteToolkitInstaller {
166166 }
167167
168168 logger . info ( `Installing additional packages in ${ venvPath . fsPath } : ${ packages . join ( ', ' ) } ` ) ;
169- this . outputChannel . appendLine ( ` Installing packages: ${ packages . join ( ', ' ) } ...` ) ;
169+ this . outputChannel . appendLine ( l10n . t ( ' Installing packages: {0}...' , packages . join ( ', ' ) ) ) ;
170170
171171 try {
172172 Cancellation . throwIfCanceled ( token ) ;
@@ -186,10 +186,10 @@ export class DeepnoteToolkitInstaller implements IDeepnoteToolkitInstaller {
186186 }
187187
188188 logger . info ( 'Additional packages installed successfully' ) ;
189- this . outputChannel . appendLine ( '✓ Packages installed successfully' ) ;
189+ this . outputChannel . appendLine ( l10n . t ( '✓ Packages installed successfully' ) ) ;
190190 } catch ( ex ) {
191191 logger . error ( `Failed to install additional packages: ${ ex } ` ) ;
192- this . outputChannel . appendLine ( ` ✗ Failed to install packages: ${ ex } ` ) ;
192+ this . outputChannel . appendLine ( l10n . t ( ' ✗ Failed to install packages: {0}' , ex ) ) ;
193193 throw ex ;
194194 }
195195 }
@@ -206,7 +206,7 @@ export class DeepnoteToolkitInstaller implements IDeepnoteToolkitInstaller {
206206 Cancellation . throwIfCanceled ( token ) ;
207207
208208 logger . info ( `Creating virtual environment at ${ venvPath . fsPath } ` ) ;
209- this . outputChannel . appendLine ( ` Setting up Deepnote toolkit environment...` ) ;
209+ this . outputChannel . appendLine ( l10n . t ( ' Setting up Deepnote toolkit environment...' ) ) ;
210210
211211 // Create venv parent directory if it doesn't exist
212212 const venvParentDir = Uri . joinPath ( this . context . globalStorageUri , 'deepnote-venvs' ) ;
@@ -239,7 +239,7 @@ export class DeepnoteToolkitInstaller implements IDeepnoteToolkitInstaller {
239239 if ( venvResult . stderr ) {
240240 logger . error ( `venv stderr: ${ venvResult . stderr } ` ) ;
241241 }
242- this . outputChannel . appendLine ( 'Error: Failed to create virtual environment' ) ;
242+ this . outputChannel . appendLine ( l10n . t ( 'Error: Failed to create virtual environment' ) ) ;
243243
244244 throw new DeepnoteVenvCreationError (
245245 baseInterpreter . uri . fsPath ,
@@ -253,7 +253,7 @@ export class DeepnoteToolkitInstaller implements IDeepnoteToolkitInstaller {
253253
254254 // Upgrade pip in the venv to the latest version
255255 logger . info ( 'Upgrading pip in venv to latest version...' ) ;
256- this . outputChannel . appendLine ( 'Upgrading pip...' ) ;
256+ this . outputChannel . appendLine ( l10n . t ( 'Upgrading pip...' ) ) ;
257257 const pipUpgradeResult = await venvProcessService . exec (
258258 venvInterpreter . uri . fsPath ,
259259 [ '-m' , 'pip' , 'install' , '--upgrade' , 'pip' ] ,
@@ -271,7 +271,7 @@ export class DeepnoteToolkitInstaller implements IDeepnoteToolkitInstaller {
271271
272272 // Install deepnote-toolkit and ipykernel in venv
273273 logger . info ( `Installing deepnote-toolkit and ipykernel in venv from ${ DEEPNOTE_TOOLKIT_WHEEL_URL } ` ) ;
274- this . outputChannel . appendLine ( 'Installing deepnote-toolkit and ipykernel...' ) ;
274+ this . outputChannel . appendLine ( l10n . t ( 'Installing deepnote-toolkit and ipykernel...' ) ) ;
275275
276276 const installResult = await venvProcessService . exec (
277277 venvInterpreter . uri . fsPath ,
@@ -308,11 +308,11 @@ export class DeepnoteToolkitInstaller implements IDeepnoteToolkitInstaller {
308308 // Don't fail the entire installation if kernel spec creation fails
309309 }
310310
311- this . outputChannel . appendLine ( '✓ Deepnote toolkit ready' ) ;
311+ this . outputChannel . appendLine ( l10n . t ( '✓ Deepnote toolkit ready' ) ) ;
312312 return { pythonInterpreter : venvInterpreter , toolkitVersion : installedToolkitVersion } ;
313313 } else {
314314 logger . error ( 'deepnote-toolkit installation failed' ) ;
315- this . outputChannel . appendLine ( '✗ deepnote-toolkit installation failed' ) ;
315+ this . outputChannel . appendLine ( l10n . t ( '✗ deepnote-toolkit installation failed' ) ) ;
316316
317317 throw new DeepnoteToolkitInstallError (
318318 venvInterpreter . uri . fsPath ,
@@ -330,7 +330,7 @@ export class DeepnoteToolkitInstaller implements IDeepnoteToolkitInstaller {
330330
331331 // Otherwise, log full details and wrap in a generic toolkit install error
332332 logger . error ( `Failed to set up deepnote-toolkit: ${ ex } ` ) ;
333- this . outputChannel . appendLine ( 'Failed to set up deepnote-toolkit; see logs for details' ) ;
333+ this . outputChannel . appendLine ( l10n . t ( 'Failed to set up deepnote-toolkit; see logs for details' ) ) ;
334334
335335 throw new DeepnoteToolkitInstallError (
336336 baseInterpreter . uri . fsPath ,
0 commit comments