@@ -381,11 +381,7 @@ private async Task DoInitializeAsync(InitializeParams @params, CancellationToken
381381 }
382382 _displayTextBuilder = DocumentationBuilder . Create ( DisplayOptions ) ;
383383
384- if ( string . IsNullOrEmpty ( Analyzer . InterpreterFactory ? . Configuration ? . InterpreterPath ) ) {
385- LogMessage ( MessageType . _General , "Initializing for generic interpreter" ) ;
386- } else {
387- LogMessage ( MessageType . _General , $ "Initializing for { Analyzer . InterpreterFactory . Configuration . InterpreterPath } ") ;
388- }
384+ DisplayStartupInfo ( ) ;
389385
390386 if ( @params . rootUri != null ) {
391387 _rootDir = @params . rootUri . ToAbsolutePath ( ) ;
@@ -399,6 +395,14 @@ private async Task DoInitializeAsync(InitializeParams @params, CancellationToken
399395 Analyzer . Interpreter . ModuleNamesChanged += Interpreter_ModuleNamesChanged ;
400396 }
401397
398+ private void DisplayStartupInfo ( ) {
399+ LogMessage ( MessageType . _General , Resources . LanguageServerVersion . FormatInvariant ( Assembly . GetExecutingAssembly ( ) . GetName ( ) . Version ) ) ;
400+ LogMessage ( MessageType . _General ,
401+ string . IsNullOrEmpty ( Analyzer . InterpreterFactory ? . Configuration ? . InterpreterPath )
402+ ? Resources . InitializingForGenericInterpreter
403+ : Resources . InitializingForPythonInterpreter . FormatInvariant ( Analyzer . InterpreterFactory . Configuration . InterpreterPath ) ) ;
404+ }
405+
402406 private void Interpreter_ModuleNamesChanged ( object sender , EventArgs e ) {
403407 Analyzer . Modules . ReInit ( ) ;
404408 foreach ( var entry in Analyzer . ModulesByFilename ) {
@@ -437,7 +441,7 @@ private async Task<PythonAnalyzer> CreateAnalyzer(PythonInitializationOptions.In
437441
438442 var interp = factory . CreateInterpreter ( ) ;
439443 if ( interp == null ) {
440- throw new InvalidOperationException ( "Failed to create interpreter" ) ;
444+ throw new InvalidOperationException ( Resources . Error_FailedToCreateInterpreter ) ;
441445 }
442446
443447 LogMessage ( MessageType . Info , $ "Created { interp . GetType ( ) . FullName } instance from { factory . GetType ( ) . FullName } ") ;
0 commit comments