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

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

remove configfile stub
mario authored 0 days ago last checkin 6d343a41c
πŸ“‚ META-INF Add dialog option for python-translate (deepl_web might be too difficβ€Ήβ€Ί 2 days ago
πŸ“‚ icons resized, lighter blue tonesβ€Ήβ€Ί 17 days ago
πŸ“‚ off Reenable cursor/selection mode (Tradutor trigger). Prepare binding toβ€Ήβ€Ί 22 days ago
πŸ“‚ pkg-desc move license text to pkg-desc/β€Ήβ€Ί 3 days ago
πŸ“‚ pythonpath Add cli(), translate_python() providers, basic deepl_api(), and non-wβ€Ήβ€Ί 1 days ago
πŸ“„ Addons.xcu Introduce pt_opts handler for settings windowβ€Ήβ€Ί 2 days ago
πŸ“„ Makefile Introduce pt_opts handler for settings windowβ€Ήβ€Ί 2 days ago
πŸ“„ OptionsDialog.xcu Remove some logging, fix setLevel on debug mode. Move config dialog iβ€Ήβ€Ί 0 days ago
πŸ“„ OptionsDialog.xdl Remove some logging, fix setLevel on debug mode. Move config dialog iβ€Ήβ€Ί 0 days ago
πŸ“„ OptionsSchema.xcs Remove some logging, fix setLevel on debug mode. Move config dialog iβ€Ήβ€Ί 0 days ago
πŸ“„ description.xml Remove some logging, fix setLevel on debug mode. Move config dialog iβ€Ήβ€Ί 0 days ago
πŸ“„ pagetranslate.py Remove some logging, fix setLevel on debug mode. Move config dialog iβ€Ήβ€Ί 0 days ago

PageTranslate

OpenOffice/LibreOffice extension that translationes whole pages.

  • Iterates over paragraphs / text segments / and tables (with crude formatting retained)
  • Utilizes Google translate (or DeepL, Microsoft Translate, MyMemory).
  • 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.
  • Configure options in Toolsβ†’Optionsβ†’Language Settingsβ†’PageTranslate

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.