valentjn / vscode-ltex

LTeX: Grammar/spell checker :mag::heavy_check_mark: for VS Code using LanguageTool with support for LaTeX :mortar_board:, Markdown :pencil:, and others
https://valentjn.github.io/ltex
Mozilla Public License 2.0
815 stars 29 forks source link

Spell checker with option en-GB is still using en-US #885

Open Miguel-LlamasLanza opened 3 months ago

Miguel-LlamasLanza commented 3 months ago

Describe the bug I use the en-GB language to spell-check in Latex, but it marks as wrong words like characterisation or minimise, suggesting instead their versions with "z" (US spelling).

Steps to reproduce Steps to reproduce the behavior:

  1. Open settings.json
  2. Add "ltex.language": "en-GB",
  3. Write in a file something like: "This function minimises the uncertainties."
  4. See the word minimise highlighted due to the use of an "s" (UK spelling)

Expected behavior It should have changed to UK spelling

LTeX configuration

``` "ltex.language": "en-GB" ```

"LTeX Language Server" log file

``` Aug 06, 2024 2:06:34 PM org.bsplines.ltexls.server.DocumentChecker logTextToBeChecked FINE: Checking the following text in language 'en-GB' via LanguageTool: " \n\nThesis by chapters Miguel Llamas Lanza \n\n\n\n\n\n\n\n\n\n\n\n\n\n" Aug 06, 2024 2:06:34 PM org.bsplines.ltexls.server.DocumentChecker checkAnnotatedTextFragment FINE: Obtained 0 rule matches Aug 06, 2024 2:06:43 PM org.bsplines.ltexls.server.DocumentChecker logTextToBeChecked FINE: Checking the following text in language 'en-GB' via LanguageTool: " \n\nThesis by chapters Miguel Llamas Lanza \n\n\n\n\n\n\n\n\n\n\n\n\n\n" Aug 06, 2024 2:06:43 PM org.bsplines.ltexls.server.DocumentChecker checkAnnotatedTextFragment FINE: Obtained 0 rule matches Aug 06, 2024 2:06:45 PM org.bsplines.ltexls.server.DocumentChecker logTextToBeChecked FINE: Checking the following text in language 'en-GB' via LanguageTool: " \n\nThesis by chapters Miguel Llamas Lanza \n\n\n\n\n\n\n\n\n\nTh\n\n\n\n" Aug 06, 2024 2:06:45 PM org.bsplines.ltexls.server.DocumentChecker checkAnnotatedTextFragment FINE: Obtained 1 rule match Aug 06, 2024 2:06:46 PM org.bsplines.ltexls.server.DocumentChecker logTextToBeChecked FINE: Checking the following text in language 'en-GB' via LanguageTool: " \n\nThesis by chapters Miguel Llamas Lanza \n\n\n\n\n\n\n\n\n\nThis\n\n\n\n" Aug 06, 2024 2:06:46 PM org.bsplines.ltexls.server.DocumentChecker checkAnnotatedTextFragment FINE: Obtained 0 rule matches Aug 06, 2024 2:06:47 PM org.bsplines.ltexls.server.DocumentChecker logTextToBeChecked FINE: Checking the following text in language 'en-GB' via LanguageTool: " \n\nThesis by chapters Miguel Llamas Lanza \n\n\n\n\n\n\n\n\n\nThis fu\n\n\n\n" Aug 06, 2024 2:06:47 PM org.bsplines.ltexls.server.DocumentChecker checkAnnotatedTextFragment FINE: Obtained 0 rule matches Aug 06, 2024 2:06:47 PM org.bsplines.ltexls.server.DocumentChecker logTextToBeChecked FINE: Checking the following text in language 'en-GB' via LanguageTool: " \n\nThesis by chapters Miguel Llamas Lanza \n\n\n\n\n\n\n\n\n\nThis function\n\n\n\n" Aug 06, 2024 2:06:47 PM org.bsplines.ltexls.server.DocumentChecker checkAnnotatedTextFragment FINE: Obtained 0 rule matches Aug 06, 2024 2:06:48 PM org.bsplines.ltexls.server.DocumentChecker logTextToBeChecked FINE: Checking the following text in language 'en-GB' via LanguageTool: " \n\nThesis by chapters Miguel Llamas Lanza \n\n\n\n\n\n\n\n\n\nThis function\n\n\n\n" Aug 06, 2024 2:06:48 PM org.bsplines.ltexls.server.DocumentChecker checkAnnotatedTextFragment FINE: Obtained 0 rule matches Aug 06, 2024 2:06:49 PM org.bsplines.ltexls.server.DocumentChecker logTextToBeChecked FINE: Checking the following text in language 'en-GB' via LanguageTool: " \n\nThesis by chapters Miguel Llamas Lanza \n\n\n\n\n\n\n\n\n\nThis function mi\n\n\n\n" Aug 06, 2024 2:06:49 PM org.bsplines.ltexls.server.DocumentChecker checkAnnotatedTextFragment FINE: Obtained 1 rule match Aug 06, 2024 2:06:50 PM org.bsplines.ltexls.server.DocumentChecker logTextToBeChecked FINE: Checking the following text in language 'en-GB' via LanguageTool: " \n\nThesis by chapters Miguel Llamas Lanza \n\n\n\n\n\n\n\n\n\nThis function mini\n\n\n\n" Aug 06, 2024 2:06:50 PM org.bsplines.ltexls.server.DocumentChecker checkAnnotatedTextFragment FINE: Obtained 0 rule matches Aug 06, 2024 2:06:50 PM org.bsplines.ltexls.server.DocumentChecker logTextToBeChecked FINE: Checking the following text in language 'en-GB' via LanguageTool: " \n\nThesis by chapters Miguel Llamas Lanza \n\n\n\n\n\n\n\n\n\nThis function minimi\n\n\n\n" Aug 06, 2024 2:06:50 PM org.bsplines.ltexls.server.DocumentChecker checkAnnotatedTextFragment FINE: Obtained 0 rule matches Aug 06, 2024 2:06:51 PM org.bsplines.ltexls.server.DocumentChecker logTextToBeChecked FINE: Checking the following text in language 'en-GB' via LanguageTool: " \n\nThesis by chapters Miguel Llamas Lanza \n\n\n\n\n\n\n\n\n\nThis function minimis\n\n\n\n" Aug 06, 2024 2:06:51 PM org.bsplines.ltexls.server.DocumentChecker checkAnnotatedTextFragment FINE: Obtained 0 rule matches Aug 06, 2024 2:06:51 PM org.bsplines.ltexls.server.DocumentChecker logTextToBeChecked FINE: Checking the following text in language 'en-GB' via LanguageTool: " \n\nThesis by chapters Miguel Llamas Lanza \n\n\n\n\n\n\n\n\n\nThis function minimises th\n\n\n\n" Aug 06, 2024 2:06:51 PM org.bsplines.ltexls.server.DocumentChecker checkAnnotatedTextFragment FINE: Obtained 1 rule match Aug 06, 2024 2:06:52 PM org.bsplines.ltexls.server.DocumentChecker logTextToBeChecked FINE: Checking the following text in language 'en-GB' via LanguageTool: " \n\nThesis by chapters Miguel Llamas Lanza \n\n\n\n\n\n\n\n\n\nThis function minimises the\n\n\n\n" Aug 06, 2024 2:06:52 PM org.bsplines.ltexls.server.DocumentChecker checkAnnotatedTextFragment FINE: Obtained 1 rule match Aug 06, 2024 2:06:54 PM org.bsplines.ltexls.server.DocumentChecker logTextToBeChecked FINE: Checking the following text in language 'en-GB' via LanguageTool: " \n\nThesis by chapters Miguel Llamas Lanza \n\n\n\n\n\n\n\n\n\nThis function minimises the u\n\n\n\n" Aug 06, 2024 2:06:54 PM org.bsplines.ltexls.server.LtexTextDocumentItem raiseExceptionIfCanceled FINE: Canceling check due to incoming check request... Aug 06, 2024 2:06:54 PM org.bsplines.ltexls.server.DocumentChecker logTextToBeChecked FINE: Checking the following text in language 'en-GB' via LanguageTool: " \n\nThesis by chapters Miguel Llamas Lanza \n\n\n\n\n\n\n\n\n\nThis function minimises the un\n\n\n\n" Aug 06, 2024 2:06:54 PM org.bsplines.ltexls.server.DocumentChecker checkAnnotatedTextFragment FINE: Obtained 1 rule match Aug 06, 2024 2:06:55 PM org.bsplines.ltexls.server.DocumentChecker logTextToBeChecked FINE: Checking the following text in language 'en-GB' via LanguageTool: " \n\nThesis by chapters Miguel Llamas Lanza \n\n\n\n\n\n\n\n\n\nThis function minimises the unc\n\n\n\n" Aug 06, 2024 2:06:55 PM org.bsplines.ltexls.server.DocumentChecker checkAnnotatedTextFragment FINE: Obtained 1 rule match Aug 06, 2024 2:06:55 PM org.bsplines.ltexls.server.DocumentChecker logTextToBeChecked FINE: Checking the following text in language 'en-GB' via LanguageTool: " \n\nThesis by chapters Miguel Llamas Lanza \n\n\n\n\n\n\n\n\n\nThis function minimises the unce\n\n\n\n" Aug 06, 2024 2:06:55 PM org.bsplines.ltexls.server.DocumentChecker checkAnnotatedTextFragment FINE: Obtained 1 rule match Aug 06, 2024 2:06:55 PM org.bsplines.ltexls.server.DocumentChecker logTextToBeChecked FINE: Checking the following text in language 'en-GB' via LanguageTool: " \n\nThesis by chapters Miguel Llamas Lanza \n\n\n\n\n\n\n\n\n\nThis function minimises the uncer\n\n\n\n" Aug 06, 2024 2:06:55 PM org.bsplines.ltexls.server.DocumentChecker checkAnnotatedTextFragment FINE: Obtained 1 rule match Aug 06, 2024 2:06:55 PM org.bsplines.ltexls.server.DocumentChecker logTextToBeChecked FINE: Checking the following text in language 'en-GB' via LanguageTool: " \n\nThesis by chapters Miguel Llamas Lanza \n\n\n\n\n\n\n\n\n\nThis function minimises the uncert\n\n\n\n" Aug 06, 2024 2:06:55 PM org.bsplines.ltexls.server.DocumentChecker checkAnnotatedTextFragment FINE: Obtained 1 rule match Aug 06, 2024 2:06:55 PM org.bsplines.ltexls.server.DocumentChecker logTextToBeChecked FINE: Checking the following text in language 'en-GB' via LanguageTool: " \n\nThesis by chapters Miguel Llamas Lanza \n\n\n\n\n\n\n\n\n\nThis function minimises the uncerta\n\n\n\n" Aug 06, 2024 2:06:55 PM org.bsplines.ltexls.server.DocumentChecker checkAnnotatedTextFragment FINE: Obtained 1 rule match Aug 06, 2024 2:06:55 PM org.bsplines.ltexls.server.DocumentChecker logTextToBeChecked FINE: Checking the following text in language 'en-GB' via LanguageTool: " \n\nThesis by chapters Miguel Llamas Lanza \n\n\n\n\n\n\n\n\n\nThis function minimises the uncertai\n\n\n\n" Aug 06, 2024 2:06:55 PM org.bsplines.ltexls.server.DocumentChecker checkAnnotatedTextFragment FINE: Obtained 1 rule match Aug 06, 2024 2:06:55 PM org.bsplines.ltexls.server.DocumentChecker logTextToBeChecked FINE: Checking the following text in language 'en-GB' via LanguageTool: " \n\nThesis by chapters Miguel Llamas Lanza \n\n\n\n\n\n\n\n\n\nThis function minimises the uncertain\n\n\n\n" Aug 06, 2024 2:06:55 PM org.bsplines.ltexls.server.DocumentChecker checkAnnotatedTextFragment FINE: Obtained 1 rule match Aug 06, 2024 2:06:55 PM org.bsplines.ltexls.server.DocumentChecker logTextToBeChecked FINE: Checking the following text in language 'en-GB' via LanguageTool: " \n\nThesis by chapters Miguel Llamas Lanza \n\n\n\n\n\n\n\n\n\nThis function minimises the uncertaint\n\n\n\n" Aug 06, 2024 2:06:55 PM org.bsplines.ltexls.server.DocumentChecker checkAnnotatedTextFragment FINE: Obtained 1 rule match Aug 06, 2024 2:06:56 PM org.bsplines.ltexls.server.DocumentChecker logTextToBeChecked FINE: Checking the following text in language 'en-GB' via LanguageTool: " \n\nThesis by chapters Miguel Llamas Lanza \n\n\n\n\n\n\n\n\n\nThis function minimises the uncertainty\n\n\n\n" Aug 06, 2024 2:06:56 PM org.bsplines.ltexls.server.DocumentChecker checkAnnotatedTextFragment FINE: Obtained 1 rule match Aug 06, 2024 2:06:57 PM org.bsplines.ltexls.server.DocumentChecker logTextToBeChecked FINE: Checking the following text in language 'en-GB' via LanguageTool: " \n\nThesis by chapters Miguel Llamas Lanza \n\n\n\n\n\n\n\n\n\nThis function minimises the uncertainty.\n\n\n\n" Aug 06, 2024 2:06:57 PM org.bsplines.ltexls.server.DocumentChecker checkAnnotatedTextFragment FINE: Obtained 1 rule match ```

