[EXCONTRANS-333] Too many text segments Created: 13/Mar/20  Updated: 24/Mar/22  Resolved: 20/Mar/20

Status: Resolved
Project: Content Translation Extended (CTX)
Component/s: Google Translator
Affects Version/s: 3.0.2
Fix Version/s: 3.0.3

Type: Bug Priority: Neutral
Reporter: Richard Gange Assignee: Teresa Miyar
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: 0.25d
Time Spent: 2.5d
Original Estimate: Not Specified

Issue Links:
Cloners
is cloned by EXCONTRANS-334 Too many text segments version 2.9 Resolved
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled
Date of First Response:

 Description   

In case of submitting many contents (such as the whole /travel page includes dependences), an error will be thrown as below. This is known issue as number of submitted segments is over google's threshold.

you can send up to 128 segments. There are also limitations on the number of overall characters, but that is well documented on failure.

Request payload size exceeds the limit: 204800 bytes.

I have requested that the error for too many segments informs you of how many segments are allowed.

https://github.com/googleapis/google-cloud-python/issues/5425



 Comments   
Comment by Richard Gange [ 13/Mar/20 ]

Maybe there is a way we can calculate the size of the data batch and warn the user of the threshold?

Comment by Teresa Miyar [ 19/Mar/20 ]

Google translate does not allow blocks of more than 128 segments, that means we need to break the translation into smaller blocks (default travel demo has around 152), the other thing is when an error occurs, the error gets ignored and the batch is processed as translated.
Once the fix is in, we will maybe observe the error: 403 Daily Limit Exceeded means you might have an old account or your quota in google translate is too low. Check https://cloud.google.com/translate/quotas#request_quotas

Comment by Richard Gange [ 19/Mar/20 ]

When you say "default travel demo" you are talking about the entire site, correct?

Comment by Teresa Miyar [ 20/Mar/20 ]

Indeed, the travel demo including sub nodes, it creates 252-256 segments.

Generated at Mon Feb 12 00:30:12 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.