Rocket.chat.electron: Spell check automatically set to English

Created on 10 Sep 2017  Â·  10Comments  Â·  Source: RocketChat/Rocket.Chat.Electron

My Setup

  • Operating System: Ubuntu 14.04 LTS or Windows 7
  • App Version: rocketchat_2.9.0_amd64.deb or rocketchat-setup-2.9.0.exe
  • Server: 0.58.2

client side:

~ $ echo $LANG
de_DE.UTF-8

  • [x] I have tested with the latest version
  • [x] I can simulate the issue easily

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.

easy good first issue enhancement

Most helpful comment

@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?

All 10 comments

right mousekey -> Spelling languages.

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

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

@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

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?

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.

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

@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?

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

Awesome, great work Marcus!

On Thu, Nov 22, 2018, 3:56 PM Marcus Schopen <[email protected]
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
.

Was this page helpful?
0 / 5 - 0 ratings