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
785 stars 26 forks source link

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

Open Miguel-LlamasLanza opened 1 month ago

Miguel-LlamasLanza commented 1 month 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 4 weeks 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 4 weeks 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).

El vie., 16 ago. 2024 17:18, Benjamin Goodger @.***> escribió:

This is triggered by this rule, which you can disable: https://community.languagetool.org/rule/show/OXFORD_SPELLING_Z_NOT_S https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fcommunity.languagetool.org%2Frule%2Fshow%2FOXFORD_SPELLING_Z_NOT_S&data=05%7C02%7Cmiglla-9%40student.ltu.se%7Cfe75fd5f7ac74723d6de08dcbe06a9c6%7C5453408ba6cd4c1e8b1018b500fb544e%7C0%7C0%7C638594183023872776%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=pus9HrIuKr5H2dK96peLg2WepBA3nIkgLJuIezOY0sc%3D&reserved=0

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

— Reply to this email directly, view it on GitHub https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fvalentjn%2Fvscode-ltex%2Fissues%2F885%23issuecomment-2293700768&data=05%7C02%7Cmiglla-9%40student.ltu.se%7Cfe75fd5f7ac74723d6de08dcbe06a9c6%7C5453408ba6cd4c1e8b1018b500fb544e%7C0%7C0%7C638594183023872776%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=JEQtQy34w%2FoB7dpW%2BqcYL7ULmdFRsdInfkJYd4jKG%2FY%3D&reserved=0, or unsubscribe https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAPJZAIVVT6D4WLEYRP6HLDTZRYJ3XAVCNFSM6AAAAABMCGR72KVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEOJTG4YDANZWHA&data=05%7C02%7Cmiglla-9%40student.ltu.se%7Cfe75fd5f7ac74723d6de08dcbe06a9c6%7C5453408ba6cd4c1e8b1018b500fb544e%7C0%7C0%7C638594183023872776%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=lqlDi3Wtenawmi2YkIpNtD7jaLRK353XfCY8J7YjlgI%3D&reserved=0 . You are receiving this because you authored the thread.[image: Web Bug from https://github.com/notifications/beacon/APJZAIXDUC3DZVMCCYW5PMLZRYJ3XA5CNFSM6AAAAABMCGR72KWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTUIW4MKA.gif]Message ID: @.> [ { @.": "http://schema.org", @.": "EmailMessage", "potentialAction": { @.": "ViewAction", "target": " https://github.com/valentjn/vscode-ltex/issues/885#issuecomment-2293700768", "url": " https://github.com/valentjn/vscode-ltex/issues/885#issuecomment-2293700768", "name": "View Issue" }, "description": "View this Issue on GitHub", "publisher": { @.***": "Organization", "name": "GitHub", "url": " https://github.com" } } ]