Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spell check tool and adding dictionaries #982

Closed
vkbo opened this issue Feb 4, 2022 · 4 comments · Fixed by #984 or #1611
Closed

Spell check tool and adding dictionaries #982

vkbo opened this issue Feb 4, 2022 · 4 comments · Fixed by #984 or #1611
Assignees
Labels
enhancement Request: New feature or improvement next release Note: Features planned for next release

Comments

@vkbo
Copy link
Owner

vkbo commented Feb 4, 2022

I would like to add a dialog tool for spell checking similar to what is used in office applications. It is useful for people who don't want automatic spell checking. Automatic checking can also be quite slow on large documents.

In addition, the enchant package that is used for spell checking only comes with English dictionaries on Windows. Since it uses the same dictionaries as Firefox, Libre Office and Free Office, among other tools, it should be easy enough to import them. A simple dialog could handle an import from downloaded files.

hunspell dictionaries must be added to a folder named hunspell under the path given by enchant.get_user_config_dir() from within novelWriter. That path should be C:\Users\<UserName>\AppData\Local\enchant on Windows.

In fact, users can easily add dictionaries there now. The *.dic and *.aff files from the following sources can all be used:

For the extensions, they just need to be unzipped.

@vkbo vkbo added the enhancement Request: New feature or improvement label Feb 4, 2022
@vkbo vkbo added this to the Future Release milestone Feb 4, 2022
@vkbo vkbo self-assigned this Feb 4, 2022
@vkbo vkbo mentioned this issue Feb 6, 2022
6 tasks
@vkbo
Copy link
Owner Author

vkbo commented May 19, 2022

Note to self: use this source: https://github.com/vkbo/dictionaries

See also: Discussion #1066

@vkbo vkbo added the todo label May 31, 2022
@vkbo vkbo added planned Note: Feature planned for a later release and removed todo labels Apr 14, 2023
@tmarplatt
Copy link
Contributor

If not this, it would be great to simply use hotkeys to quickly browse through detected misspellings, i.e. jump the text cursor to the next detection. Additionally, a hotkey to add the word under the cursor to the project Word List.

@vkbo
Copy link
Owner Author

vkbo commented Oct 13, 2023

I've restructured spell checking already for the next release, 2.2, so it now saves spell check meta data together with the paragraph in the editor. It should definitely be possible to then create a hotkey to jump trough spell check errors. I also plan to add a show/hide details panel below the editor where I could add a list of spell check errors.

@vkbo vkbo added next release Note: Features planned for next release and removed planned Note: Feature planned for a later release labels Oct 17, 2023
@vkbo vkbo added planned Note: Feature planned for a later release and removed next release Note: Features planned for next release labels Nov 9, 2023
@vkbo vkbo added next release Note: Features planned for next release and removed planned Note: Feature planned for a later release labels Nov 19, 2023
@vkbo vkbo linked a pull request Nov 19, 2023 that will close this issue
6 tasks
@vkbo vkbo linked a pull request Nov 20, 2023 that will close this issue
6 tasks
@vkbo
Copy link
Owner Author

vkbo commented Nov 20, 2023

In the end I implemented a dialog box that will accept spell checker dictionary files downloaded from Free Office or LibreOffice. They are just zip files, and the relevant Hunspell files are extracted and copied to the enchant folder.

My first implementation worked with automatic downloads from my forked repo from LibreOffice, but I was concerned the external dependency from within novelWriter would be hard to maintain. This one does not rely on any external source to be available and no data is downloaded directly by novelWriter.

@vkbo vkbo closed this as completed Nov 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Request: New feature or improvement next release Note: Features planned for next release
Projects
None yet
2 participants