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

The language of typeScript error prompt in *.vue file is confused #1959

Closed
lucyanddarlin opened this issue Oct 9, 2022 · 10 comments
Closed
Labels

Comments

@lucyanddarlin
Copy link

sometimes English, sometimes Chinese

image

image

@lucyanddarlin
Copy link
Author

the version of volar and vue-tsc is v1.0.1

@Cheng-DX
Copy link

Cheng-DX commented Oct 9, 2022

Same

@Cheng-DX
Copy link

Cheng-DX commented Oct 9, 2022

I got more version info:

  • vue-tsc v1.0.1 + volar v0.40.13 works correctly
  • vue-tsc v1.0.1 + volar ^1.0.0 works wrong

@oliverzy
Copy link

I have the same issue with the latest version of Volar.

The display language in *.vue file should be English instead of Chinese.

@imyangyong
Copy link

same issue +1

@johnsoncodehk
Copy link
Member

After checked the source code of vscode-languageserver-node, I think the problem is that it's using process.env['VSCODE_NLS_CONFIG'] for language server language, but process.env['VSCODE_NLS_CONFIG'] is system language instead of display language by default.

To fix this problem you can try change VSCode display language to any other language, and change back to en, it should force replace for process.env['VSCODE_NLS_CONFIG'].

@lucyanddarlin
Copy link
Author

It seems to work!

@Cheng-DX
Copy link

Changing display language works to me

@johnsoncodehk
Copy link
Member

johnsoncodehk commented Oct 11, 2022

I will make a patch in vue language server in 1.0.5 to avoid this problem.

@lucyanddarlin
Copy link
Author

thanks a lot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants