RapidFingers / Translator

Translator for Elementary OS
16 stars 12 forks source link

The Yandex API doesn't seem to work anymore #68

Open janxkoci opened 4 years ago

janxkoci commented 4 years ago

Hi there,

first of all, thanks for this very cool and useful app. It's really neat and handy to have native translator app on the desktop instead of opening the browser all the time. This is especially useful on my low-end netbook with little spare memory :)

However, recently the app stopped working. For any input the app returns no translation. I tried several languages, including those I successfully used in the past, but no avail.

Is it possible the Yandex API has changed and some action is required?

Thanks again for your work on this app, it's really cool to have it :)

syfds commented 4 years ago

Yandex API returns for me today following error in the response: {"code":408,"message":"Maximum monthly translated text volume exceeded"} and translation service crashes in the background. It seems to be a volume problem so I decided to create a pull request to show this error message to the user.

janxkoci commented 4 years ago

I think the problem is that the API key used by the dev is shared by every user, meaning all our requests count towards this single quota, based on the single API key. At least this is the problem with other providers and apps (most notably all 3rd party YouTube clients, like SMtube and Minitube, recently broke because Google decided to implement quotas this way). And I'm afraid Yandex is doing the same now.

I'm not a dev, so I have no idea how to implement this stuff (and even some real devs are struggling, from what I've seen around on e.g. GNOME gitlab), but I think the providers (at least Google) want the devs to not use a single API key for all requests from all users of their apps, but rather, somehow, have each user have some different key. I really don't know how that should work, and as I said, even pros don't know.

BTW, what about DeepL API? Could it work instead? Although I'm not sure how limited is the free usage...

chrisandrew-dev commented 3 years ago

Hi there, I downloaded this app today and translations aren't working for me either (only tested English > Spanish). Please let me know if there's any additional info I could provide that might be helpful.

OS: eOS 5.1 (latest)

janxkoci commented 3 years ago

Hi again,

I happen to come across this free & open source python library & web API that you may be able to use: https://github.com/argosopentech/argos-translate

Hope it helps..

Lafydev commented 3 years ago

Hi again,

I happen to come across this free & open source python library & web API that you may be able to use: https://github.com/argosopentech/argos-translate

Hope it helps..

It's possible for limited usage but : "The API on libretranslate.com should be used for testing, personal or infrequent use. If you're going to run an application in production, please get in touch to get an API key or discuss other options."

janxkoci commented 3 years ago

Fair enough.

However note that another similar project recently implemented this as back-end - Dialect (a GNOME app). There are several other suggested back-ends in their issue tracker.

Edit: interestingly the dictionary seems unaffected by this issue and works without problems for all languages.

Lafydev commented 3 years ago

What do you think about using the same libretranslate library, but offline. Each one can download the languages he needs, and so we don't need to pay for a server ?