Skip to content

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

Open

Description

@Zebsterpasha

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)

Activity

  1. dbaeumer commented on Jul 5, 2023

    @dbaeumer
    Member

    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).

  2. dbaeumer commented on Jul 5, 2023

    @dbaeumer
    Member

    Where do you see these message?

  3. added
    info-needed
    on Jul 5, 2023
  4. Zebsterpasha commented on Jul 5, 2023

    @Zebsterpasha
    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

  5. added and removed
    info-needed
    on Jul 5, 2023
  6. 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.[/+] on Jul 5, 2023
  7. added
    feature-request
    and removed on Nov 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature-request

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions