How to enable the Portuguese dictionary on Abrowser

7 réponses [Dernière contribution]
aliasbody
Hors ligne
A rejoint: 09/14/2012

Hello Everyone,

I have two problems with Trisquel and the Portuguese language, the first one I managed to solve it but I would just let it here in order to see if I'm the only one with that problem.

I installed Trisquel choosing only the Portuguese (Portugal) keyboard, Portuguese (Portugal) language etc... But after installation the Portuguese (Portugal) language is disabled and instead of that the Portuguese (Brazil) language is selected (and because of that I have Broffice instead of LibreOffice. The solution for this is disabling the Portuguese (Brazil) Language, since putting it on the end of the "enabled" languages (after the Portuguese (Portugal), English (UK), and French (France)), don't solve the problem.

But my real problem is that there is no Portuguese (neither from Portugal or Brazil) dictionary in Abrowser. I can use the dictionary in almost every application that uses myspell but not on Abrowser. And I can't install the dictionary from the Mozila website since it is not compatible.

Does anyone have the same problem ?

Thanks in Advance,
Luis Da Costa

Magic Banana

I am a member!

I am a translator!

Hors ligne
A rejoint: 07/24/2010

I also tried (not very much though) to have a (Brazilian) Portuguese spell checker in ABrowser but have not succeeded. If anyone has a solution...

aliasbody
Hors ligne
A rejoint: 09/14/2012

I found the problem...

The package myspell-pt (and maybe others), don't copy the pt.dic and pt.aff files into /usr/share/myspell/dicts. And the .xpi installer isn't compatible with Abrowser and I don't understand why (but that's not the big problem here).

So here is the solution until a fix is found.

1 - Download the dictionary you want from this webpage http://dictionaries.mozdev.org/installation.html

2 - Open nautilus at the place where the .xpi file is, and extract it using the usual tool for zip extraction.

3 - Open the terminal and go to the folder where the extracted files are.

4 - Type this : sudo mv pt.{aff,dic} /usr/share/myspell/dicts

5 - Restart Abrowser and enjoy the Portuguese dictionary.

I hope this helped, I will try to see what is the problem with the myspell-pt package.

aliasbody
Hors ligne
A rejoint: 09/14/2012

The problem is that the dictionary files are handled by hunspell instead of myspell, and the problem is that there is no hunspell-pt in the packages.

So you can : 1 - Use my workaround

2 - Use the Ubuntu hunspell-pt_br package (if any)

3 - Do this on the terminal sudo cp /usr/share/hunspell/pt_BR.{dic,aff} /usr/share/myspell/dicts/

If I understood right, some programs use hunspell, and others use myspell (don't know if they are for the same, or different purposes. Just know that if you try to install one, the other will be removed), and Abrowser don't use myspell. So even knowing that there is a myspell-pt and myspell-pt-br, Abrowser (at least) will not use it.

I will try to find an hunspell-pt and hunspell-pt-br package to see if I'm right.

EDIT: At least I was right at some point :p http://en.wikipedia.org/wiki/Hunspell

Magic Banana

I am a member!

I am a translator!

Hors ligne
A rejoint: 07/24/2010

No hunspell-pt* package seems to exist anywhere. That is why I tried the last solution:
$ sudo cp /usr/share/hunspell/pt_BR.* /usr/share/myspell/dicts/

It indeed seems to work. However, Hunspell is said to only be backward compatible with MySpell (i.e., Hunspell understands MySpell dictionaries, not the opposite). That is why I expects some issues. Anyway, thanks a lot for this solution!

aliasbody
Hors ligne
A rejoint: 09/14/2012

I can package the Arch Linux hunspell-pt, hunspell-pt-preao and hunspell-pt-br packages (created by users), into .deb and propose them to Trisquel, Debian etc...

Magic Banana

I am a member!

I am a translator!

Hors ligne
A rejoint: 07/24/2010

According to this page, Mozilla has been using Hunspell since Firefox/Thunderbird 3. I really do not understand why ABrowser, which is based on Firefox, would search the dictionary files in /usr/share/myspell/dicts/ instead of /usr/share/hunspell/. Does the vanilla Firefox do the same?

aliasbody
Hors ligne
A rejoint: 09/14/2012

They all use. ABrowser don't use the myspell, but hunspell. And if I understand well, when the hunspell file is not found they search for the myspell file.

myspell-pt is already installed when you installed the language, so it is not a problem here. Some hunspell packages copy the dictionary into the myspell package in order to have some compatibility (like the hunspell-fr-gu).

I never learned how to create a deb package from a binary package. I will try to create the .deb package (I just ask myself why this hasn’t already been created on the Ubuntu community,