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

spellcheck doesn't see dictionaries on macOS after upgrading to Geany 1.38 #30

Closed
danpla opened this issue Oct 15, 2021 · 9 comments
Closed

Comments

@danpla
Copy link

danpla commented Oct 15, 2021

I've updated Geany to 1.38 (geany-1.38_osx-2.dmg) and found that it no longer sees the dictionaries. In debug messages I found that Enchant is now 2.2.15 (was 1.x in Geany 1.37), so, as README suggests, I moved the dictionaries to the "hunspell" subdirectory while leaving the path in the configuration dialog untouched (parent directory of "hunspell"). Unfortunately, this didn't help, and the plugin still gives error "The Enchant library couldn't be initialized (unknown error (maybe the chosen language is not available))".

@elextr
Copy link
Member

elextr commented Oct 16, 2021

I'm going to slide this to the Geany-osx repository since (AFAICT) that bundle includes enchant, but no backends.

This may be deliberate and you have to install them yourself, but the OSX packager will know.

@elextr elextr transferred this issue from geany/geany-plugins Oct 16, 2021
@techee
Copy link
Member

techee commented Oct 16, 2021

I haven't tried it but at least from this code

https://github.com/AbiWord/enchant/blob/ff5e31d0535ba93f27010a6b1ac50e87252bd759/src/lib.c#L116

it seems that enchant gets the config files from ~/.config/enchant (g_get_user_config_dir() should return ~/.config here). So you could try moving the dictionaries there.

@danpla
Copy link
Author

danpla commented Nov 12, 2021

Unfortunately, moving dictionaries to ~/.config/enchant doesn't seem to help.

@techee
Copy link
Member

techee commented Nov 13, 2021

There was indeed a problem where the enchant library didn't correctly find the corresponding spelling module. I created a new build here, would you give it a try?

https://download.geany.org/snapshots/geany-1.38_osx.dmg

@danpla
Copy link
Author

danpla commented Nov 13, 2021

It seems like in this build, the plugin shows language names from the /Applications/Geany.app/Contents/Resources/share/enchant/AppleSpell.config file (seems to be https://github.com/AbiWord/enchant/blob/master/providers/AppleSpell.config) and ignores user's dictionaries.

Applications/Geany.app/Contents/Resources/lib/enchant-2 directory only has enchant_applespell.so, so maybe there should be the Hunspell plugin instead (or in addition to)?

@techee
Copy link
Member

techee commented Nov 13, 2021

OK, one more attempt - hunspell is now compiled and enchant_hunspell.so module is also added to the bundle. The download link is the same as before. Does it work now?

@danpla
Copy link
Author

danpla commented Nov 19, 2021

It seems to work now. I have Russian.dic and en_US.dic files; Russian is now in the list, but since the languages from AppleSpell.config are still there, I'm not sure whether en_US is my dictionary file or the one from AppleSpell.

Thanks!

@techee
Copy link
Member

techee commented Nov 19, 2021

I'm not sure whether en_US is my dictionary file or the one from AppleSpell.

You can rename the en_US hunspell dictionary files e.g. to en_US1 and then you'll have both dictionaries side by side.

@techee
Copy link
Member

techee commented Jan 27, 2022

Closing as I believe it's fixed now.

@techee techee closed this as completed Jan 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants