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 checking #28

Closed
jsteel44 opened this issue Dec 10, 2018 · 22 comments
Closed

Spell checking #28

jsteel44 opened this issue Dec 10, 2018 · 22 comments
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@jsteel44
Copy link

Hi,
Is there a way to enable spell checking on this? Just an underlined miss-spelt word would be very helpful. Thanks

@IsmaelMartinez IsmaelMartinez added enhancement New feature or request help wanted Extra attention is needed good first issue Good for newcomers labels Dec 10, 2018
@IsmaelMartinez
Copy link
Owner

IsmaelMartinez commented Dec 10, 2018

Hi @jsteel44 ,

That will be very helpful indeed.

You can probably implement this by using this module https://github.com/electron-userland/electron-spellchecker.

It doesn't look that tricky but currently I have not time for improvements. Give it a try and see if you can get it to work. I will review it and I am happy to help.

Its only me and many of you so any help is more than welcome!

Thanks!

@IsmaelMartinez
Copy link
Owner

Seems like that page that I put before is a bit of a dead page.

I am trying to add it in the spellchecker branch using this fork https://github.com/ccnokes/electron-spellchecker-fork and seems to be working. I might add yet another option to enable/disable it.

I will let you know once is out there. thanks for the suggestion!

@IsmaelMartinez
Copy link
Owner

Seems like this is bigger than expected. I am giving it a try to introduce a basic version of it, but, if proves to be to complex, it might drop to the wonfix category.

@IsmaelMartinez
Copy link
Owner

This should be ready for the next release 0.1.11. This is hoped to be release fairly soon.

@jsteel44
Copy link
Author

OK great thank you!

@IsmaelMartinez
Copy link
Owner

Hi @jsteel44 ,

Version 0.1.11 is ready (pre-release) and should have cover this issue. Can you test it and reopen if is not the case?

Thanks,
Ismael

@jsteel44
Copy link
Author

@IsmaelMartinez I'm not sure how to reopen this but I've just tried 0.1.11 and it doesn't seem to be highlighting misspelt words. Is there a trick to get it going or a new dependency? Thanks

@IsmaelMartinez
Copy link
Owner

Hi, that library that I am using only support en_US (America 1st and all that stuff...).

The way of making it work will be to add the dictionary to the package manually. This is not feasible.

Node-spellchecker has those 2 issues that are related to atom/node-spellchecker#54 and atom/node-spellchecker#51

In theory, and ideally, electron should pick up the dictionaries from hunspell that you got installed in your system as explain in here: https://github.com/atom/spell-check#debian-ubuntu-and-mint but that doesn't work because of the 2 issues that I mentioned before.

I will update the release notes indicating only US at the moment.

@IsmaelMartinez
Copy link
Owner

I have added a "request" to an old issue https://github.com/mixmaxhq/electron-spell-check-provider/issues/17 in the electron-spell-check-provider and asked in the pull request from atom/node-spellchecker... I can't do anymore at this moment in time. Ta

@jsteel44
Copy link
Author

@IsmaelMartinez does that mean with hunspell-en_US installed and I run "LANG=en_US.UTF-8 teams-for-linux" it should work? As it doesn't for me. Having the US spell checker would be better than nothing. Were you able to get it working? Thanks

@IsmaelMartinez
Copy link
Owner

I had it working from source code. It might not be working on the packaged version. I saw something that might be related in the node-spellcheck repo.

I am afraid I will mark this as "won't fix" at least until I get more clarity from the upstream projects.

Sorry about that. If you run it from source you can add your dictionaris fairly easily (copy or simbolic link). But that is dirty.

I can explain how to if you are "ready". Otherwise I will park it until electron implements their part

@jsteel44
Copy link
Author

OK sure, yes how would I add my own (where does the symlink need to be and point to)? Thanks

@IsmaelMartinez
Copy link
Owner

IsmaelMartinez commented Dec 17, 2018

Hi @jsteel44 ,

I added some info in the main README.md. Basically the following:


In short, node_spellchecker only ships with en_US dictionary.

As a work around, only valid when running from source, you can enable the use of local dictionaries by following the next steps:

  1. Install hunspell and your locale dictionary as indicates in this link https://github.com/atom/spell-check#debian-ubuntu-and-mint
  2. Run the following commands from the root of the app (where this README.md file is located)
  3. mv node_modules/spellchecker/vendor/hunspell_dictionaries node_modules/spellchecker/vendor/hunspell_dictionaries.old mv the en_US dictionaries to another location.
  4. ln -s /usr/share/hunspell/ node_modules/spellchecker/vendor/hunspell_dictionaries create a simbolic link to the hunspell dictionaries. Note, I am using the default location for hunspell.

