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

Allow clients of the LSP library to capture all errors and show customized / localized message. #1262

Open
Zebsterpasha opened this issue Jul 4, 2023 · 3 comments
Labels
feature-request Request for new features or functionality
Milestone

Comments

@Zebsterpasha
Copy link

Zebsterpasha commented Jul 4, 2023

Hi) I've faced with some not localized phrases in products use your module.
Some packages throw errors and exceptions without any processing (for example: package vscode-languageserver).

Could you, please, add localization for theese phrases?

For example, I faced with that and some other messages:

const error = new ResponseError(ErrorCodes.PendingResponseRejected, 'Pending response rejected since connection got disposed');

Thanks in advance)

@dbaeumer
Copy link
Member

dbaeumer commented Jul 5, 2023

Most of the error message are kept in English since they should only end-up in Logs/Log output channels. We do this since we would not understand localized message otherwise (it for example can't speak Spanish and could not make any use of a Spanish message in the log).

@dbaeumer
Copy link
Member

dbaeumer commented Jul 5, 2023

Where do you see these message?

@dbaeumer dbaeumer added the info-needed Issue requires more information from poster label Jul 5, 2023
@Zebsterpasha
Copy link
Author

Most of the error message are kept in English since they should only end-up in Logs/Log output channels. We do this since we would not understand localized message otherwise (it for example can't speak Spanish and could not make any use of a Spanish message in the log).

Yaeh, I understand it, but some products use your product as a dependency and some messages throws in the UI without any processing, and I can't handle it on my side.

image

Here these messages in the UI.
It came from Theia, but in Theia it had come from the vscode-jsonrpc npm dependency module.
Some time ago, all of these phrases were in the file "vscode-jsonrpc/lib/common/connection.js", it was like this:

"Pending response rejected since connection got disposed"
"Restarting server failed"
"Server initialization failed."
"${this._name} client: couldn't create connection to server."
"The ${this.client.name} server crashed ${this.maxRestartCount + 1} times in the last 3 minutes. The server will not be restarted. See the output for more information." 

But not I could find just one phrase.

Here another example of how it looks (not mine) in vscode extension:
image

Issue where I got last picture: microsoft/pylance-release#3391

@dbaeumer dbaeumer added feature request and removed info-needed Issue requires more information from poster labels Jul 5, 2023
@dbaeumer dbaeumer added this to the Backlog milestone Jul 5, 2023
@dbaeumer dbaeumer changed the title Some error's phrases are not localized Allow clients of the LSP library to capture all errors and show customized / localized message. Jul 5, 2023
@dbaeumer dbaeumer added feature-request Request for new features or functionality and removed feature request labels Nov 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request Request for new features or functionality
Projects
None yet
Development

No branches or pull requests

2 participants