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

Spellcheck don't work in snap with polish as default os language #154

Closed
lgladysz opened this issue Jun 19, 2019 · 22 comments
Closed

Spellcheck don't work in snap with polish as default os language #154

lgladysz opened this issue Jun 19, 2019 · 22 comments
Labels
known issue/workaround Workaround available in the know_issues.md file snap Related to snap package

Comments

@lgladysz
Copy link

lgladysz commented Jun 19, 2019

Describe the bug
I'm using snap version of the app and any spellcheck is not working. I don't even see any possibility to configure this feature. When I'm clicking with RMB on the text field in chat i don't see any option to chose language or enable this feature.
image

Expected behavior

  • Spellcheck is working and highlight misspelled words.
  • I can chose dictionary to Polish, English or other installed hunspell dictionaries.

Desktop:

  • OS: Linux Mint 19.1 Cinnamon
  • Snap
  • Version: 0.3.0
  • Installed packages in system: hunspell, hunspell-pl, hunspell-en-us. hunspell-en-gb
@IsmaelMartinez
Copy link
Owner

Hi @lgladysz ,

Can you try the deb version and see if it works? If this is the case it can be a snap/system configuration issue.

Thanks,

@IsmaelMartinez IsmaelMartinez added question Further information is requested snap Related to snap package labels Jun 19, 2019
@lgladysz
Copy link
Author

Same behavior. Well, I will build app from source and try to figure out what happened.

@IsmaelMartinez IsmaelMartinez removed the question Further information is requested label Jun 19, 2019
@lgladysz
Copy link
Author

lgladysz commented Jun 19, 2019

I checked build cases:
On tag v0.3.0

  • yarn start: spellcheck not working
  • deb: spellcheck not working
  • snap: spellcheck not working

On develop branch

  • yarn start: spellcheck is working (highlights words and showing suggestions in menu)
  • deb: spellcheck not working (no highlighting and after RMB click menu is not showing)
    Tried to run with command teams-for-linux --rightClickWithSpellcheck true - nothing changed.
  • snap: spellcheck not working (no highlighting and after RMB click menu is not showing)

Looks like v0.3.1 is fixing this bug but something is wrong with building packages for distribution.

@IsmaelMartinez
Copy link
Owner

That is pretty strange. Can you check what node version you have? It should not matter as the packages should not bother about it but I am now curious.

@IsmaelMartinez
Copy link
Owner

Also, have you tried the packages in the release section??

@lgladysz
Copy link
Author

I'm using node v10.15.3.
I tried packages built using yarn release command to /dist directory.

@IsmaelMartinez
Copy link
Owner

Can you try version 0.3.0 from here?
https://github.com/IsmaelMartinez/teams-for-linux/releases/tag/v0.3.0

@lgladysz
Copy link
Author

Just tried v0.3.0 deb package from this link and spellcheck didn't work.

@IsmaelMartinez
Copy link
Owner

Where is you hunspell installed? Also, what is your default locale?

@IsmaelMartinez
Copy link
Owner

also, could you check version 0.3.2 (edge in snap). I have removed some package files and reverted some version updates. Thanks

@lgladysz
Copy link
Author

lgladysz commented Jul 3, 2019

Where is you hunspell installed? Also, what is your default locale?

$ which hunspell
/usr/bin/hunspell
$ echo $LANG
pl_PL.UTF-8
$ ls /usr/share/hunspell 
en_AU.aff  en_CA.dic  en_US.aff  en_ZA.dic  es_BO.aff  es_CL.dic  es_CR.aff  es_CU.dic  es_EC.aff  es_ES.dic  es_HN.aff  es_MX.dic  es_PA.aff  es_PE.dic  es_PY.aff  es_SV.dic  es_UY.aff  es_VE.dic
en_AU.dic  en_GB.aff  en_US.dic  es_AR.aff  es_BO.dic  es_CO.aff  es_CR.dic  es_DO.aff  es_EC.dic  es_GT.aff  es_HN.dic  es_NI.aff  es_PA.dic  es_PR.aff  es_PY.dic  es_US.aff  es_UY.dic  pl_PL.aff
en_CA.aff  en_GB.dic  en_ZA.aff  es_AR.dic  es_CL.aff  es_CO.dic  es_CU.aff  es_DO.dic  es_ES.aff  es_GT.dic  es_MX.aff  es_NI.dic  es_PE.aff  es_PR.dic  es_SV.aff  es_US.dic  es_VE.aff  pl_PL.dic

@lgladysz
Copy link
Author

lgladysz commented Jul 3, 2019

