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

Spelling language missing #169

Closed
gu1ll0me opened this issue Apr 12, 2016 · 13 comments
Closed

Spelling language missing #169

gu1ll0me opened this issue Apr 12, 2016 · 13 comments

Comments

@gu1ll0me
Copy link

My Setup

  • My OS name and version: ArchLinux
  • My current app version: 1.3.1

fr_FR is missing in the spelling languages menu. So every word I type is underlined in red.

Thanks.

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

@pyrignis
Copy link

pyrignis commented Jun 26, 2016

I'm also affected, with Ubuntu 16.04. Simply adding the fr_FR.dic & fr_FR.aff in /resources/dictionaries/ is not enough.

@xenithorb
Copy link
Contributor

After you added those dictionaries did you also try LANG=fr_FR.UTF-8 or the equivalent proper environment variable? This could be a clue that it's not actually looking there for the dicts.

@pyrignis
Copy link

starting rocket.chat.electron with the following command does not help:
$ ./rocketchat --LANG=fr_FR.UTF-8

@xenithorb
Copy link
Contributor

If anything it would be

export LANG=fr_FR.UTF-8
rocketchat

or

LANG=fr_FR.UTF-8 rocketchat

@pyrignis
Copy link

it does not work either. And the command line output only complains about the certificate.json file that I have deleted earlier.

@chkal
Copy link

chkal commented Sep 15, 2016

Unfortunately just adding the dictionary files won't work. This is caused by this part of the code:

checker = require('spellchecker');
availableDictionaries = checker.getAvailableDictionaries();
if (availableDictionaries.length === 0) {
dictionariesPath = path.join(remote.app.getAppPath(), '../dictionaries');
availableDictionaries = [
'en_US',
'es_ES',
'pt_BR'
];
}

I did some research and this seems to happen in the code:

I see the following ways to fix this:

  1. Wait for the upstream issues to get fixed ;-)
  2. Remove the hard coded locales and check the contents of the dictionaries folder to determine the locales. This way users can add dictionaries more easily.
  3. The same as mentioned in (2) but also check /usr/share/hunspell for dictionaries.

Any thoughts?

Upstream issues:

@xenithorb
Copy link
Contributor

Hmm, a possible clue as to why I can't get spellchecking to work in Fedora:

$ rpm -ql hunspell-en-US
/usr/share/doc/hunspell-en-US
/usr/share/doc/hunspell-en-US/README_en_US.txt
/usr/share/myspell/en_US.aff
/usr/share/myspell/en_US.dic

I don't have a deep understanding of how the spellchecking works, but I am eager to get it working on Fedora for my package. Thanks for the input!

@DemonTPx
Copy link

DemonTPx commented Mar 7, 2017

I've fixed this in node-spellchecker, but the PR is still open.

See: atom/node-spellchecker#69

It that is merged, the spellchecker will search for dictionaries installed globally on the system.

@chkal
Copy link

chkal commented Mar 7, 2017

That's awesome. Thank you so much.

@idl0r
Copy link

idl0r commented Apr 4, 2018

Any news on this issue?

@etopit
Copy link

etopit commented Apr 29, 2018

+1

1 similar comment
@xucong-zhang
Copy link

+1

@tassoevan
Copy link
Collaborator

Added this issue in 2.15.0 version milestone since I'm refactoring the spell checker code.

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

No branches or pull requests

9 participants