* [PATCH] hunspell-dictionaries: use better names for dictionary files
@ 2021-05-25 8:28 Andreas Müller
0 siblings, 0 replies; only message in thread
From: Andreas Müller @ 2021-05-25 8:28 UTC (permalink / raw)
To: openembedded-devel; +Cc: Martin.Jansa
Played around with gspell and followed their suggestion to prefer hunspell [1]
in enchant [2].
Tests with gedit showed that all entries for sub-languages (e.g English UK)
were missing. By changing names of *.dic and *.aff from
<language>-<SUBLANGUAGE>.*
to
<language>_<SUBLANGUAGE>.*
languages as 'English UK' appear and can be selected in gedit.
Tested also on libreoffice: That displayed all languages properly before and
does still with files renamed.
[1] https://gitlab.gnome.org/GNOME/gspell
[2] https://github.com/schnitzeltony/meta-mortsgna/commit/b5d17de7cf9fd033339c2609c5b14c108bbbff4f
Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
---
meta-oe/recipes-support/hunspell/hunspell-dictionaries.bb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/meta-oe/recipes-support/hunspell/hunspell-dictionaries.bb b/meta-oe/recipes-support/hunspell/hunspell-dictionaries.bb
index 3da67d1e3..28c2d809a 100644
--- a/meta-oe/recipes-support/hunspell/hunspell-dictionaries.bb
+++ b/meta-oe/recipes-support/hunspell/hunspell-dictionaries.bb
@@ -141,7 +141,7 @@ S = "${WORKDIR}/git"
do_install() {
for LANGUAGE in `ls -d1 ${S}/dictionaries/*` ; do
- LANGUAGE_DIR=`basename $LANGUAGE`
+ LANGUAGE_DIR=`basename $LANGUAGE | sed 's:-:_:'`
install -D -m0644 $LANGUAGE/index.dic ${D}${datadir}/hunspell/$LANGUAGE_DIR.dic
install -D -m0644 $LANGUAGE/index.aff ${D}${datadir}/hunspell/$LANGUAGE_DIR.aff
install -D -m0644 $LANGUAGE/LICENSE ${D}${datadir}/hunspell/LICENSE-$LANGUAGE_DIR 2>/dev/null || echo "No LICENSE for language $LANGUAGE"
--
2.31.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2021-05-25 8:28 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-25 8:28 [PATCH] hunspell-dictionaries: use better names for dictionary files Andreas Müller
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.