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

Spellchecker Improvements #322

Merged
merged 6 commits into from
Oct 20, 2017
Merged

Spellchecker Improvements #322

merged 6 commits into from
Oct 20, 2017

Conversation

akashnimare
Copy link
Member

This PR adds couple of functionalities in Spellchecker -

  • On macOS, the language of the Spellchecker will be equal to the language of the server. That means if you have set Deutsch as the server language then the spellchecker will check spelling against the same.
  • On Linux/Windows, Spellchecker can automatically switches to the language user is typing in, so we don't need to set it explicitly. Spellchecker work as it is on these platforms.
  • There is an option in general settings to disable/enable the spellchecker.

image

This PR also fixes a bug which was caused by not setting the default settings properly.

Ideally spellchecker should detect the language, but on macOS, it fails to auto-detect the lanugage user is typing in
that's why we need to mention it explicitly. We set this language with the help of the default language of the server.
Rewrote the Spellchecker class so that we can have better control
over the context menu and spellchecker.
Settings are initialized only when user clicks on General/Server/Network section settings
In case, user doesn't visit these section, those values set to be null automatically.
This fix makes sure the default settings are correctly set to either true or false.
@akashnimare
Copy link
Member Author

@cedricium can you cross check if everything works fine? Specially these things -

  • Enable/disable setting option for spellchecker (make sure you restart app).
  • On Linux/Windows, Spellchecker should automatically switches to the language user is typing in.
  • On macOS, it should spellcheck against the default server language.
  • Other settings options (make sure they work as expected).

@cedricium
Copy link
Collaborator

@akashnimare will check it out later today and let you know how everything goes.

@cedricium
Copy link
Collaborator

@akashnimare looks great! On Windows, works just like you said - despite the server/user language, spellcheck will pick up on the typed language and make suggestions that way (don't have Linux so not able to test that specifically).

The same goes for Mac too. Turning on and off spellcheck was easy enough. Just one note: it appears that spellcheck depends on the user's language preference, not the server's language. If the server had a language set to Spanish and the user had English, spellcheck would not recognize Spanish words. Switching the user's language would make spellcheck work as intended.

@akashnimare
Copy link
Member Author

@cedricium thanks for testing it out. From server language I meant the user's language preference.

@akashnimare
Copy link
Member Author

it appears that spellcheck depends on the user's language preference, not the server's language. If the server had a language set to Spanish and the user had English, spellcheck would not recognize Spanish words. Switching the user's language would make spellcheck work as intended.

I think spellchecker should depends on user's language preference only. That way they can control spellchecker. Normal users don't have any control over org language settings thus they can't choose spellchecker language.

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.

3 participants