also, could you check version 0.3.2 (edge in snap). I have removed some package files and reverted some version updates. Thanks

  • After RMB click menu is now showing but without words suggestions.
  • Highlighting is not working.

@IsmaelMartinez
Copy link
Owner

Can you confirm if is working with yarn start for the latest version?

@IsmaelMartinez IsmaelMartinez changed the title Spellcheck don't work in snap Spellcheck don't work in snap when having many languages Jul 3, 2019
@IsmaelMartinez IsmaelMartinez added the question Further information is requested label Jul 5, 2019
@IsmaelMartinez
Copy link
Owner

Closing due inactivity. Do let me know if you still go the issue and I will reopen. Thanks.

@lgladysz
Copy link
Author

Spellcheck is now not working.

@IsmaelMartinez
Copy link
Owner

Can you provide more information? is not working as the right menu is not appearing, is not working for yarn start, from snap/edge package, snap package... thanks.

@lgladysz
Copy link
Author

As you ask here i tried yarn start. I think that there is no need to test other packaging options if functionality is not working.

Right menu is appearing. Just spellcheck is not working (no highlighting, no word suggestions).

@IsmaelMartinez
Copy link
Owner

Hi,

As far as I understand from your message in #154 (comment) that yarn start works.

I can't support local binary builds are what works on your machine might not work on mine (that is why we use travisCI for them)

Can you check if changing your locale to en_US.UTF-8 (or en_GB.UTF-8) and starting the app and see if that shows you the menu? You can do that in a terminal so you don't need to reset all your locale.

In a terminal run the following 2 commands:

export LANG=en_GB.UTF-8
teams-for-linux

I got only 3 languages in my computer but the spellchecker works, so it might be a system configuration.

Maybe one of the dictionaries is breaking the spellchecker or something like that.

@lgladysz
Copy link
Author

As far as I understand from your message in #154 (comment) that yarn start works.

For v0.3.1 it worked, now it's not.

Tried export LANG=en_GB.UTF-8 and:

  • electron ./app on branch develop: Right menu working - no spellcheck.
  • snap stable: Right menu working - no spellcheck.
  • snap edge: Right menu working - no spellcheck.

@IsmaelMartinez
Copy link
Owner

As you are running from source, can you try changing the version of the spellchecker to 3.6.0?

https://github.com/IsmaelMartinez/teams-for-linux/blob/develop/package.json#L37

Then do a yarn start as that will install that version of the spellchecker. Let me know how you get on. Thanks

@lgladysz
Copy link
Author

lgladysz commented Jul 12, 2019

app/browser/rightClickMenuWithSpellcheck.js:9
remote.app.getLocale() is returning string pl. When I hardcoded const appLocale to pl_PL everything works great :)

I reverted changes and made symlinks:

$ ls -l /usr/share/hunspell                                                                                                                                                                     
-rw-r--r-- 1 root root  28K mar 29  2018 en_GB.aff
-rw-r--r-- 1 root root 732K mar 29  2018 en_GB.dic
-rw-r--r-- 1 root root 3,1K paź 20  2017 en_US.aff
-rw-r--r-- 1 root root 534K paź 20  2017 en_US.dic
lrwxrwxrwx 1 root root    9 lip 12 17:19 pl.aff -> pl_PL.aff
lrwxrwxrwx 1 root root    9 lip 12 17:19 pl.dic -> pl_PL.dic
-rw-r--r-- 1 root root 242K mar 29  2018 pl_PL.aff
-rw-r--r-- 1 root root 4,4M mar 29  2018 pl_PL.dic

Now everything is working out of the box but not on snaps (both stable and edge) (right menu is working but spellcheck is not)
[Edit] Spellcheck for *.deb package is working with this workaround.

@IsmaelMartinez
Copy link
Owner

Hi @lgladysz ,

Great to see you found a workaround to it. I suspect snap will not allow access to the files in /usr/share/hunspell. Not sure if that is configurable or just a limitation on having confinement enabled.

It might be a good idea to put this issue in the know issues section so it can help other users.

I, again, don't have much time but will see if I can document that spellcheck section for release 0.4.0. It has changed quite a bit since 0.3.0.

Thanks!

@IsmaelMartinez IsmaelMartinez changed the title Spellcheck don't work in snap when having many languages Spellcheck don't work in snap with polish as default os language Jul 19, 2019
@IsmaelMartinez IsmaelMartinez removed the question Further information is requested label Jul 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
known issue/workaround Workaround available in the know_issues.md file snap Related to snap package
Projects
None yet
Development

No branches or pull requests

2 participants