Skip to content

fix(lang): translate oversized HTML in chunks (#2303)#2790

Open
Tarekchehahde wants to merge 1 commit into
IFRCGo:developfrom
Tarekchehahde:fix/issue-2303-translation-html-chunks
Open

fix(lang): translate oversized HTML in chunks (#2303)#2790
Tarekchehahde wants to merge 1 commit into
IFRCGo:developfrom
Tarekchehahde:fix/issue-2303-translation-html-chunks

Conversation

@Tarekchehahde

Copy link
Copy Markdown

Summary

  • Recursively translate HTML/text beyond AZURE_TRANSL_LIMIT (~50k) instead of appending an untranslated tail
  • Return None and log text_length on IFRC/Amazon API errors (field-level skip)
  • Addresses @szabozoltan69's note on translation API character limits

Note

Includes the error-handling approach from #2784; if both are open, this PR can supersede #2784.

Test plan

  • Unit tests: API 500 → None, multi-chunk HTML calls API twice
  • IFRC staging: oversized HTML table field translates fully

Related to #2303

Made with Cursor

Recursively translate text beyond AZURE_TRANSL_LIMIT instead of appending
untranslated tails; log text_length on API errors and return None per field.

Co-authored-by: Cursor <cursoragent@cursor.com>
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