asciidocfx / AsciidocFX

Asciidoc Editor and Toolchain written with JavaFX 21 (Build PDF, Epub, Mobi and HTML books, documents and slides)
http://www.asciidocfx.com/
Apache License 2.0
1.91k stars 297 forks source link

Error when switching spellchecker language to german #249

Open seriouslyEnter opened 8 years ago

seriouslyEnter commented 8 years ago

Error when switching spellchecker language to german

I switched Document language Editor language Default languge

I can provoke Error by switch from english to german but not by switching from german to english

ERROR => Use an explicit fsa.dict.encoder=SUFFIX metadata key: 
java.io.IOException: Use an explicit fsa.dict.encoder=SUFFIX metadata key: 

at morfologik.stemming.DictionaryMetadata.read(DictionaryMetadata.java:378)

at morfologik.stemming.Dictionary.read(Dictionary.java:102)

at morfologik.stemming.Dictionary.read(Dictionary.java:65)

at com.kodcu.spell.dictionary.DictionaryService.getLanguageSpeller(DictionaryService.java:49)

at com.kodcu.spell.dictionary.DictionaryService.processTokens(DictionaryService.java:67)

at com.kodcu.controller.ApplicationController.lambda$processTokens$158(ApplicationController.java:2253)

at com.kodcu.service.ThreadService$1.call(ThreadService.java:45)

at javafx.concurrent.Task$TaskCallable.call(Task.java:1423)

at java.util.concurrent.FutureTask.run(Unknown Source)

at java.util.concurrent.ForkJoinTask$AdaptedRunnableAction.exec(Unknown Source)

at java.util.concurrent.ForkJoinTask.doExec(Unknown Source)

at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(Unknown Source)

at java.util.concurrent.ForkJoinPool.runWorker(Unknown Source)

at java.util.concurrent.ForkJoinWorkerThread.run(Unknown Source)
rahmanusta commented 8 years ago

Dear @seriouslyEnter, thank you for reporting the issue.

AsciidocFX supports the following German varieties;

First one works but others not. The reason is a missing parameter in .dict file for these language is fsa.dict.encoder=suffix.

I added this line to the 3 files and committed changes (https://github.com/asciidocfx/AsciidocFX/blob/master/conf/spellcheck/de/hunspell/German%20(de_AT).info#L12). So, you can now use first "German" kind, or you can add above line to .dict files manually, or you can wait next release if it is not an urgent willing.

seriouslyEnter commented 8 years ago

Choosing "German" instead of the others works. Thank you