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

⌈⌋ ⎇ branch:  PageTranslate


Artifact [c185a84c47]

Artifact c185a84c47e32071a0bae5156623cd7ae025a549:

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

import translationbackends as tb

def web(params):
    t = tb.GoogleWeb(**params)
    assert t.translate("kuchen") == "cake"

def ajax(params):
    t = tb.GoogleAjax(**params)
    assert t.translate("kartoffel") == "potato"