Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spell check automatically set to English #535

Closed
2 tasks done
localguru opened this issue Sep 10, 2017 · 10 comments · Fixed by #562
Closed
2 tasks done

Spell check automatically set to English #535

localguru opened this issue Sep 10, 2017 · 10 comments · Fixed by #562

Comments

@localguru
Copy link
Contributor

localguru commented Sep 10, 2017

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
  • I have tested with the latest version
  • 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.

@localguru localguru changed the title Spell check on Ubuntu automatically set to English Spell check automatically set to English Sep 10, 2017
@localguru
Copy link
Contributor Author

right mousekey -> Spelling languages.

@gdelavald
Copy link
Contributor

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

@localguru
Copy link
Contributor Author

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

@alexbrazier
Copy link
Contributor

@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

@alexbrazier alexbrazier added this to the 2.11.0 milestone Sep 18, 2017
@damon-myers
Copy link
Contributor

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
Copy link
Contributor

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
Copy link
Contributor

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

@localguru
Copy link
Contributor Author

@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
Copy link
Contributor Author

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
Copy link
Contributor

damon-myers commented Nov 22, 2018 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants