Skip to content
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

GitLens dates use system locale instead of vscode language setting #1859

Closed
ImRodry opened this issue Mar 1, 2022 · 7 comments
Closed

GitLens dates use system locale instead of vscode language setting #1859

ImRodry opened this issue Mar 1, 2022 · 7 comments
Labels
bug Something isn't working

Comments

@ImRodry
Copy link

ImRodry commented Mar 1, 2022

  • GitLens Version: 12.0.0
  • Git Version: 2.35.1.windows.2
  • VSCode Version: 1.64.2 f80445acd5a3dadef24aa209168452a3d97cc326 x64
  • OS Version: Windows 11 version 21H1 OS build 22000.527

Steps to Reproduce:

  1. Set your system date locale to something different from your vscode language. On Windows you can do this by going to the Control Panel - Clock and Region - Region - Format and pick a country from the ones in the dropdown
  2. Enable a setting that shows when something happened (using the $ago variable). I'll be using "Current line blame" for this example
  3. Go to a line of code in your git project and observe the language the $ago variable is using:
    image
@ImRodry ImRodry added potential-bug triage Needs to be looked at labels Mar 1, 2022
@aspirantzhang
Copy link

aspirantzhang commented Mar 2, 2022

The same problem. It should be caused by the use of moment.js after the update. It is recommended to add a configuration item to set the moment locale in the settings or read the language configuration of vscode.
MomentLocale

@eamodio
Copy link
Member

eamodio commented Mar 2, 2022

I'm adding a new gitlens.defaultLocale setting to control this and it will be in the insiders version shortly.
@ImRodry I'm not aware of a VS Code language -- what setting controls that?

@ImRodry
Copy link
Author

ImRodry commented Mar 2, 2022

@ImRodry I'm not aware of a VS Code language -- what setting controls that?

@eamodio VS Code lets you pick the locale through a command. You can read more about that here: https://code.visualstudio.com/docs/getstarted/locales

@eamodio
Copy link
Member

eamodio commented Mar 2, 2022

Ugh, I knew that too -- sorry :( Will look to add an option to follow that too.

@ImRodry
Copy link
Author

ImRodry commented Mar 3, 2022

@eamodio instead of a new option you can just default that option you added to the current vscode locale IMO

@eamodio
Copy link
Member

eamodio commented Mar 3, 2022

The new default will be to follow vscode, but you can also use either "system" to follow the system or pick a specific locale.

eamodio added a commit that referenced this issue Mar 25, 2022
@github-actions
Copy link

github-actions bot commented Apr 2, 2022

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 2, 2022
@eamodio eamodio added bug Something isn't working and removed potential-bug labels Apr 12, 2023
@eamodio eamodio removed the triage Needs to be looked at label Dec 8, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants