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

⌈⌋ branch:  PageTranslate


Artifact [bb9e36ddb8]

Artifact bb9e36ddb8ecb90e3c6bf64242997c5c15251531:

Wiki page [options] by mario 2020-06-07 13:38:38.
D 2020-06-07T13:38:38.164
L options
N text/x-markdown
P 41c489ea55301436dc9d4842c3e8862619a41252
U mario
W 1750
The settings page allows to define a few operation parameters.

### Primarily which service to use:

❎ **Google Translate** is the default

❏ **DeepL web** interface (kinda works, but only allows a few short paragraphs to be translated / then blocks further requests / "http error 429")

❏ **DeepL per API** (as of yet untested)

<div style="padding-left: 20pt">
 <b>API key</b> (also for Microsoft Translator)<br>
 <input type=text size=24>
</div>

❏ **Microsoft Translator** (requires an authorization key, and a `pip install translate` system package)

❏ **MyMemory** (should have an email address in the "API key" field, also requires `pip install translate`)

<div style="padding-left: 20pt">
 <b>Email</b> (optional, but recommended)<br>
 <input type=text size=24 value=you@example.com>
</div>

❏ **Command line tool** allows to send each text paragraph to a local application. To use it, set the command in the "API key" field again. For example:

<div style="padding-left: 20pt">
 <b>Command</b><br>
 <input type=text size=24 value="translate-cli -o -t {lang} {text}">
  <br><br>
   Where `{text}` is a placeholder for the current text section. (Automatically escaped.)
</div>

### Additional options:

❏ **quick linebreak handling** might speed up table processing with Google Translate, as it avoids sending each newline-split sentence separately.

❏ **super slsow mode** iterates over paragraph segments, to keep more inline formatting - but seriously harms mid-sentence translations. Not very useful in practice.

❏ **also iterate over TextFrames** handles floating textframes / subdocuments.

❎ **debug mode** will fill up the /tmp/pagetranslate-libreoffice.txt file quicker

Z c28087858967a25c194b3bb44c41b217