Skip to content
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

Goslate Google Translate service no longer available #151

Open
nealtodd opened this issue Jan 28, 2016 · 5 comments
Open

Goslate Google Translate service no longer available #151

nealtodd opened this issue Jan 28, 2016 · 5 comments

Comments

@nealtodd
Copy link
Contributor

Use of Google Translate for suggestions via the ROSETTA_GOOGLE_TRANSLATE setting may need to be deprecated.

The Goslate package this relies on has been blocked:

Note Google has updated its translation service recently with a ticket mechanism to prevent simple crawler program like goslate from accessing. Though a more sophisticated crawler may still work technically, however it would have crossed the fine line between using the service and breaking the service. goslate will not be updated to break google’s ticket mechanism. Free lunch is over. Thanks for using.

Confirmed this by trying goslate from the shell. It worked for a couple of translations then received a 503:

import goslate
gs = goslate.Goslate()
print(gs.translate('hello world', 'de'))
hallo welt
print(gs.translate('hello world', 'de'))
hallo welt
print(gs.translate('hello world', 'de'))
HTTPError: HTTP Error 503: Service Unavailable

Within Rosetta, after clicking on the select link you're left with ... and a 500 error from the AJAX view.

@mbi
Copy link
Owner

mbi commented Feb 8, 2016

So, is commercial Google Translate a thing? Could it be used from Rosetta?
If not, should we just get rid of the code handling translation via goslate?

@nealtodd
Copy link
Contributor Author

nealtodd commented Feb 9, 2016

Google translate does have a commercial v2 API: https://cloud.google.com/translate/

Looking at an example of calling their API it doesn't look like it'd be too much work to refactor views.translate_text to call it directly rather than via goslate and replace ROSETTA_GOOGLE_TRANSLATE with GOOGLE_TRANSLATE_KEY.

Even though it's a paid-for service and the (currently) free Yandex works well, it's probably worth refactoring to support it as it might not be much more work than getting rid of the goslate code!

Although not a high priority I could do a PR for this at some point. In the meantime this issue should be sufficient to highlight that goslate is deprecated without needing to update the sphinx docs.

@dzimbeck
Copy link

So is there any change of a refactor? I used this package for a lot of things

@mbi
Copy link
Owner

mbi commented Feb 27, 2017

@dzimbeck Not much to refactor, as long as Google doesn't make their Translate API free again there is not much we can do on our end. As @nealtodd mentioned, the Yandex translate API works quite well.

@dzimbeck
Copy link

Thanks, yes i realize their API key is very generous at 10 million per month. Will do.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants