New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Python extension doesn't obey locale settings #62623
Comments
@pauloneves Can you please report this to the owner of the Python extension. We don't ship that extension inside VS Code and all other extensions seem to honor the language setting correctly. |
Please ping if you think this otherwise. |
@dbaeumer |
@DonJayamanne yes, that is true. The reason why I asked him to start with the extension is that it seems to work for all the other extensions (see his screen shot). So there seems to be something special with Python here. So in these cases we usually start with the extension that shows the problem. I am not saying that this is not a bug in VS Code. Are you able to reproduce this? |
Nope, not my end |
I think what is special with his setup is that is OS locale is already Brazillian Portuguese. Could that have an impact for the Python extensions? |
Nope, there's nothing special about the localizations in our extension, we jsut create the localized files ( |
If we can't reproduce this and there is nothing with Python extension I have no idea how to track this down. @pauloneves does this persist if you uninstall and reinstall the Python extension? |
I had the same issue (see microsoft/vscode-python#3307), only with german as second language. After uninstalling, reloading, installing the python extension again, everything is good. No German artifacts in the command palette. Also, with this I can not tell if I can reproduce the state where the extension was switched to german. But: I did not change languages/locales in any way, it happened within the first day of using
|
We're in the same position, besides as mentioned earlier, we don't control what locale is picked by VSC, to my knowledge there's no such API in VSC. |
@berend have you experienced this with any other extension? |
No, I have not experienced this with other extensions. But - to be fair - I used command palette probably for python commands only. Also if other extensions don't have german locales, the error would not have appeared (like for me the python jupyter settings were still english, because there was no german translation yet). |
I think I have a little more info. I never installed the localization of VSCode in my own language. I doubt any other extension already come localized to Brazilian Portuguese. Maybe VSCode isn't obeying my locale configuration. Since I don't have its localization installed, it defaults to English, but the Python extension has Portuguese and uses the translated strings. |
@DonJayamanne how do you translate the python extension ? |
The messages you see in the screen shot are commands in the command pallete. |
@pauloneves I have the same Issue, with Spanish as you can see in the image |
What is really strange is the fact that this only happens with the Python extension. I will check what makes it so special. @DonJayamanne is Python part of any language pack. |
I can not reproduce this on a German Windows. See attached screen shot: There is one thing to note: since the Python extension ships the translations pre-packaged (not with a language pack) the following can happen on a German machine:
However when setting in the locale.json 'en' for me both VS Code and the python extension is on English (see screen shot). @DonJayamanne you might want to consider shipping your translations inside the language pack So the question is why this is not working for @nmacosta @pauloneves as it does for me :-( Is there anything you can detect that is different than what I tried? |
@berend what is your default OS locale? |
German, I guess. This is a picture of my settings: If you need any other info, let me know. Also, this is the output from ▶ locale
LANG="de_DE.UTF-8"
LC_COLLATE="de_DE.UTF-8"
LC_CTYPE="de_DE.UTF-8"
LC_MESSAGES="de_DE.UTF-8"
LC_MONETARY="de_DE.UTF-8"
LC_NUMERIC="de_DE.UTF-8"
LC_TIME="de_DE.UTF-8"
LC_ALL= |
What do you mean by language pack? |
@berend this explains why you see the Python in German unless you configure the local for VS Code to be English in all cases. Can you still repro this even if you configure the display language to be English? @DonJayamanne MS extensions are usually getting their strings through the language pack. VS Code itself only ships with English since a while. See https://marketplace.visualstudio.com/search?target=VSCode&category=Language%20Packs&sortBy=Downloads |
Visual studio code locale is English.
Am Di., 20. Nov. 2018, 17:41 hat Dirk Bäumer <notifications@github.com>
geschrieben:
… @berend <https://github.com/berend> this explains why you see the Python
in German unless you configure the local for VS Code to be English in all
cases.
@DonJayamanne <https://github.com/DonJayamanne> MS extensions are usually
getting their strings through the language pack. VS Code itself only ships
with English since a while. See
https://marketplace.visualstudio.com/search?target=VSCode&category=Language%20Packs&sortBy=Downloads
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#62623 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AApHkfzG3P4uE51awJ870Dh287VcU5ZRks5uxDCpgaJpZM4YPgMH>
.
|
Is this what other extension do? I don't think so. |
@dbaeumer I'm sorry if I misled you into thinking it was a fresh vscode install, it wasn't; and never had its locale as 'pt-br'. |
@marcosmesser the interesting question is if you had a locale.json file denoting 'en' before you installed Python. |
This issue has been closed automatically because it needs more information and has not had recent activity. See also our issue reporting guidelines. Happy Coding! |
Reopening since users still see this. |
This issue has been closed automatically because it needs more information and has not had recent activity. See also our issue reporting guidelines. Happy Coding! |
Lets see if we find something out in January. |
@dbaeumer Sorry, I don't have a Windows / pt-br environment anymore, and won't be able to test it. But, regarding your last question; I do believe there was a locale.json set to English, as I had been using that installation for a few months (always in English), with several extensions (all in English; although, I don't how many had localization). |
Moving to February. Still no idea to reproduce :-( |
I was able to reproduce this issue on Mac whose locale is set to Spanish:
All my VS Code UI is in English (as I want), but Python Extension is showing commands in the Command Palette in Spanish. Somehow, the Python Extension locale is being adopted from system locale and not from VS Code locale. To solve this issue:
|
@gzurl thanks. Anything special how you got into the state. I tried to get into it but without any luck. Do you know when you installed the Python extension did you already have switch the UI to English using the |
@dbaeumer nothing special: I just installed VS Code and the UI was already in English (which is great for me). So I didn't have to change any single line in my
I really think that for whatever reason the Python extension is not using this file to match its UI. Hope this helps! |
This is not really a bug. Just a weird behavior of VS Code. What happens is if you never configure the display language, the locale.json file in AppData\Roaming\Code\User (on windows) is not created. If you do not have any language pack, the OS locale will be used, but VS Code will display in english. If your locale is in the Python extension (for me, it was French), then the commands of the extension appear in the locale. For me at least, I can only reproduce if locale.json does not exist. |
I found a code path were we ask the extension to use the OS locale even if the UI is not rendered in that locale. I will fix this. However this doesn't explain the behavior were a English locale is used in the |
I was seeing this today (VS Code in English, except for Python extension in French). emonette123's solution worked for me, so thanks. However, it is also a bug. All parts of the application should always be getting their locale setting from the same source. |
Steps to reproduce:
Ensure that the Python commands in the command palette are shown in English. |
Issue Type: Bug
My OS language is Brazillian Portuguese. Although my locale is set as english in my VSCode configuration, the Python extension commands are displayed in Portuguese. All other commands are in English.
VS Code version: Code 1.28.2 (7f3ce96, 2018-10-17T00:23:51.859Z)
OS version: Windows_NT x64 10.0.17134
System Info
checker_imaging: disabled_off
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
native_gpu_memory_buffers: disabled_software
rasterization: enabled
video_decode: enabled
video_encode: enabled
webgl: enabled
webgl2: enabled
Extensions (23)
(1 theme extensions excluded)
The text was updated successfully, but these errors were encountered: