RocketChat / Rocket.Chat.Electron

Official OSX, Windows, and Linux Desktop Clients for Rocket.Chat
https://rocket.chat/
MIT License
1.59k stars 705 forks source link

Spell check automatically set to English #535

Closed localguru closed 6 years ago

localguru commented 7 years ago

My Setup

client side:

~ $ echo $LANG
de_DE.UTF-8

Description

spell check is automatically set to English. My RC Profile is set to Geman. In Firefox the spell check works very well on German, but in my Electron client it's English so everything I type is red underlined.

Current Behavior

spell check is automatically set to English.

Expected Behavior

spell check should be the language in RC Profile or disabled.

localguru commented 7 years ago

right mousekey -> Spelling languages.

gdelavald commented 7 years ago

Having it to default to user language would be good though.

localguru commented 7 years ago

Hi Gabriel, how do I add another language for spell checking?

alexbrazier commented 7 years ago

@localguru At the moment dictionaries are built into the app, and we only have a few. To get it working now you will have to add your language and rebuild the app.

Probably the best way to resolve this issue is to download the users language automatically. Dictionaries can be found here: https://cgit.freedesktop.org/libreoffice/dictionaries/tree

damon-myers commented 7 years ago

Hello! I have started to work on this.

I have added a method to the SpellCheck module that downloads the dictionary files from LibreOffice if we don't have them available, but it seems smelly to add to the SpellCheck module and do this download at runtime.

Is there somewhere else that would be better to check which dictionaries we have available and download the needed one? Perhaps during installation?

gdelavald commented 7 years ago

Hey @damon-myers, awesome to hear that. Maybe we could add an option in the menu to search for the dictionary files? This would mean the user would know and would be willing to download it. After the implementation we can discuss WHEN is the best time to check and download the files. Looking forward for your PR.

damon-myers commented 7 years ago

@gdelavald, Sorry for the delay! Pull request has been created.

localguru commented 5 years ago

@gdelavald Hi Damon, just copied

cp /usr/share/hunspell/de_DE.* /opt/Rocket.Chat/resources/dictionaries/

but this does not work with german umlauts, like ö ä ü ß, e.g does not know König (= eng. king)

Do I need to download de_DE.aff and de_DE.dic somewhere else?

localguru commented 5 years ago

Solved the umlauts problem with converting

iconv -f ISO-8859-1 -t UTF-8 de_DE_frami.aff | sed 's/^SET ISO8859-1$/SET UTF-8/g' > de_DE_frami_neu.aff
iconv -f ISO-8859-1 -t UTF-8 de_DE_frami.dic > de_DE_frami_neu.dic

Dictionary was downloaded from

https://extensions.libreoffice.org/extensions/german-de-de-frami-dictionaries

damon-myers commented 5 years ago

Awesome, great work Marcus!

On Thu, Nov 22, 2018, 3:56 PM Marcus Schopen <notifications@github.com wrote:

Solved the umlauts problem with converting

iconv -f ISO-8859-1 -t UTF-8 de_DE_frami.aff | sed 's/^SET ISO8859-1$/SET UTF-8/g' > de_DE_frami_neu.aff iconv -f ISO-8859-1 -t UTF-8 de_DE_frami.dic > de_DE_frami_neu.dic

Dictionary was downloaded from

https://extensions.libreoffice.org/extensions/german-de-de-frami-dictionaries

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/RocketChat/Rocket.Chat.Electron/issues/535#issuecomment-441135242, or mute the thread https://github.com/notifications/unsubscribe-auth/AGWUYtNExLkBd7bXoAYgDy2o19aVMuqIks5uxzmxgaJpZM4PST76 .