Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
How to use several language variants provided by myspell?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
ecko
n00b
n00b


Joined: 04 Jul 2010
Posts: 61

PostPosted: Sat Feb 01, 2014 12:51 pm    Post subject: How to use several language variants provided by myspell? Reply with quote

Gentoo provides myspell-* ebuilds for many language. Some ebuilds provide several dictionaries, for example myspell-fr provides four: fr-classique.dic, fr-moderne.dic, fr-reforme1990.dic, fr_FR.dic.The question is, how do I tell software to use a specific dictionary? I use libreoffice, focuswriter, kate. All of them offer lists by country (say I could choose fr_FR and fr_CA), but this not what I want as all of the files I mentioned above are variants of fr_FR. I want is to be able to select the different .dic inside fr_FR. Other languages have similar issues, for example pt_PT has two versions, before and after 1990 (USE="preao"). How do I select these variants?

Last edited by ecko on Sat Feb 01, 2014 2:19 pm; edited 4 times in total
Back to top
View user's profile Send private message
aCOSwt
Moderator
Moderator


Joined: 19 Oct 2007
Posts: 2537
Location: Hilbert space

PostPosted: Sat Feb 01, 2014 1:37 pm    Post subject: Reply with quote

As far as I understand, libreoffice does not depend on myspell but on hunspell.
Code:
acoswt@PrimaPratica ~ $ equery depends myspell
 * These packages depend on myspell:
acoswt@PrimaPratica ~ $ equery depends hunspell
 * These packages depend on hunspell:
app-office/libreoffice-4.1.3.2-r2 (>=app-text/hunspell-1.3.2-r3)
app-office/libreoffice-l10n-4.1.3.2 (app-text/hunspell)

And kate does not either, as, depending on the kdelibs it will get its correcting facilities from there.
And kdelibs does not depend on myspell but on enchant
Code:
acoswt@PrimaPratica ~ $ equery depends enchant
 * These packages depend on enchant:
app-text/gtkspell-2.0.16 (>=app-text/enchant-1.1.6)
kde-base/kdelibs-4.10.5-r1 (spell ? app-text/enchant)

This being said, once having installed the dictionaries that are actually compatible with libreoffice, you can always select precisely which ones you want to use thanks to the tools/spelling & Grammar/options dialog box.
Unfortunately for you, it appears that kate does not offer similar freedom and you are correct about kate saying that you can only select the language which is associated to a unique dictionary.
I cannot tell about focuswriter, I don't use it.
_________________


Last edited by aCOSwt on Sat Feb 01, 2014 2:11 pm; edited 1 time in total
Back to top
View user's profile Send private message
steveL
Advocate
Advocate


Joined: 13 Sep 2006
Posts: 2717
Location: The Peanut Gallery

PostPosted: Sat Feb 01, 2014 1:47 pm    Post subject: Reply with quote

What documentation have you found on myspell, in your search of your machine, the web and mailing-list archives?

I don't know, iow ;) but that's where I'd start, and I'd expect to see that type of info up-front, so that others can check the links and have a headstart to catch up with where you are. Also, you might want to edit your post and add "with myspell" to the title, as atm it looks like a locale question.

Regards,
steveL.
Back to top
View user's profile Send private message
ecko
n00b
n00b


Joined: 04 Jul 2010
Posts: 61

PostPosted: Sat Feb 01, 2014 2:09 pm    Post subject: Reply with quote

aCOSwt wrote:

As far as I understand, libreoffice does not depend on myspell but on hunspell.


Indeed modern software use enchant or hunspell, but they both end up with the myspell dictionaries.

hunspell-1.3.2-r3.ebuild:
Code:

for lang in ${LANGS}; do
    if [[ ${lang} == de ]] ; then
        DICT_DEP+=" linguas_de? (
            || (
                app-dicts/myspell-de
                app-dicts/myspell-de-alt
            )
        )"
    else
        DICT_DEP+=" linguas_${lang}? ( app-dicts/myspell-${lang/pt_BR/pt-br} )"
    fi
    IUSE+=" linguas_${lang}"
done
PDEPEND="${DICT_DEP}"


enchant: depends on hunspell (so the myspell dictionaries again)

aCOSwt wrote:

This being said, once having installed dictionarie that are actually compatible with libreoffice, you can always select precisely which ones you want to use thanks to the tools/spelling & Grammar/options dialog box.


From what I see, this dialog lets you choose national versions with names build like locales. For example you could choose French (France), French (Belgium), French (Switzerland), etc. This list is build-in in libreoffice and I remember there was some heavy talks at some point to get Latin included (it's not based on a country). But I do not see how to select different dictionaries away from the "country" point of view. Myspell provides several dictionaries for each country, because that's how the situation is. I need to use several dialects of several languages depending on whom I'm writing to.

Well actually I see a way to solve my problem, I can create a symbolic link in /usr/share/myspell/fr_FR.dic to my favorite dialect, but that's not very practical as I'll need to update the link everytime I want to change dialect.
Back to top
View user's profile Send private message
ecko
n00b
n00b


Joined: 04 Jul 2010
Posts: 61

PostPosted: Sat Feb 01, 2014 2:17 pm    Post subject: Reply with quote

steveL wrote:
What documentation have you found on myspell, in your search of your machine, the web and mailing-list archives?


On my machine I found out that:

  • app-dict/myspell-fr provides four different .dic files
  • app-dict/myspell-pt provides just one .dic file, but USE flag allows to select one out of the two provided dictionaries.

My conclusion is that "it's a mess," as two related ebuilds do not agree on how to treat the existence of several language variants within the same locale.

Also, I found that software (at least KDE, focuswriter and Libreoffice) seem to implement a list of languages based on locales (like fr_FR, pt_PT) and do not consider there might be several dictionaries for each locale.


Last edited by ecko on Sat Feb 01, 2014 2:20 pm; edited 1 time in total
Back to top
View user's profile Send private message
aCOSwt
Moderator
Moderator


Joined: 19 Oct 2007
Posts: 2537
Location: Hilbert space

PostPosted: Sat Feb 01, 2014 2:20 pm    Post subject: Reply with quote

ecko wrote:
From what I see, this dialog lets you choose national versions with names build like locales..

:? On my libreoffice-4.1.3.2, selecting tools/Spelling and Grammar/Options... dialog box, the user defined dictionaries box lists all the dictionaries I can select.
They are not necessarily language dependent, you can add more to the list when depressing the New button.
This dialog box under my computer actually shows even my very personal dicts.
_________________
Back to top
View user's profile Send private message
ecko
n00b
n00b


Joined: 04 Jul 2010
Posts: 61

PostPosted: Sat Feb 01, 2014 2:30 pm    Post subject: Reply with quote

aCOSwt wrote:
:? On my libreoffice-4.1.3.2, selecting tools/Spelling and Grammar/Options... dialog box, the user defined dictionaries box lists all the dictionaries I can select.


That's right I did not find this dialog at first. But what it lists are user-defined dictionaries, which means I would need to input each single word one by one there. It does not allow to select a dictionary based on some format (like myspell .dic files), which take into account plurals, verbal forms etc. and are updated regularly with new additions.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum