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

Allow providing multiple languages with --lang #2

Open
fenuks opened this issue Mar 29, 2023 · 4 comments
Open

Allow providing multiple languages with --lang #2

fenuks opened this issue Mar 29, 2023 · 4 comments

Comments

@fenuks
Copy link

fenuks commented Mar 29, 2023

In many projects you can repository may use more than one language. Sometimes other language can be used in one directory (e.g. translated external documentation), and sometimes usage can be mixed (e.g. code is in English, but comments/documentation in other). Currently, it is forbidden to provide multiple languages:

error: The argument '--lang <LANG>' was provided more than once, but cannot be used multiple times

I think that it would be also useful to allow setting this via skyspell-ignore file, otherwise user must know which flags to pass, and it also makes more difficult to write generic CI template for all projects.

@dmerejkowsky
Copy link
Contributor

Currently, it is forbidden to provide multiple languages:

Yes. Unfortunately there's not much we can do here because we are using Enchant and Enchant itself does not have this feature.

Sorry :(

@fenuks
Copy link
Author

fenuks commented Mar 31, 2023

Well, I don't know inner working of this tool, but couldn't it e.g. load all dictionaries separately and iterate. Let's say I have text in Latin, and I would like to check it for English and Latin. I check first for English, some errors are detected, and then I check for Latin, and so on. If in any of the loaded dictionaries given word is accepted, then it could be considered correct. Or is this algorithm too naive, or perhaps too difficult to implement correctly/in performant manner?

@dmerejkowsky dmerejkowsky reopened this Apr 11, 2023
@dmerejkowsky
Copy link
Contributor

You know, I never thought about that naive algorithm 😛

perhaps too difficult to implement correctly/in performant manner?

Well, we won't know until we try - let's re-open this issue !

@fenuks
Copy link
Author

fenuks commented Jul 3, 2024

Enchant now supports multiple dictionaries, support has been added in https://github.com/AbiWord/enchant/pull/383.

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

2 participants