"LTeX Language Client" log file

``` 2024-08-05T20:37:17.643Z Info: Setting LTeX UI language to 'en-gb'. 2024-08-05T20:37:17.644Z Info: Loading i18n messages... 2024-08-05T20:37:17.644Z Info: Loading default i18n messages... 2024-08-05T20:37:17.646Z Info: 2024-08-05T20:37:17.646Z Info: ltex.ltex-ls.path not set. 2024-08-05T20:37:17.646Z Info: Searching for ltex-ls in '/home/lmiguel/.vscode/extensions/valentjn.vscode-ltex-13.1.0/lib'... 2024-08-05T20:37:17.647Z Info: ltex-ls found in '/home/lmiguel/.vscode/extensions/valentjn.vscode-ltex-13.1.0/lib/ltex-ls-15.2.0'. 2024-08-05T20:37:17.647Z Info: 2024-08-05T20:37:17.647Z Info: Using ltex-ls from '/home/lmiguel/.vscode/extensions/valentjn.vscode-ltex-13.1.0/lib/ltex-ls-15.2.0'. 2024-08-05T20:37:17.647Z Info: Using Java bundled with ltex-ls as ltex.java.path is not set. 2024-08-05T20:37:17.647Z Info: Testing ltex-ls... 2024-08-05T20:37:17.647Z Info: Command: "/home/lmiguel/.vscode/extensions/valentjn.vscode-ltex-13.1.0/lib/ltex-ls-15.2.0/bin/ltex-ls" 2024-08-05T20:37:17.647Z Info: Arguments: ["--version"] 2024-08-05T20:37:17.647Z Info: env['JAVA_HOME']: undefined 2024-08-05T20:37:17.647Z Info: env['JAVA_OPTS']: "-Xms64m -Xmx512m" 2024-08-05T20:37:17.943Z Info: Test successful! 2024-08-05T20:37:17.943Z Info: 2024-08-05T20:37:17.945Z Info: Starting ltex-ls... 2024-08-05T20:37:17.945Z Info: Command: "/home/lmiguel/.vscode/extensions/valentjn.vscode-ltex-13.1.0/lib/ltex-ls-15.2.0/bin/ltex-ls" 2024-08-05T20:37:17.945Z Info: Arguments: [] 2024-08-05T20:37:17.945Z Info: env['JAVA_HOME']: undefined 2024-08-05T20:37:17.945Z Info: env['JAVA_OPTS']: "-Xms64m -Xmx512m" 2024-08-05T20:37:17.945Z Info: 2024-08-05T20:37:19.880Z Info: Started watching external setting file '/home/lmiguel/Thesis/Thesis Latex/.vscode/ltex.dictionary.en-GB.txt'. 2024-08-05T20:37:19.882Z Info: Started watching external setting file '/home/lmiguel/Thesis/Thesis Latex/.vscode/ltex.disabledRules.en-GB.txt'. 2024-08-05T20:37:19.886Z Info: Started watching external setting file '/home/lmiguel/Thesis/Thesis Latex/.vscode/ltex.hiddenFalsePositives.en-GB.txt'. ```

Version information List here the version information of the relevant software.

goodgerster commented 2 months ago

This is triggered by this rule, which you can disable: https://community.languagetool.org/rule/show/OXFORD_SPELLING_Z_NOT_S

I find that spellings like 'analyze' and 'color' are flagged correctly in en-GB mode.

Miguel-LlamasLanza commented 2 months ago

Thank you. I have indeed disabled it for now. It would be nice to have the opposite rule, actually (convert from z to s).