microsoft / pylance-release

Documentation and issues for Pylance
Creative Commons Attribution 4.0 International
1.67k stars 770 forks source link

Pylance doesn't honor VSCode display language #5880

Open srittau opened 1 month ago

srittau commented 1 month ago

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

StellaHuang95 commented 1 month ago

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

srittau commented 1 month ago

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

StellaHuang95 commented 1 month ago

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.

maflAT commented 1 month ago

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).