Skip to content

Bug Report: Bounding box shrinks when translation fails #997

@Triamas

Description

@Triamas

Version Info

BallonsTranslator version: Latest commit (db7b919)
OS: Win11
Workflow: batch-translate project via "Run translation"

Description of the Problem

Translation bounding boxes shrink when translation fails → subsequent text becomes vertically stretched.

Steps to Reproduce:

  1. Open a project and run Translate.
  2. Break the connection the the engine - either disable internet or kill the translator process.
  3. The project continues the translation process going through all pages.

-> When the first translation attempt fails, the app deletes any text already there and then reduces the bounding box width and height to almost zero.

  1. Restore the connection to the translation engine and run Translate again.

-> On the second attempt, the translator inserts the new text into the shrunken box. Because the bounding box information is lost, the text is rendered as a single narrow column of stretched letters.

Expected Behavior:
If no translated text can be inserted, the original bounding rectangle should remain unchanged (width, height,location). If the app is trying to insert a tiny bounding box in a batch operation, roll back to previous values instead. (At minimum, there should be a preference like “Never shrink bounding boxes; only expand to fit.)

Text Detector

None

OCR

None

Inpaint

None

Translator

ChatGPT

Screenshot

Image

Logs

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions