Languages tab > Translate not working + no log

More
6 years 1 week ago #3346 by GFX47
Hi,

I'm having some troubles with the "Translate" feature in the "Languages" tab: on certain languages, it indicates "Translating (123)..." in the source window but stops very soon, actually not translating anything.
When I hit the same button again, it still tries to translate the same amount of terms.
Also I'm not getting any error in the console.

I'm using I2Localization v2.8.9 f1 with Unity 2017.4.3f1.

Please Log in or Create an account to join the conversation.

More
6 years 1 week ago #3352 by benroberts
Same issue, seems random when it happens, seems to be specifically related to the translate all functionality as translating each term individually works.

Please Log in or Create an account to join the conversation.

More
6 years 1 week ago #3358 by GFX47
Any thoughts on this issue?
Could the languages file help debugging it?

Please Log in or Create an account to join the conversation.

More
6 years 1 week ago #3360 by benroberts
I got frustrated with this being so flaky so debugged it ... the issue for me at least is that Google is returning this error:

<!DOCTYPE html><html><head><link rel="shortcut icon" href="//ssl.gstatic.com/docs/script/images/favicon.ico"><title>Error</title><style type="text/css">body {background-color: #fff; margin: 0; padding: 0;}.errorMessage {font-family: Arial,sans-serif; font-size: 12pt; font-weight: bold; line-height: 150%; padding-top: 25px;}</style></head><body style="margin:20px"><div><img alt="Google Apps Script" src="//ssl.gstatic.com/docs/script/images/logo.png"></div><div style="text-align:center;font-family:monospace;margin:50px auto 0;max-width:600px">Service invoked too many times in a short time: translate. Try Utilities.sleep(1000) between calls. (line 45, file &quot;Translate&quot;)</div></body></html>


The I2Loc ParseTranslationResult() method includes this code:
if (html.Contains("Service invoked too many times in a short time"))
                    return ""; // ignore and try again

So the error message gets hidden from the user, and that 'and try again' is a lie, maybe at some point the idea was to build retry logic but there isn't any in the codebase currently. Just fails without error.

Please Log in or Create an account to join the conversation.

More
6 years 1 week ago #3362 by benroberts
Tried further debugging to work out why single translation queries were working still but bulk ones weren't ... and came up with nothing. The multi-term translations do get sent as a single API request, my best guess is that Google has a bug on their side that's causing multi-term translation queries to incorrectly trigger the 'too many times in a short time' message.

Please Log in or Create an account to join the conversation.

More
6 years 1 week ago #3363 by GFX47
Thanks for the tip, that's indeed an API timeout problem: "Service invoked too many times for one day: translate.".
In the meantime I'll do the auto-translate on the google spreadsheet using this kind of command: GoogleTranslate($B2, "en","fr").

Please Log in or Create an account to join the conversation.

Time to create page: 0.130 seconds
Template by JoomlaShine