-
Notifications
You must be signed in to change notification settings - Fork 30.1k
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
OSX launches with wrong locale #16261
Comments
This has nothing to do with i18n. @bpasero moving to you since this looks like a electron / node issue under Mac. |
I can't replicate with:
OS Language preference set to "English". Steps:
I see ex. Then:
I see ex. So the OS locale is honoured and picks up changes immediately. @mikes-gh does this match what you did? |
Yes I get the same results as you. I get incorrect results from ToLocaleString() in the extension Im working on. You could try this as a repo.
https://github.com/DonJayamanne/gitHistoryVSCode Steps to get incorrect results
Steps to get correct results
Let me know if you can reproduce . Thanks for your help on this |
@jwhitfieldseed Did you mange to reproduce? |
@mikes-gh I'm sorry for the slow reply, I missed the notification. I can repro with your steps. I also get the incorrect results launching with Spotlight and Alfred. I can also repro with a fresh extension. I ran vscode.window.showInformationMessage('Hello World! ' + new Date().toLocaleString());
vscode.window.showInformationMessage(`[${vscode.env.language}]`);
vscode.window.showInformationMessage(`[${process.env.LANG}]`) Opening code from the terminal:
Opening code from Applications, Dock etc:
Opening code from the terminal with an explicit language, like this:
Gives me:
This is exactly the same output as if I change the OS language setting to French and open When I change the OS language setting to French and open code from the Dock, I get:
The expected output for This looks like two issues to me:
I'm not sure if part 2 is a bug or desired behaviour. |
I can also repro with a vanilla Electron app:
electron.dialog.showMessageBox({ message: new Date().toLocaleString() })
Running from the terminal: ( Running from Finder alerts I can't tell if this is a vanilla Electron or a packaging issue (since I don't know how to repro it without a packager). I'll raise an issue on |
@mikes-gh can you print what kind of environment variables you have defined? I suspect your terminal has some |
|
@mikes-gh you should be able to fix this by removing this from your environment:
|
The problem is launching from dock. Desired behaviour is that vscode uses computer regional settings. Its a confirmed issue with electron |
I also encountered the same cause problem. |
Is this still happening? |
Yes, it is. ( vscode 1.18.0, macOS Sierra 10.12.6 ) |
Is this still happening? |
Yes, it is. ( vscode 1.26.1, macOS High Sierra 10.13.5 ) This is my vscode extention's screenshot when This is my vscode extention's screenshot when I can not recommend vscode to mac users because of this problem. |
とは言っても、とりあえず microsoft/vscode#16261 の問題についてのみ
This is still happening. ( vscode 1.27.2, macOS Mojave 10.14 ( Darwin 18.0.0 ) ) ( I know it is macOS's fault. This is just a report. ) |
I'm having an issue that I think is related to this. I changed my $SHELL with
to use the homebrew version. The change was picked up immediately by Terminal.app when creating a new shell. VSCode continues to launch the OSX version and
produces: A workaround is to set the "terminal.integrated.shell.osx" option. This launches the right shell, but doesn't fix $SHELL, so I also added this to ~/.bash_profile:
Hope people find this helpful. Also, I think this is related to some downstream vscode-python issues with environment variables: |
This issue is being closed to keep the number of issues in our inbox on a manageable level, we are closing issues that are not going to be addressed in the foreseeable future: We look at the number of votes the issue has received and the number of duplicate issues filed. More details here. If you disagree and feel that this issue is crucial: We are happy to listen and to reconsider. If you wonder what we are up to, please see our roadmap and issue reporting guidelines. Thanks for your understanding and happy coding! |
locale en-GB
Steps to Reproduce:
Date.prototype.toLocaleString();
code
I get en-GB dates fromDate.prototype.toLocaleString();
On Windows 7 I always get en-GB dates
The text was updated successfully, but these errors were encountered: