crow-translate / QOnlineTranslator

A library for Qt5 that provides free usage of Google, Yandex and Bing translate API.
GNU General Public License v3.0
78 stars 13 forks source link

DeepL support #6

Open tiotrom opened 5 years ago

tiotrom commented 5 years ago

Unsure if this can be done but DeepL https://www.deepl.com/translator seems to be a great translator, better than any. Is it possible to integrate with Crow Translate? Maybe check it out and thanks for your work!

Shatur commented 5 years ago

Unfortunately, it's not possible: ( Crow Translate uses only those backends that available for free. DeepL API requires a paid subscription.

tiotrom commented 5 years ago

I understand. Indeed I see now that their API requires a paid subscription. Keep up the good work!

Shatur commented 4 years ago

I will add the ability to specify a paid account in future

rugk commented 4 years ago

Okay, that's great to hear.

CuloArdido commented 4 years ago

Unfortunately, it's not possible: (

Tell that to Deeplator. I have not checked if it works but it can serve as a basis for a C++ and QT implementation.

VolkMilit commented 4 years ago

@CuloArdido, I just checked it, and it doesn't work. The API URL return error. Even author doesn't know how to bypass this. So no. My guess that DeepL had public API, but, unfortunately they decided to make it paid.

Proof that API is paid. 5 euro per month. But you can download their proprietary app :)

MalteKiefer commented 4 years ago

Did you try to get intouch with the company? Maybe there have a better offer for the OpenSource community.

VolkMilit commented 4 years ago

I don't think they're going to open API for one small open source project. Neither they will make price lower for Crow.

Xant1k commented 4 years ago

Если API платный то как тогда работает QTranslate с ним?

Shatur commented 4 years ago

@Xant1k, я полагаю, платит. Не похоже что у них и другие API используются бесплатно. У Вороны использование бесплатного API заметно, т.к. при переводе большого кол-ва слов провайдер (у каждого этот лимит свой) запретит вам какое-то время переводть что-либо.

VolkMilit commented 4 years ago

TL;DR: it's not technically possible to include DeepL for now, because of their paid and unfree API. There is also not possible to create free account. Also, I dis some research and their EULA basically doesn't allow to use API in FOSS and even Open Source projects. There is QTranslate, which claims to use DeepL API, but it's proprietary and it's seems parsing web pages or something (that's just my guess, don't quote me on that). I tried to just download DeepL page with translation with Curl, but it's, obviously, doesn't worked. There is also some technical issues with requests per day -- even if we, somehow, learn how to parse a site, CAPTCHA will kill our attempts.

@Xant1k, почти наверняка договорённость с тем же DeepL, реклама, например. Потому что QTranslate несвободный, могут творить что вздумается. Сегодня бесплатно распространяют, завтра будут драть $$$.

Ещё один вариант для Crow это парсить страницу, но это не будет так просто -- curl ничего не отдаст обратно, будет просто пустое поле; нужен бот тогда, который будет через какой-нибудь Selenium собирать информацию, что естественно за рамками Crow.

Eщё одна проблема в том, что там теперь аккаунт даже нельзя бесплатно создать, только 30 дней триала, для частных лиц, кстати, ещё и дороже выходит, непонятно почему. Просто чтобы не было недопонимания: если нажать "Создать новый аккаунт" ведёт именно на эту страницу. Видимо, когда-то, как я уже говорил, у них был бесплатный доступ для разработчиков, теперь его нет, увы и ах.

Опять же проблема: для использования api нужен постоянный ключ, Crow -- свободное ПО, то есть DeepL, теоретически, могут наехать, потому что:

Customer is obligated to keep the access credentials provided by DeepL secure, and undertakes not to disclose them to any third parties

Выдержка из лицензионного соглашения на использование API.

Кстати, вот ещё интересный пункт:

To the extent reasonable and technically possible, Customer must take precautions during the implementation of the Application using the API to ensure that Customer’s Application will continue to work properly even if the API is not available, whether caused by DeepL’s or Customer’s fault.

И ещё:

Customer must immediately inform DeepL if there are reasons to expect a significant increase in the number of API Requests for reasons such as an extraordinary surge in End Users, unusual marketing, promotions or other campaigns.

Если я правильно понимаю там ограничение на количество запросов в день, что делает этот сервис бесполезным.

Короче говоря, моё мнение, что нужно предоставить возможность ввести ключ (ну или что там потребуется) для пользователей, оплативших подписку. Для всего останьного есть ABBYY Lingvo.

EDIT: судя по FAQ, таки да, там какие-то манипуляции со страницами, но как это работает мы не узнаем. Косвенно мою теорию подтверждает, что ему нужен некий jscript.dll (обход капчи? обход Cloudflare?) В любом случае это будет сложно не только поддерживать, но и имплементировать.

Shatur commented 4 years ago

Should be done on the QOnlineTranslator side.

bugzy commented 2 years ago

It looks like DeepL now has a free API option:

Shatur commented 2 years ago

It would be nice to integrate. If someone want to contribute, I would suggest to look at b3235834d853bba2981ab68c9dc832336ebd071c to see how the integration is usually done.

VolkMilit commented 2 years ago

It still doesn't support Russia, for example. List of countries, where service is available is short. And required credit card number to register, to get free access. No, thank you.

wokawoka commented 1 year ago

+1

ghost commented 1 year ago

Any updates?

Vistaus commented 1 year ago

I would also love DeepL integration.

Shatur commented 1 year ago

Currently no one working on it, but if you want to have this feature - send a PR, I will be happy to review it.

VolkMilit commented 1 year ago

I'm already explain everything in this comment. Asking every year doesn't make API magically free (and free as a beer) or something.

Sorry if this sound rude, but that's not how opensource projects works. You can send a PR, if you're find solution, either that doesn't required paid subscription, or if you're willing to implement credentials settings into Crow UI. Either way will be appreciated. I'm, for example, not so exciting for DeepL, so I'm not interesting in implementing either of this. Maybe out of curiosity I can try to do this, but I'm short on free time. Shatur has same problems as me. Again, this is how opensource works.

To be completely honest, I want to finish work with opensource engines (Lingva - parse examples and voice support and LibreTranslate - ?) and make them default. We've already discuss this with Shatur and both come with this decision. This might be more important, because of opensource nature of this project. Also, selfhosters will benefit from this, because you can self-host Lingva\LibreTranslate on your own VPS\VDS.

tio-trom commented 1 year ago

As the originator of this thread, I won't even suggest DeepL anymore. Please use FOSS alternatives.

Vistaus commented 1 year ago

As the originator of this thread, I won't even suggest DeepL anymore. Please use FOSS alternatives.

I will, as soon as they can provide me with decent translations. And so far, they cannot, at least with the languages I'm using them for.

@VolkMilit I don't know about others, but I wouldn't mind paying a fee, donation or sponsoring the project in order to get DeepL support implemented.

VolkMilit commented 1 year ago

@Vistaus, DeepL doesn't work where I live in, so, anyway I can't use it properly. That is why pull request is more then welcome.

ghost commented 1 year ago

@Vistaus don't DeepL have free API?

VolkMilit commented 1 year ago

@toprak it's not. Try to register, it's immediately asking for your credit card. Well, maybe not anymore. But, that again:

image

There is no Russia, nor Ukraine, so we can't use it, even if we want. Again: PR is appreciated, if you want DeepL to work. For me api returns nothing.

Try this example from the docs:

curl -X POST 'https://api-free.deepl.com/v2/translate' \
    -H 'Authorization: DeepL-Auth-Key [yourAuthKey]' \
    -d 'text=Hello%2C%20world!' \
    -d 'target_lang=DE'

For me it's just empty response, both from browser and from cURL. Browser response with 403, (of course it's not, because I can't get my freaking key) and I can't press the "Sign up for free" button from this page.

drunkod commented 1 year ago

https://github.com/AlexanderWillner/deepl-alfred-workflow2/blob/master/deepl.sh

VolkMilit commented 1 year ago

image ...which is still unavailable for us. AND we need to add GUI interface for supporting this keys, because we can't extract them from webpages, like we've already done for Google, Yandex and Bing. Yes, they are requiring key too, but we, at least, can extract them.

drunkod commented 1 year ago

@VolkMilit

https://github.com/AlexanderWillner/deepl-alfred-workflow2/blob/master/deepl.sh

This works fine with fast requests, in chrome extension and if you add the right headers it will work without api keys. https://chrome.google.com/webstore/detail/deepl-translate-reading-w/cofdbpoegempjloogbagkncekinflcnj

Examples: https://greasyfork.org/en/scripts/411976-deepl-twitter-translation/code

ghost commented 1 year ago

@Shatur @VolkMilit why don't we scrape the site? these would be helpful i believe https://github.com/OneMoreGres/ScreenTranslator/blob/master/translators/deepl.js https://github.com/sinedie/SRTranslator/blob/master/srtranslator/translators/deepl_scrap.py

Shatur commented 1 year ago

If anyone interesting on having DeepL integration, I will happy to review and merge a PR ASAP. But I myself currently busy for working on it on my own.

ghost commented 1 year ago

this would be helpful

kamaqnkatyqn commented 1 year ago

I think the fact that you have to provide a credit card is not a problem because they don't charge you. The developer API is still free: 500.000 characters/month. In Russia, you could use a VPN if you want to use the service. And: The possibility to tweak the translation by using glossaries would be a great improvement. No other provider has this possibility. As to the translation direction English - German, DeepL is the best provider of all in terms of quality. So, I still vote for the inclusion of DeepL.

ghost commented 1 year ago

@kamaqnkatyqn but the credit card have to be registered on same country as vpns location so that wont work using deeplx api that i sent above is our best option. And i agree deepl has best translation especially when it comes to eng to turkish

evpix commented 1 year ago

At this point, is there any progress on integrating DeepL into Crow?

Shatur commented 1 year ago

Please, don't bump the issue without significant information.

bege10 commented 7 months ago

@Shatur There is an unofficial DeepL client for Android in the F-Droid repo that uses WebView and the no longer maintained Windows app QTranslate has DeepL integrated.

viktor-zhuromskyy commented 7 months ago

Please! DeepL gives free API with 500K symbols allowance per month. That is more than enough for most users!

Please add this option to use DeepL in your app! I can send you $50 to thank for adding this feature.

Shatur commented 7 months ago

Sorry, I busy with other stuff. But PRs are welcome.