Open naota opened 7 years ago
I encounter the same issue with hunspell
.
It might be better to add -d {defaultLangages}
when executing updateDictionaries()
for robustness instead of just adding LANG=C
which may cause another conflict in a specific language environment.
@naota
I found an ad-hoc solution.
You can avoid the error message by adding two empty files named ja_JP.dic
and ja_JP.aff
into ~/Library/Spelling
(if you use macOS) or somewhere else in the path of hunspell
.
The execution permission (+x
) may be required for both files.
updateDictionaries() is using user's locale, so that hunspell try to load a dictionary for the locale. If dictionaries for the locale is not available (like in "ja_JP" locale), hunspell exits with error claiming "Can't open affix or dictionary files for dictionary named "ja_JP"." Thus, the fucntion always popups "Call to hunspell failed with a code of 1" error, which is irritating.
How about calling the process with LANG=C instead? It's not necessary here to honor user's locale.