Spell check in "Extended description..." should support custom dictionaries #663

Closed
refaelsh opened this Issue Feb 15, 2017 · 8 comments

Comments

Projects
None yet
2 participants
@refaelsh

Spell check in "Extended description..." does not work.
Every word (regardless of correctness) is underlined with a red line.
Here is a screenshot:
https://www.dropbox.com/s/l9jkntkp5yopdip/Screenshot_2017-02-15_17-47-30.png?dl=0

@davvid

This comment has been minimized.

Show comment
Hide comment
@davvid

davvid Feb 18, 2017

Member

We currently hard-code the path to a dictionary text file that is typically found on Linux and macOS/unix systems: /usr/share/dict/words

If you make that path available (tho I'm not really sure if it's possible on Windows) and you populate the file with an alphabetized, newline-separated list of words then this feature will start working.

We should make it possible to specify additional dictionaries so I'll leave this issue open as a feature request.

Member

davvid commented Feb 18, 2017

We currently hard-code the path to a dictionary text file that is typically found on Linux and macOS/unix systems: /usr/share/dict/words

If you make that path available (tho I'm not really sure if it's possible on Windows) and you populate the file with an alphabetized, newline-separated list of words then this feature will start working.

We should make it possible to specify additional dictionaries so I'll leave this issue open as a feature request.

@davvid davvid changed the title from Spell check in "Extended description..." does not work to Spell check in "Extended description..." should support custom dictionaries (for Windows) Feb 18, 2017

@refaelsh

This comment has been minimized.

Show comment
Hide comment
@refaelsh

refaelsh Feb 18, 2017

Thank You for replaying :-)

  1. Its now Windows (God forbid :-)), its Arch Linux.
  2. I have no text file named "words" in the /usr/share/dict/ folder. I have only one file in that folder and its called "crack-lib" small and it seems to contains more then 50k lines with dictionary words.

Thank You for replaying :-)

  1. Its now Windows (God forbid :-)), its Arch Linux.
  2. I have no text file named "words" in the /usr/share/dict/ folder. I have only one file in that folder and its called "crack-lib" small and it seems to contains more then 50k lines with dictionary words.
@davvid

This comment has been minimized.

Show comment
Hide comment
@davvid

davvid Feb 19, 2017

Member

Looking at what I currently have (debian), /usr/share/dict/words is a symlink to /usr/share/dict/cracklib-small. I'm going to make it prefer the latter path. Is that the same exact path you have? If not, let me know what you have and I'll add a check for that too.

Member

davvid commented Feb 19, 2017

Looking at what I currently have (debian), /usr/share/dict/words is a symlink to /usr/share/dict/cracklib-small. I'm going to make it prefer the latter path. Is that the same exact path you have? If not, let me know what you have and I'll add a check for that too.

davvid added a commit to davvid/git-cola that referenced this issue Feb 19, 2017

spellcheck: add support for custom dictionaries
Closes #663
Reported-by: @refaelsh
Signed-off-by: David Aguilar <davvid@gmail.com>

davvid added a commit to davvid/git-cola that referenced this issue Feb 19, 2017

Merge branch 'spellcheck'
* spellcheck:
  spellcheck: add support for custom dictionaries
  spellcheck: update to the modern dict-common layout

Resolves #663
Signed-off-by: David Aguilar <davvid@gmail.com>

@davvid davvid closed this in a5670ca Feb 19, 2017

@davvid davvid changed the title from Spell check in "Extended description..." should support custom dictionaries (for Windows) to Spell check in "Extended description..." should support custom dictionaries Feb 19, 2017

@davvid davvid added portability and removed windows labels Feb 19, 2017

@refaelsh

This comment has been minimized.

Show comment
Hide comment
@refaelsh

refaelsh Feb 19, 2017

@davvid Yes, this is the exact path I have.
I've seen the commits You've made.
Thank You very much for fixing this issue :-)

@davvid Yes, this is the exact path I have.
I've seen the commits You've made.
Thank You very much for fixing this issue :-)

@refaelsh

This comment has been minimized.

Show comment
Hide comment
@refaelsh

refaelsh May 18, 2017

Hello again. Recently, the git-cola package on Arch Linux got updated to v2.11 and the bug still exists. What am I missing please?

Hello again. Recently, the git-cola package on Arch Linux got updated to v2.11 and the bug still exists. What am I missing please?

@davvid

This comment has been minimized.

Show comment
Hide comment
@davvid

davvid May 19, 2017

Member

I wonder if you need aspell or some package that provides the dictionary files? I'm not an Arch user but on Debian the packages that provide files in /usr/share/dict are cracklib-runtime, base-files, and dictionaries-common.

I should also note that the feature that was added allows you to specify any path for the dictionaries. Run git config --global cola.dictionary /path/to/dictionary/file and it'll honor the words listed in that file.

The words files contains one word per line, newline-separated.

http://git-cola.readthedocs.io/en/latest/git-cola.html#cola-dicitionary

Member

davvid commented May 19, 2017

I wonder if you need aspell or some package that provides the dictionary files? I'm not an Arch user but on Debian the packages that provide files in /usr/share/dict are cracklib-runtime, base-files, and dictionaries-common.

I should also note that the feature that was added allows you to specify any path for the dictionaries. Run git config --global cola.dictionary /path/to/dictionary/file and it'll honor the words listed in that file.

The words files contains one word per line, newline-separated.

http://git-cola.readthedocs.io/en/latest/git-cola.html#cola-dicitionary

@refaelsh

This comment has been minimized.

Show comment
Hide comment
@refaelsh

refaelsh May 28, 2017

@davvid

  1. I have aspell installed.
  2. I have a file called cracklib-small in folder /usr/share/dict. It contains dictionary words separated by new line.
  3. I ran git config --global cola.dictionary /usr/share/dict/cracklib-small.

I still have no spell checking :-)
What else am I missing?

@davvid

  1. I have aspell installed.
  2. I have a file called cracklib-small in folder /usr/share/dict. It contains dictionary words separated by new line.
  3. I ran git config --global cola.dictionary /usr/share/dict/cracklib-small.

I still have no spell checking :-)
What else am I missing?

@davvid

This comment has been minimized.

Show comment
Hide comment
@davvid

davvid Jul 8, 2017

Member

sorry for the late response.. you also have to go into the File -> Preferences dialog, click on Settings, and check the Check spelling checkbox. But, based on your original screenshot, you already have that enabled.

The setting of cola.dictionary should be optional and not strictly required now. At least it works fine on my debian install that has that same exact /usr/share/dict/cracklib-small path.

Can you poke inside that (maybe run head on it) and see if it's identical to the one here?

$ head /usr/share/dict/cracklib-small
10th
1st
2nd
3rd
4th
5th
6th
7th
8675309
8th
Member

davvid commented Jul 8, 2017

sorry for the late response.. you also have to go into the File -> Preferences dialog, click on Settings, and check the Check spelling checkbox. But, based on your original screenshot, you already have that enabled.

The setting of cola.dictionary should be optional and not strictly required now. At least it works fine on my debian install that has that same exact /usr/share/dict/cracklib-small path.

Can you poke inside that (maybe run head on it) and see if it's identical to the one here?

$ head /usr/share/dict/cracklib-small
10th
1st
2nd
3rd
4th
5th
6th
7th
8675309
8th
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment