Bug 150716 - "Ignore" and "Ignore All" don't work for LanguageTool errors
Summary: "Ignore" and "Ignore All" don't work for LanguageTool errors
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:24.8.0
Keywords:
Depends on:
Blocks: LanguageTool
  Show dependency treegraph
 
Reported: 2022-08-31 09:25 UTC by Daniel Naber
Modified: 2024-01-09 08:33 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
screenshot of sentence with error detected by LT (16.59 KB, image/png)
2022-08-31 09:25 UTC, Daniel Naber
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Naber 2022-08-31 09:25:38 UTC
Created attachment 182110 [details]
screenshot of sentence with error detected by LT

1. Activate LanguageTool under "LanguageTool Server Settings" as described at https://forum.languagetool.org/t/new-libreoffice-7-4-languagetool-remote-grammar-checker/8187/2?u=dnaber

2. Write "This is an test".

3. Right-click the underlined "an" and select "Ignore". The underline will disappear as expected.

4. Edit the sentence and wait 2-3 seconds and the underline will re-appear (maybe press return at the end of the sentence). The behavior is similar for "Ignore All".
 
Expected behavior: The underline should not re-appear. Not sure what the difference between "Ignore" and "Ignore all" should be - if "Ignore all" turns off the rule completely, there's no way to turn it on again, is there?
Comment 1 Julien Nabet 2022-08-31 18:06:32 UTC
On pc Debian x86-64 with master sources updated today, I don't reproduce this exactly.
Here what I did:
- follow 1. Activate LanguageTool under "LanguageTool Server Settings" as described at https://forum.languagetool.org/t/new-libreoffice-7-4-languagetool-remote-grammar-checker/8187/2?u=dnaber
- follow 2 Write "This is an test"
- Select the whole text + Tools/Language/For All Text/English USA
=> "an test" are underlined in blue
(and not just "an" which is underlined in red)

If I right-click, choose "Ignore" and edit again, the blue underline appears again.
But if I choose "Ignore All" and edit again, it doesn't reappear.
Comment 2 Daniel Naber 2022-08-31 18:20:40 UTC
(In reply to Julien Nabet from comment #1)

> => "an test" are underlined in blue
> (and not just "an" which is underlined in red)

In that case, the error is not coming from LanguageTool. Maybe you still have enabled other checkers, like LightProof?
Comment 3 Julien Nabet 2022-08-31 19:34:44 UTC
(In reply to Daniel Naber from comment #2)
> (In reply to Julien Nabet from comment #1)
> 
> > => "an test" are underlined in blue
> > (and not just "an" which is underlined in red)
> 
> In that case, the error is not coming from LanguageTool. Maybe you still
> have enabled other checkers, like LightProof?

Indeed, now I can reproduce this exactly.
Now since it uses a remote API, I just wonder how "Ignore"/"Ignore" may work?

No idea whom to ping here even after checked https://wiki.documentfoundation.org/FindTheExpert
Comment 4 Daniel Naber 2022-08-31 19:57:57 UTC
(In reply to Julien Nabet from comment #3)

> Indeed, now I can reproduce this exactly.
> Now since it uses a remote API, I just wonder how "Ignore"/"Ignore" may work?

The API is indeed read-only, so you cannot have a remote dictionary for words. For words, a local dictionary (as LO has anyway) could be used. For rules, a list of rule IDs would have to be stored locally, so that these matches can either be ignored or the `disabledRules` parameter (see https://languagetool.org/http-api/#!/default/post_check) would need to be used.
Comment 5 Commit Notification 2024-01-09 08:33:30 UTC
Gökay Şatır committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/7a179efac47776df917b7e8e18f9d91973c485db

tdf#150716 - Partially solves the issue.

It will be available in 24.8.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.