Sigil-Ebook / Sigil

Sigil is a multi-platform EPUB ebook editor
GNU General Public License v3.0
5.96k stars 578 forks source link

Batch spellcheck broken #609

Closed Carmina16 closed 3 years ago

Carmina16 commented 3 years ago

In 1.4 and later, the batch spellcheck is broken: the word list is empty, and if All Words checkbox is selected, all words in document appear with Misspelled column is set to No. The inline spellcheck still works, though.

BeckyDTP commented 3 years ago

Checking to spell in the "Spellcheck" dialog requires the existence/installation of a dictionary for the appropriate language.

Any declared languages are valid and can be checked in the "Language" column. If you don't have a dictionary for a language in the "Language" column, these words are treated just as you describe.

Please note that a language can be declared at different levels: the entire document (in an OPF file, <dc:language>xx</dc:language> or a single file, paragraph, or even individual words.

opf-language

langs-in-xhtml

Carmina16 commented 3 years ago

The language column contains the language specified in the document, but all document words are accepted. The editor spell check works as expected.

BeckyDTP commented 3 years ago

These are two independent elements. If the spelling checker in Code View works, then an EXISTING dictionary has been selected manually (in Preferences). dicts

In the "Spellcheck" window, the dictionaries selected in Preferences are not taken into account, but the actually declared languages.

Just write your language in the "Language" column and check your hunspell_dictionaries folders for the proper files for that language (xx.aff + xx.dic or xx_NN.aff + xx_NN.dic).

Carmina16 commented 3 years ago

It seems that checker does not fall back to ll.aff when checking ll-CC language. It's a bug.

BeckyDTP commented 3 years ago

Why would it work this way? You always needed a pair of DIC + AFF files with the same (full) name.

Carmina16 commented 3 years ago

Because all parts of a language tag except the language itself are optional.

dougmassay commented 3 years ago

They're not optional here. This is not a bug. This is intentional behavior. Make sure your aff and dic files share the same name (with the exception of the extension) if you want Sigil's spellcheck to work with custom dictionaries.

Closing this issue as the behavior is by design. Feel free to reopen if renaming the files as explained does not solve the problem.