Dictionaries for Norwegian languages are not installed properly
Reproduction
- Add Bokmål language with
flatpak config --set extra-languages nb_NO.UTF-8
. (Or with Nynorsk withnn_NO.UTF-8
). - Run Hunspell in Flatpak with the Bokmål language:
LC_ALL=nb_NO.UTF-8 flatpak run --command=hunspell runtime/org.freedesktop.Platform//19.08 -d
Expected
Get the Hunspell prompt.
Actual result.
Can't open affix or dictionary files for dictionary named "nb_NO".
Work-around
Users should add no
which is not a valid language with flatpak config --set extra-languages nb;no
.
Reason of the issue and fix
Libreoffices dictionaries for Norwegian languages are in the same file no/dictionaries.xcu
. And our script files/dictionaries/install_dicts.py
takes the name of the directory as a valid language.
We need to make the script a bit smarter an expect there is multiple languages in a .xcu
file.