jupyterlab-contrib / spellchecker

Spellchecker for JupyterLab notebook markdown cells and file editor.
BSD 3-Clause "New" or "Revised" License
205 stars 20 forks source link

Provided dictionary files <de_DE_frami.dic> & <de_DE_frami.aff> not recognized. After renaming to <de_DE.*> it is working well. #99

Open jspille opened 2 years ago

jspille commented 2 years ago

Description

The provided dictionary files & are not recognized. After renaming to & it is working well.

Reproduce

After installing the spellchecker, I changed the setting to.

    // Language of the spellchecker
    // Dictionary identifier, e.g. en-us
    "language": "de-de",

after saving the setting, the spellchecker didn't work.

I changed the filename of the .dic and .aff file, as explained above, and the spellchecker worked well. Please ensure that all delivered dictionaries, incl, <_frami.> are recognized. Thanks.

Context

Other labextensions (built into JupyterLab) app dir: C:\DataProg\anaconda3\share\jupyter\lab jupyterlab-spreadsheet v0.4.1 enabled ok

krassowski commented 2 years ago

Hi @jspille thank you for opening the issue. It looks that you are attempting to use an incorrect dictionary identifier. The identifier for the de_DE_frami.dic/.aff dictionary is de_DE_frami and it is set automatically when using the dictionary selector from the status bar:

de_frami

Why were you expecting de-de to work in this case? Is this mention like this in our documentation or some tutorial? If yes, this needs correcting, but I don't see need for any further action other than that.

noeleont commented 2 years ago

Not the issue owner but I had the same assumption, maybe we could add the default available dictionaries and their language tag to the readme?

pya commented 2 years ago

Had the same problem. Adding the animation above to the README would be very helpful. The statusbar doesn't seem to mentioned in the README at all. The statusbar is a great feature but the user might not look at it. Pointing this feature out in the README would be great.

krassowski commented 2 years ago

We can dynamically add the enum to the settings schema to validate the available dictionaries and have a switch list in settings UI (available since JupyterLab 3.3). This would require using settingRegistry.transform to change the schema in the fetch step and then trigger update of the settings on any change to the online dictionaries or server reported dictionaries. Something like this is being done in jupyterlab-lsp and in the shortcuts extension.