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

⌈⌋ ⎇ branch:  PageTranslate


Artifact [bdcb16e33e]

Artifact bdcb16e33e90f34879b382bd16f1f9ae666e2caf:

  • File test/linebreakwise.py — part of check-in [00e5bb6299] at 2022-10-22 22:17:32 on branch trunk — compact via fixture (user: mario size: 191)

import translationbackends as tb

def run():
    t = tb.BackendUtils(lang="none")
    t.translate = lambda text: "line"
    assert t.linebreakwise("first\n\nsecond\npara") == "line\n\nline"