Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

isMisspelled() always returns false on Win 7 #79

Open
AshDevFr opened this issue Aug 22, 2017 · 2 comments
Open

isMisspelled() always returns false on Win 7 #79

AshDevFr opened this issue Aug 22, 2017 · 2 comments

Comments

@AshDevFr
Copy link

Hi,

I've been using the spellchecker on Macos and Win10 and it works perfectly on both.
Unfortunately when I try to use it on Win7 it is not working.

getAvailableDictionaries() return an empty array.

I tried to add this to my configuration and it copy correctly the files but it doesn't change anything.

...
"extraResources": [
     {
        "from": "node_modules/spellchecker/vendor",
        "to": "app.asar.unpacked/node_modules/spellchecker/vendor",
        "filter": "**/*"
      }
    ],
...

The doc says :

Windows 7 and below as well as Linux will rely on Hunspell

But no matter what I try, the array of available dictionaries stays empty and isMisspeled return always false. By default I set the dictionary to en-US.

Does any of you have successfully setup the spellchecker for Windows 7 with Hunspell and if yes, how ?

@chrismohr
Copy link

I just ran into the same issue, and got it working with the help of this issue.

We are using electron-packager, and I added the .aff and .dic extensions to unpack, which adds the dictionary files to app.asar.unpacked\node_modules\spellchecker\vendor\hunspell_dictionaries

Here's our config:

    asar: {
      unpack: '**/*.+(dll|node|aff|dic)',
    },
    overwrite: true,

(We were already unpacking .dll and .node for another dependency.)

@niftylettuce
Copy link

You can use https://github.com/Wulf/nodehun in the meanwhile. brew install hunspell or sudo apt-get install hunspell. Not sure about Windows support, but it looks like Chocolatey has hunspell package as well.

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

No branches or pull requests

3 participants