Initial idea of a general translation service #903
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
So, I saw that there is a quite handy file that handle the deepdl translation service, so I think into generalize that idea into a package, so we can define other kind of translation services.
I made a package for stumpwm called stumpwm-translate , which uses a https://github.com/TheDavidDelta/lingva-translate instance to translate from one language to other, using the stumpwm interface.
I also liked the idea of translate depending on the detected language (tho this can probably be more lengthy to implement so for it would be out of the scope of this issue), I'll keep it for japanese, given that it is already written so.
Also, the decode url code is taken from https://github.com/drdo/do-urlencode , mainly because I didn't wanted to add another dependecy and I found better just to borrow a few lines from there.
This is still a draft, I want to create a proper extension (maybe in the extension directory, now that it does have a more general name) and separate the functionality, I'll open this PR soon in the process to maybe get some feedback.
Thanks! 👍