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

βŒˆβŒ‹ βŽ‡ branch:  PageTranslate


Update of "PageTranslate"

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview

Artifact ID: d6ff6a58cfce1cf09c82289fd9bdb387c54777b3
Page Name:PageTranslate
Date: 2020-05-25 12:01:26
Original User: mario
Mimetype:text/x-markdown
Parent: e1b873ab1ffec5d48b9ffe9fc6284481149de87b (diff)
Next 757608f17b074a1975ace387f8219169efa23f82
Content

OOo/LO plugin to get whole pages translated.

  • Iterates over paragraphs / text segments / and tables (with crude formatting retained)
  • Utilizes Google translate.
  • And is therefore rather slow.
    (Writer freezes during process for long documents!)
  • Still allows for text-selection mode translation (from original extension), but does not honor status bar/paragraph language setting for now.

Test/Install

pagetranslate.oxt
(Linux-only package)

Download the package file, and import it in LibreOffice via Tools --> Extension Manager.
Or from LibreOffice extensions: https://extensions.libreoffice.org/extensions/pagetranslate (downgrade in progress / currently broken)

Usage

  • Hit the Tβ†’πŸ‡¬πŸ‡§ toolbar button to get entire document translated to English. Have some trust and patience for longer documents.
  • The second button 🏴 translates to the local/system language.
  • Or select a paragraph, to get a partial translation.
  • Alternatively pick a menu entry from Extras > PageTranslate.
  • The β†’System lang entry refers to your OpenOffice/Desktop setting.
  • Whereas β†’ Paragraph locale respects the text language as set in the Writer status bar.

Caveats

  • Does not yet support anything but Writer documents. (Structure is entirely distinct for Draw/Impress).
  • The plugin is also likely to crash (won't affect Writer) when encountering complex documents (embedded drawings, Calc sheets, OLE elements, etc). It's only been tested with flow text and text tables.
  • Generally there's a log file in /tmp.
  • Not sure if the toolbar icons work at all, or if that's a bug in the Linux version of LibreOffice.
  • For direct content.xml translations, there's a inconvenient tool in off/. (Each office document .odt/.odc is a zip file. Extract the content.xml, apply the script, then repackage the content.xml into the .odc)

ToDo

  • Might make sense to introduce a DeepL translation mode. That's perhaps faster because longer paragraphs can be translated at once. And reportedly it yields smoother/more natural translations.
  • Unfortunately not sure yet how to bundle requests.
  • Nor how to craft an options/settings page.