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

Add option to install language dictionaries #562

Merged
merged 2 commits into from
Jun 10, 2018
Merged

Add option to install language dictionaries #562

merged 2 commits into from
Jun 10, 2018

Conversation

damon-myers
Copy link
Contributor

@RocketChat/DesktopApp

Closes #535

This PR adds an option to the Spellchecker menu to install a new language dictionary. It works by copying the dictionary to the app's dictionary directory and adding it to the list of available dictionaries.

@CLAassistant
Copy link

CLAassistant commented Oct 16, 2017

CLA assistant check
All committers have signed the CLA.

@gdelavald
Copy link
Contributor

@damon-myers Hey! This is awesome, thanks for you contribution.
We'll review the PR and add comments if there are any changes needed.

@@ -70,7 +86,7 @@ class SpellCheck {
* dictionary that is valid based on system (defaults to en_US)
*/
setEnabledDictionaries () {
const dictionaries = this.dictionaries;
const dictionaries = this.availableDictionaries;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When testing this it seems to have enabled all dictionaries for me. I think it is caused by the change you made here.

@damon-myers
Copy link
Contributor Author

@alexbrazier Thanks for catching that!

I corrected the dictionary issue you mentioned, and also tested the changes on Windows. I had only tested them on Linux beforehand, so I also made it so that the install menu option is only shown if you are not using system language dictionaries. (In that case you'd simply install the language via your operating system.)

@gdelavald
Copy link
Contributor

Hey @damon-myers giving this branch a try, can you provide the dictionary you used to test this? Just checking if we can add this to the current release or if it's going to be postponed into the next version.
Thanks.

@damon-myers
Copy link
Contributor Author

@gdelavald Sure thing, I used the dictionary .dic and .aff from here: https://cgit.freedesktop.org/libreoffice/dictionaries/plain/cs_CZ

I used Google to get some Czech text and it seemed to correct that correctly.

@ghost
Copy link

ghost commented Nov 22, 2017

any news? it would be a huge improvment

@gdelavald
Copy link
Contributor

@damon-myers Sorry for the delay on this, we have had some issues testing this branch, on osx and ubuntu we had some exceptions thrown when starting the app.
Could you check the functions that read from directories, since they seem to be causing errors in some cases?

@ghost
Copy link

ghost commented Jan 26, 2018

@gdelavald anything new? do you have any logs with errors?

@damon-myers
Copy link
Contributor Author

@monspid, Holy crap! Sorry! I got busy and didn't notice there were issues with this. I can take a look at the crashes this weekend and try to get the branch up to date.

@ghost
Copy link

ghost commented Jan 27, 2018

It's a great NEWS :-) It would be a huge improvement

@damon-myers
Copy link
Contributor Author

damon-myers commented Jan 27, 2018

I rebased the branch against develop and made sure everything still works.

@gdelavald, I'm not able to reproduce the issue on Linux Ubuntu 17.10 or Windows (Windows uses system dictionaries, so this code isn't really used there.) Do you have any more information on the exceptions being thrown?

@ThomasVuillaume
Copy link

Can't wait to see that coming in, I had to copy over es_ES my fr_FR for now

@gabrielloberg
Copy link

We would love to have this functionality.

@engelgabriel engelgabriel changed the base branch from develop to damon-myers-spellcheck-dictionaries April 20, 2018 04:08
@engelgabriel engelgabriel changed the base branch from damon-myers-spellcheck-dictionaries to develop April 20, 2018 04:12
@engelgabriel engelgabriel reopened this Apr 20, 2018
@engelgabriel
Copy link
Member

@damon-myers can you please resolve the conflicts so I can merge this?

@damon-myers
Copy link
Contributor Author

@engelgabriel, of course! On it!

@NatoBoram
Copy link

NatoBoram commented Apr 25, 2018

It's been a while since I tried to use different languages in Rocket Chat. There's this PR from one year ago that could fix that but wasn't merged, and this issue from two years ago.

@engelgabriel engelgabriel merged commit 175ff3d into RocketChat:develop Jun 10, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Spell check automatically set to English
9 participants