Skip to content

Temp fix for Google Translate - Bad Request (400) - #767

Open
burukan wants to merge 1 commit into
dotnet:masterfrom
burukan:master
Open

Temp fix for Google Translate - Bad Request (400)#767
burukan wants to merge 1 commit into
dotnet:masterfrom
burukan:master

Conversation

@burukan

@burukan burukan commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Save the day / temporary fix for Google Bad Request (400). This will pull text till a query limit (5k) and will require multiple presses to "Start + Apply" if some text to be translated is too long. In next revision may do Take(1) till max(10, payload limit) for enumerator and let it do its thing. However another bigger issue remains: a single source can be bigger than 5k limit and splitting it up may degrade the nmt translation context causing worse translation on Google's end. This needs some research on proper splitting.

Tested and works on my projects (albeit with multiple Starts/Applies) with longer source text. Will come back to this soon to improve the process.

…ll a query limit (5k) and will require multiple presses to "Start + Apply" if some text to be translated is too long. In next revision may do Take(1) till max(10, payload limit) for enumerator and let it do its thing. However another bigger issue remains: a single source can be bigger than 5k limit and splitting it up may degrade the nmt translation context causing worse translation on Google's end. This needs some research on proper splitting.
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

Successfully merging this pull request may close these issues.

1 participant