Starting the app with yarn start, and if you have your system configured with the right dictionaries and locale, you should be able to see the spellchecker working.

Unfortunately, at this moment in time it is not possible to use local dictionaries with the packaged app. Fixing issue 51 in node-spellchecker should solve this issue.


Let me know how you get on but I will not spend more time at the moment on this.

Thanks

@jsteel44
Copy link
Author

@IsmaelMartinez perfect, thanks! That worked a treat. Would be nice to be able to get this into the Arch Linux package but I can make do with this solution for now, cheers!

@IsmaelMartinez
Copy link
Owner

IsmaelMartinez commented Dec 20, 2018

Glad to heard it worked. Hopefully once electron 4 is out someone form that area can fix that part. I suspect they are fairly busy at the moment with the big release.

I will keep an eye on what happens and/or push a fix at some point in early next year if I see no movement.

@petr-nehez
Copy link

I have version 0.4.0 now and would like to know if there is an option to disable spell checker.
@IsmaelMartinez Is it possible?

@IsmaelMartinez
Copy link
Owner

you can disable the rightClickWithSpellcheck. That includes the right click menu.

More info here:
https://github.com/IsmaelMartinez/teams-for-linux/tree/develop/app/config

@petr-nehez
Copy link

Thank you so much, I didn't realize that I should pass =false, I did it without 😉.
Really appreciate this great project!

@alfredoivan
Copy link

alfredoivan commented Mar 12, 2022

you can disable the rightClickWithSpellcheck. That includes the right click menu.

More info here: https://github.com/IsmaelMartinez/teams-for-linux/tree/develop/app/config

hello, any option to disable spell check completely? i'm using 1.0.20 appimage and it just doesn't work well the spellchecker.
it seems you right click on the text field and it does nothing.
i tried with and without --rightClickWithSpellcheck=false and with or without modifying config.json
_
i remember there was an option within Teams Settings that would apply to spell check, but it doesn't appaar anymore (maybe MS removed it?)
_
more info: there is this file which can be edited but i'm not sure what it should go inside, it is not documented.
teams-for-linux/Preferences
i tried:
{"spellcheck":false}
but it doesn't work.
by default, it says spellcheck {dictionary: en Us and so on.
_
I just want to disable completely.

@IsmaelMartinez
Copy link
Owner

IsmaelMartinez commented Mar 12, 2022 via email

@alfredoivan
Copy link

That is strange. The config option is clearly that one. I wonder if the config option is just not working and or loading too late. Can you build from source and put a few console.log messages in? I am in MacOs and can't be considered representative. Apologies. Also maybe try with a space instead of = (but I think is =). I can see in the browser/index.js the following if statement: ​ ​if​ ​(​config​.​rightClickWithSpellcheck​)​ ​{

On Sat, 12 Mar 2022, 20:04 alfredoivan, @.> wrote: you can disable the rightClickWithSpellcheck. That includes the right click menu. More info here: https://github.com/IsmaelMartinez/teams-for-linux/tree/develop/app/config hello, any option to disable spell check completely? i'm using 1.0.20 appimage and it just doesn't work well the spellchecker. it seems you right click on the text field and it does nothing. i tried with and without --rightClickWithSpellcheck=false and with or without modifying config.json — Reply to this email directly, view it on GitHub <#28 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADJHECG35BKJB52VAWED6TU7T2DXANCNFSM4GJNMO5A . You are receiving this because you were mentioned.Message ID: @.>

i check and come back to you.
Maybe being AppImage makes it slightly different.
Also i want to test latest appimage but i am unable to right now.

@alfredoivan
Copy link

More information about the "cannot deactivate spell check" issue:
program version:
teams-for-linux-1.0.24.AppImage

command line arguments:
"--rightClickWithSpellcheck=true"

configFile = { closeAppOnCross: false, rightClickWithSpellcheck: true }

With this configuration, right click does nothing.
Also MS Teams options doesn't allow activate / deactivate spell check:
image

_
Other test scenario:
program version:
teams-for-linux-1.0.24.AppImage

command line arguments:
"--rightClickWithSpellcheck=false"

configFile = { closeAppOnCross: false, rightClickWithSpellcheck: false }

Result: same behaviour, right click does nothing .
Also MS Teams options doesn't allow activate / deactivate spell check:
_
I know for sure the config file is being read because of debug info on terminal, and because "closeAppOnCross" works properly (if i put true: it works as expected).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

4 participants