jendrikseipp / rednotebook

RedNotebook is a cross-platform journal
https://rednotebook.app
GNU General Public License v2.0
477 stars 109 forks source link

Spellcheck doesn't handle apostrophes #714

Closed s-i-m-s closed 11 months ago

s-i-m-s commented 1 year ago

Describe the bug Spellcheck doesn't handle "'" so "isn't" is read as "isn" and flagged as incorrect.

To Reproduce Try to type any correctly spelled n't contraction in the journal area.

Expected behavior

Properly detect that "isn't" is actually a word.

Screenshots https://i.imgur.com/ZqyPxWo.jpg

Versions: 2.26 via portable apps Windows 7 w/SP1 and all updates till they stopped issuing them but not the extended support ones.

Log output when reproducing bug 2023-07-14 16:30:56,976 INFO Writing log to file "K:\RedNotebookPortable\App\RedNotebook../../Data/usersettings\rednotebook.log" 2023-07-14 16:30:56,976 INFO System encoding: mbcs 2023-07-14 16:30:56,976 INFO Language code: en_US 2023-07-14 16:30:57,171 INFO Using pyyaml for loading and dumping 2023-07-14 16:30:57,173 INFO Running in portable mode: True 2023-07-14 16:30:57,173 INFO First Start: False 2023-07-14 16:30:57,173 INFO RedNotebook version: 2.26 2023-07-14 16:30:57,174 INFO System info: machine: AMD64, platform: Windows-7-6.1.7601-SP1, processor: Intel64 Family 6 Model 37 Stepping 5, GenuineIntel, python_version: 3.4.4, release: 7, system: Windows, GTK: (3, 18, 9), Glib: (2, 52, 1), PyGObject: (3, 18, 2), YAML: 5.3.1 2023-07-14 16:30:58,661 DEBUG Default font: Segoe UI 9 2023-07-14 16:30:58,661 DEBUG Default size: 9.0 2023-07-14 16:30:59,414 DEBUG Tray icon visible: False 2023-07-14 16:30:59,417 INFO Opening journal at 'K:\RedNotebookPortable\Data\usersettings\data' 2023-07-14 16:30:59,418 DEBUG Starting to load files in dir "K:\RedNotebookPortable\Data\usersettings\data" 2023-07-14 16:30:59,418 DEBUG Loading file "K:\RedNotebookPortable\Data\usersettings\data\2023-05.txt" 2023-07-14 16:30:59,440 DEBUG Loading file "K:\RedNotebookPortable\Data\usersettings\data\2023-06.txt" 2023-07-14 16:30:59,468 DEBUG Loading file "K:\RedNotebookPortable\Data\usersettings\data\2023-07.txt" 2023-07-14 16:30:59,505 DEBUG Finished loading files in dir "K:\RedNotebookPortable\Data\usersettings\data" 2023-07-14 16:30:59,778 INFO Connected Signals: [2, 22, 15] 2023-07-14 16:30:59,778 DEBUG Start took 2.6061530113220215 seconds 2023-07-14 16:30:59,778 DEBUG Trying to enter the gtk main loop 2023-07-14 16:31:00,068 INFO Last backup was made -2913344 days ago

pdtangney commented 1 year ago

I have this same issue using version 2.29 on Debain 12. I believe this has been a probem for a while now. Log file says I'm using Enchant: Aspell provider.

Any word which is a contraction (doesn't, isn't, can't) gets marked as incorrect. However, if there is a complete word before the apostrophy, such as computer's, then the word does not get marked as missspelled. In other words, computer's is correct, because computer is correct, whereas doesn't is wrong, because doesn isn't a word.

jendrikseipp commented 11 months ago

This seems to be a bug in an underlying library (Pango), so there's no easy way for us to fix this. See https://github.com/koehlma/pygtkspellcheck/issues/33.

s-i-m-s commented 10 months ago

Is there a current ticket? The one you linked to https://bugzilla.gnome.org/show_bug.cgi?id=97545 shows the bug to have been fixed back in 2017 but that bug tracker is no longer used and I can't find anything related mentioning apostrophes in the new https://gitlab.gnome.org/GNOME/pango/-/issues location.

jendrikseipp commented 10 months ago

It's probably best to open a new ticket then. Maybe you can try replicating the bug in other Python+GTK apps first.