-
Notifications
You must be signed in to change notification settings - Fork 50
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
LibreTranslate provider support #36
Conversation
Anyone home? π |
@discourse What happened here? |
@pierotofy try asking on https://meta.discourse.org/t/discourse-translator/32630 β€οΈ Their meta forum is where all discussion happens. |
Same radio silence on the meta discourse as here, will this ever be merged? |
I recommend people just use our fork at https://github.com/LibreTranslate/discourse-translator |
I've forked the original repo and merged the plugin into an upated branch here, https://github.com/gdevenyi/discourse-translator/tree/deploy |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @pierotofy, many apologies, we didn't see this earlier. It looks good, though, thank you!
Any chance you can grant Discourse (and send privately) an API key for testing? We don't run our own LibreTranslate instance and currently don't have the time to stand one up.
If anyone can write tests for this PR, we'll be happy to review and merge this. |
You can use one of the open mirrors here to test this without needing an API key: https://github.com/LibreTranslate/LibreTranslate#mirrors I've also updated the fork at https://github.com/LibreTranslate/discourse-translator with the latest changes for those that can't wait for this to be merged. |
Hi @pierotofy , it seems SUPPORTED_LANG discourse-translator/plugin.rb Line 126 in d650f82
and the /languages url needs the GET method |
https://meta.discourse.org/t/discourse-translator/32630 claims Libre-translate is supported, but this isn't merged yet? |
Yes, that is correct. The meta topic points to the fork that has LibreTranslate support. This PR needs a refactor before merging, see the comment by @bdecotte just above. |
So, we are OK now? :) |
@pmusaraj I note that the latest version has Is there anything else in the way of merging this? (Well, other than there was no response when it was fixed and now there are conflicts...) |
Apologies for the very long delay here, all... but this is now approved and I am merging it. Thanks for all your work here! I tested the feature locally using these steps: pip3 install libretranslate # installs LibreTranslate
libtranslate # starts the service and on the first run it downloads dictionaries
ltmanage keys add 120 # adds an api key for use in the site settings
libtranslate --api-keys # optional, for testing the api key in the LibreTranslate UI |
Hello β !
This PR adds support for libretranslate (https://libretranslate.com) as a translation provider.
Hope this can be useful to others. Let me know if changes are needed.
Cheers! π₯