@@ -377,11 +377,7 @@ private async Task DoInitializeAsync(InitializeParams @params, CancellationToken
377377 }
378378 _displayTextBuilder = DocumentationBuilder . Create ( DisplayOptions ) ;
379379
380- if ( string . IsNullOrEmpty ( Analyzer . InterpreterFactory ? . Configuration ? . InterpreterPath ) ) {
381- LogMessage ( MessageType . _General , "Initializing for generic interpreter" ) ;
382- } else {
383- LogMessage ( MessageType . _General , $ "Initializing for { Analyzer . InterpreterFactory . Configuration . InterpreterPath } ") ;
384- }
380+ DisplayStartupInfo ( ) ;
385381
386382 if ( @params . rootUri != null ) {
387383 _rootDir = @params . rootUri . ToAbsolutePath ( ) ;
@@ -395,6 +391,14 @@ private async Task DoInitializeAsync(InitializeParams @params, CancellationToken
395391 Analyzer . Interpreter . ModuleNamesChanged += Interpreter_ModuleNamesChanged ;
396392 }
397393
394+ private void DisplayStartupInfo ( ) {
395+ LogMessage ( MessageType . _General , Resources . LanguageServerVersion . FormatInvariant ( Assembly . GetExecutingAssembly ( ) . GetName ( ) . Version ) ) ;
396+ LogMessage ( MessageType . _General ,
397+ string . IsNullOrEmpty ( Analyzer . InterpreterFactory ? . Configuration ? . InterpreterPath )
398+ ? Resources . InitializingForGenericInterpreter
399+ : Resources . InitializingForPythonInterpreter . FormatInvariant ( Analyzer . InterpreterFactory . Configuration . InterpreterPath ) ) ;
400+ }
401+
398402 private void Interpreter_ModuleNamesChanged ( object sender , EventArgs e ) {
399403 Analyzer . Modules . ReInit ( ) ;
400404 foreach ( var entry in Analyzer . ModulesByFilename ) {
@@ -433,7 +437,7 @@ private async Task<PythonAnalyzer> CreateAnalyzer(PythonInitializationOptions.In
433437
434438 var interp = factory . CreateInterpreter ( ) ;
435439 if ( interp == null ) {
436- throw new InvalidOperationException ( "Failed to create interpreter" ) ;
440+ throw new InvalidOperationException ( Resources . Error_FailedToCreateInterpreter ) ;
437441 }
438442
439443 LogMessage ( MessageType . Info , $ "Created { interp . GetType ( ) . FullName } instance from { factory . GetType ( ) . FullName } ") ;
0 commit comments