AndBible / and-bible

AndBible: Bible Study
https://andbible.org
GNU General Public License v3.0
549 stars 193 forks source link

Add Google Translate / DeepL integration to read documents in your own language #3265

Open tuomas2 opened 3 weeks ago

tuomas2 commented 3 weeks ago

With DeepL API you can translate XML easily:

https://developers.deepl.com/docs/xml-and-html-handling/xml

To use feature, user needs to get free (or paid) API account, enter API key into AndBible.

App would

DeepL provides free 500000 characters / month / user, which corresponds to about 50 pages of Kings Comments. After that user is able to purchase more translation quota from DeepL. https://www.deepl.com/pro-api?cta=header-pro-api

User need to be able to see somewhere used/available DeepL translation quota too.

tuomas2 commented 3 weeks ago

Estimated required work: 1-2 working days only for (in my opinion) such an impressive feature! DeepL seem to be very good to translate documents as long as it gets enough context.

You can also help this to come true via https://shop.andbible.org

tuomas2 commented 3 weeks ago

Google translate has similar terms for their API https://cloud.google.com/translate

tuomas2 commented 3 weeks ago

Blog post / video about this: https://andbible.org/2024/06/11/idea-add-google-translate-deepl-integration-to-andbible/

tuomas2 commented 3 weeks ago

Bookmarks and notes should be probably disabled on translated documents. Although it would be possible to enable it for them too but it would work only with same cached copy of translation.

agrogers commented 3 weeks ago

Is there a reason why this should be a user based feature? Couldn't the translation be done once, uploaded as a new language to the AndBible repository and then future users just install it like any other document in that language? Is there license issues for this?

tuomas2 commented 3 weeks ago

Would be costly to use translation tool, as it gives only 500000 characters for free per user. And it would be also difficult to obtain license to distribute such AI-translated documents from copyright holders. It would not be a general solution. This is! Any user can use it from (almost) any language to (almost) any language.

Only negative side is that user needs to to get his own API key.

agrogers commented 2 weeks ago

So you think there is no license issue with individual use but there is for distributing it. Interesting situation where it's legal for everyone to translate for themselves but not legal for someone else to translate for them.

If it were legal then a nice option would be for the user to upload their translation for others to download. That might solve both cost and character limitations

On Wed, 12 Jun 2024, 20:11 Tuomas Airaksinen, @.***> wrote:

Would be costly to use translation tool, as it gives only 500000 characters for free per user. And it would be also difficult to obtain license to distribute such AI-translated documents from copyright holders. It would not be a general solution. This is! Any user can use it from (almost) any language to (almost) any language.

Only negative side is that user needs to to get his own API key.

— Reply to this email directly, view it on GitHub https://github.com/AndBible/and-bible/issues/3265#issuecomment-2163041321, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADKGTJRJCLM7Y2I7AMHZLKTZHBFYXAVCNFSM6AAAAABJAEI6MWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNRTGA2DCMZSGE . You are receiving this because you commented.Message ID: @.***>

tuomas2 commented 2 weeks ago

Yes, it's different thing to integrate translation tool into app than distribute translated documents.