pylance-release icon indicating copy to clipboard operation
pylance-release copied to clipboard

Pylance doesn't honor VSCode display language

Open srittau opened this issue 1 year ago • 7 comments

See #4579. My LANG is set to de_DE.UTF-8, the display language in VSCode is set to "en":

srittau@blitz:~$ locale
LANG=de_DE.UTF-8
LANGUAGE=de_DE:en
LC_CTYPE="de_DE.UTF-8"
LC_NUMERIC=de_DE.UTF-8
LC_TIME=de_DE.UTF-8
LC_COLLATE="de_DE.UTF-8"
LC_MONETARY=de_DE.UTF-8
LC_MESSAGES="de_DE.UTF-8"
LC_PAPER=de_DE.UTF-8
LC_NAME=de_DE.UTF-8
LC_ADDRESS=de_DE.UTF-8
LC_TELEPHONE=de_DE.UTF-8
LC_MEASUREMENT=de_DE.UTF-8
LC_IDENTIFICATION=de_DE.UTF-8
LC_ALL=

Still, pylance's error messages are in German, meaning that I need to reverse-translate the message to divine their meaning. It's also impossible to copy & paste the error messages when collaborating with non-German speakers. pylance should follow VSCode's language setting, not the system language. Or at least provide some way to override it.

Environment data

  • Language Server version: 2024.5.1 (pyright version 1.1.360, commit 4bc8428d)
  • OS and version: Ubuntu 24.04
  • Python version (& distribution if applicable, e.g. Anaconda): any

srittau avatar May 15 '24 13:05 srittau

Does the workaround mentioned here work for you? https://github.com/microsoft/pylance-release/issues/4579#issuecomment-1696059319

StellaHuang95 avatar May 15 '24 20:05 StellaHuang95

@StellaHuang95 This seems to work around the problem, indeed.

srittau avatar May 16 '24 12:05 srittau

Thank you for confirming. It seems that Pylance isn't picking up the language properly here. We'll investigate to see what might be causing the issue.

StellaHuang95 avatar May 16 '24 22:05 StellaHuang95

I'm not entirely sure it this is the same issue, but I had a similar problem. Also working on a German Windows environment and VSCode refused to change language to English. What fixed it for me is installing the German Language Pack (and then setting the language to English).

maflAT avatar May 17 '24 04:05 maflAT

How's your investigation going? Version 2025.3.2 does this again.

zgoda avatar Mar 26 '25 13:03 zgoda

Another workaround might be setting "python.analysis.displayEnglishDiagnostics": true

debonte avatar Mar 27 '25 22:03 debonte