BallonsTranslator icon indicating copy to clipboard operation
BallonsTranslator copied to clipboard

Bug Report: Bounding box shrinks when translation fails

Open Triamas opened this issue 5 months ago • 1 comments

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

Triamas avatar Aug 19 '25 16:08 Triamas

Can't reproduce, can you share OCR & Text detector settings?

dmMaze avatar Aug 20 '25 09:08 dmMaze