Skip to content

Add Portuguese UI and improve PDF translation robustness#52

Open
jacksonbarreto wants to merge 4 commits into
CBIhalsen:mainfrom
jacksonbarreto:fix/pt-ui-and-pdf-translation-hardening
Open

Add Portuguese UI and improve PDF translation robustness#52
jacksonbarreto wants to merge 4 commits into
CBIhalsen:mainfrom
jacksonbarreto:fix/pt-ui-and-pdf-translation-hardening

Conversation

@jacksonbarreto

Copy link
Copy Markdown

Summary

This PR adds Portuguese UI support and improves PDF translation robustness.

Changes included:

  • Add Portuguese translations to the UI.
  • Add Portuguese to the interface language selector.
  • Set default translation direction to English → Portuguese.
  • Translate fallback author labels to Portuguese.
  • Add retries and fallback behavior for third-party translation APIs, avoiding blank PDF blocks when transient API errors occur.
  • Normalize common PDF ligatures before translation.
  • Prevent oversized decorative text, such as mastheads, logos, and drop caps, from being merged with normal text.
  • Preserve oversized decorative blocks during PDF redrawing to reduce layout destruction.

Notes

The changes were tested locally with text-based academic PDFs and OpenAI-compatible third-party translation endpoints.

The retry fallback returns the original text if translation fails after retries, avoiding empty inserted blocks.

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