ionide / FsAutoComplete

F# language server using Language Server Protocol
Other
391 stars 151 forks source link

fix and improves l10n #1181

Closed Tangent-90 closed 7 months ago

Tangent-90 commented 8 months ago

WHAT

🤖 Generated by Copilot at 26bce28

This pull request adds support for localized tooltips and code fixes for F# keywords, operators, errors, and warnings. It introduces new helper functions and modules to find and load localized XML files and match diagnostic messages. It modifies existing code fix modules to use the new functions and handle different message formats. It affects the files TipFormatter.fs, ResolveNamespace.fs, CodeFixes.fs, CodeFixes.fsi, and ReplaceWithSuggestion.fs.

🤖 Generated by Copilot at 26bce28

We're sailing on the F# sea, with code fixes for you and me We match the messages by check, and handle colors with a regex Heave away, me hearties, heave away We'll make the code work in any tongue, with ifDiagnosticByCheckMessage and findLocalizedXmlFile

🌐🔧💡

WHY

  1. fix: codefix ReplaceWithSuggestion and ResolveNamespace can now deal with localized compiler texts
  2. improves: now can load localized xml documents

HOW

🤖 Generated by Copilot at 26bce28

baronfel commented 7 months ago

IMO we can take this for now - but I think the proper fix would be for compiler changes to dump the relevant data into the diagnostic extra data, like some folks have started doing recently.

baronfel commented 7 months ago

@Tangent-90 thank you for this contribution!