LibreOffice plugin to pipe whole Writer documents through Google Translate, that ought to keep most of the page formatting.

⌈⌋ branch:  PageTranslate

View Ticket

Ticket Hash: 57bc2f65f7cc36b8191beda2820e7a060ae18ad4
Title: Only a message to prevent delete images
Status: Review Type: Incident
Severity: Important Priority: High
Subsystem: Resolution: Open
Last Modified: 2022-11-15 12:46:56
Version Found In: 1.7
User Comments:
anonymous added on 2022-11-09 08:22:57:

I've tried your PageTranslate extension, and I find it very useful, especially because it preserves formatting and uses different translation engines. An excellent job.

I know it's in beta and intended for text, but I've found a feature that I think should be fixed.

When I use the extension for complex documents, with images (in frames and with caption, in a paragraph, with Figure style) and some comments and I click the translate button, the extension deletes the frames and comments.

(I understand that it is very complicated to program the extension to work with styles and that there are many options for working with styles, and that I can select only the part of the text that I want to translate.)

My proposal is that you use a message that warns that the program can delete images etc. and the user can have the option to continue, keeping only the text or to cancel, so that he can translate in parts, keeping the images and the rest of the elements in the document.

Thank you very much for your hard work.


mario added on 2022-11-15 12:46:56:

Thanks for the bug report! I wasn't aware that images are endangered, mostly because I only tested it with basic documents. That's clearly a bug, and should be remedied.

Though testing it with the recent version 2.1 might be worth a shot, if it was really 1.7 tested. The recent addititions avert some of the inadvertent modifications, such as stripping comments. Notably the [x] slow mode might be a requisite here. (Perhaps should become default.)

The main problem here is detecting such inline elements to begin with (documents really are a stream of object types from the plugins view). Adding a warning would also require some awareness. And if it's known where it coccurs, the warning becomes redundant, since it could be just as easy to skip around.

In this case, I'm not sure it's the Frames per se, or any styles (get serialized per segment mostly). But the captioned image might have some convoluted inline element representing it. But I would kinda need a sample document to check it. (Regular images wrapped in frames seem to do fine.)