Skip to content
This repository has been archived by the owner on Mar 20, 2019. It is now read-only.

Spell checker not working #83

Open
xsmile opened this issue Jun 12, 2017 · 7 comments
Open

Spell checker not working #83

xsmile opened this issue Jun 12, 2017 · 7 comments

Comments

@xsmile
Copy link
Collaborator

xsmile commented Jun 12, 2017

Due to the disabled automatic download function of dictionaries, Inox is missing them and spell checking is not working.

System hunspell dictionaries cannot be used with chromium because it uses a custom file format. They can be converted though.

To manually install a dictionary offered by Google, get a language-spcecific *.bdic file from https://chromium.googlesource.com/chromium/deps/hunspell_dictionaries/+/master, place it in ~/.config/inox/Dictionaries and restart the browser.

@Eloston
Copy link
Contributor

Eloston commented Jun 12, 2017

How feasible is it to modify the Chromium code to use system hunspell libraries?

@DragoonAethis
Copy link

I think it might be easier to write an external script that downloads the requested dictionary. This file describes how to convert the dictionaries using a script not available in the Chromium repo, and they in fact are using Hunspell, just with a custom dictionary format. Here's their Hunspell fork with google.patch (that alone being almost 1K of new code, modifying a few Hunspell components) and google/bdict* being the format reader/writer. Not sure if anyone really wants to patch and maintain that.

@Eloston
Copy link
Contributor

Eloston commented Jun 12, 2017

@DragoonAethis The page you linked says the hunspell code has moved here. According to README.chromium, it seems that most of the modifications are optimizations or slight usability enhancements. I just dug through some Chromium code and Hunspell doesn't seem too tightly integrated, so I'll consider writing a patch at some point in the future.

@simonorono
Copy link

What's the status of this issue?

@Eloston
Copy link
Contributor

Eloston commented Jul 9, 2017

I can't speak for gcarq, but I haven't done anything related to this yet. I haven't been working on anything Chromium-related recently.

@gcarq
Copy link
Owner

gcarq commented Jul 10, 2017

There is also no status update from my side

@Eloston
Copy link
Contributor

Eloston commented Aug 18, 2017

I've looked into this more, and it'll take more work than I originally thought. There are two main files that need to be refactored:

  • chrome/browser/spellchecker/spellcheck_hunspell_dictionary.cc - Needs refactoring to read Hunspell dictionaries from the system instead of downloading and reading BDict dictionaries. This includes converting a Chromium language string to a language code for Hunspell dictionaries (something similar to what's in components/spellcheck/common/spellcheck_common.cc).
  • components/spellcheck/renderer/hunspell_engine.cc - Needs refactoring to use the system Hunspell interface instead of Google's Hunspell library //third_party/hunspell. Google's Hunspell library can't be used since it's been changed to use BDict dictionaries.

There are some other things as well, such as removing GN references to //third_party/hunspell, dynamically linking the Hunspell library, and implementing detection of system Hunspell dictionaries.

I don't have time right now to figure all of this out, so hopefully someone else that's interested can take over.

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

No branches or pull requests

5 participants