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
can't translate using Google #189
Comments
@Erowlin what permissions do you have in the Google developer console (https://console.developers.google.com) for the Google Translate API? I think my account required a credit card on file before it would work. |
We added a card aswell, the same API key is working for Crowdin :). (I tried with a new one also, paid too) |
Looks like it's failing when translating a key with an array value. This should be working though. |
@glebm I've similar issue
|
Could you post the key/value that's failing here? You can find it by attaching a debugger / printing where it's failing. |
I was getting this exact error as well. Initially it looks though there is an issue with nil enumerators here: # p p "#{untranslated}: #{each_translated.inspect}"
# result from above: "You agree that you will not engage in any: #<Enumerator: nil:each>"
restore_interpolations(untranslated, each_translated.next) But I traced it all the way back through the call stack and it turns out my API key was not being set properly but wasn't blank, it seems like you can recreate this by setting a bad API key on purpose as well. |
@Adsidera Set the API key |
Hi, I'm no longer using this project, so I can't help further on the issue. Should I close it? Thanks. |
@glebm the api key was already set, but as a reference I managed to solve the issue by installing easytranslate in the gemfile, I set the google API key without double quotes in the config file and I run the translate-missing command with a bundle exec. It worked like a charm for me. Thank you for this awesome gem! |
This error seems to be generated when
So it seems like when the list is too long, it just returns nil and swallows any errors. I can open a bug on EasyTranslate for this, but it sounds like I18n Tasks should be handling a use-case where EasyTranslate returns This is a helpful gem, so let me know if I can help |
@tomprats I would prefer that this See also: seejohnrun/easy_translate#35 |
I think I'm running into a similar problem. I hit the "100.000 characters per 100 seconds" limitation (which I cannot change), and this raises an exception in I forked easy_translate to just fill in empty translations in that case (which I can manually remove and rerun the task after 100 seconds to continue), but I think this should be handled more gracefully. Not sure whether this has to be done in |
It's important to run bundle exec i18n-tasks translate-missing --from=en fr You can also prepend the env variable this way GOOGLE_TRANSLATE_API_KEY=<redacted> i18n-tasks translate-missing --from=en fr |
Thank you. I didn't know why it stopped working for me. I removed the quotes from around my google API key and got it working again. |
There is a problem when I try to translate my missing keys. Please find below my command line :).
The text was updated successfully, but these errors were encountered: