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

⌈⌋ ⎇ branch:  PageTranslate


Artifact [850bfa746b]

Artifact 850bfa746b1a932151f443adae3889bf0fb46582:

  • File help/en/vnd.include-once.pagetranslate/errors.xhp — part of check-in [148f8a2956] at 2022-10-13 08:59:56 on branch trunk — note new option and potential exception (user: mario size: 11854)

<?xml version="1.0" encoding="UTF-8"?>
<helpdocument version="1.0">
   <meta>
      <topic id="topic_d1e1" indexer="include" status="PUBLISH">
         <title xml-lang="en" id="title_d1e1">Errors</title>
         <filename>/help/vnd.include-once.pagetranslate/errors.xhp</filename>
      </topic>
      <history>
         <created date="2020-02-02T22:22:22"/>
         <lastedited date="2022-10-13T10:58:38.264+02:00"/>
      </history>
   </meta>
   <body>
      <link href="vnd.include-once.pagetranslate/index.xhp"/>
      <paragraph id="hd_d1e8" role="heading" level="1" xml-lang="en">Errors</paragraph>
      <paragraph id="par_d1e11" role="paragraph" xml-lang="en">Error messages will largely show up as long-winded popups with Python
 exceptions. Where the text usually starts with "Traceback" and then
 quite a few iterations of code locations, but the most relevant details
 near the end.</paragraph>
      <paragraph id="par_d1e14" role="paragraph" xml-lang="en">Known errors:</paragraph>
      <paragraph id="sect_d1e17" role="section" xml-lang="en">
         <paragraph id="hd_d1e19" role="heading" level="2" xml-lang="en">ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED]</paragraph>
         <paragraph id="par_d1e22" role="paragraph" xml-lang="en">This indicates a broken Python 3.x installation in LibreOffice development
  releases.</paragraph>
         <paragraph id="par_d1e25" role="paragraph" xml-lang="en">You can't easily fix this other than installing a full or older release from
  the //extensions.libreoffice.org/ site.  (Respectively the OpenOffice one.)</paragraph>
      </paragraph>
      <paragraph id="sect_d1e30" role="section" xml-lang="en">
         <paragraph id="hd_d1e32" role="heading" level="2" xml-lang="en">Placeholder text/error messages instead of translated text</paragraph>
         <paragraph id="par_d1e35" role="paragraph" xml-lang="en">The translate-python (MyMemory or Microsoft Translator) services or the CLI
  option are bound to yield some error messages in place of translated text.
  Hard to predict what those might be, and you'll have to look at configuring
  these extensions separately (e.g. via  ~/.python-translate.cfg)</paragraph>
      </paragraph>
      <paragraph id="sect_d1e39" role="section" xml-lang="en">
         <paragraph id="hd_d1e41" role="heading" level="2" xml-lang="en">No error / Nothing happens</paragraph>
         <paragraph id="par_d1e44" role="paragraph" xml-lang="en">Take a look into the log file in /tmp/pagetranslate-libreoffice.txt (or
  C:\TEMP\ probably on Windows).  Be sure to have the ☑ debug mode option
  enabled beforehand.</paragraph>
         <paragraph id="par_d1e47" role="paragraph" xml-lang="en">This will contain some indicators as to what went wrong.  That's bound to be
  a programming problem in the extension/python script.  So would require you
  to contact the author (with as much detail as feasible; including the log
  and a sample document perhaps.)</paragraph>
      </paragraph>
      <paragraph id="sect_d1e51" role="section" xml-lang="en">
         <paragraph id="hd_d1e53" role="heading" level="2" xml-lang="en">Only first sentence/paragraph translated</paragraph>
         <paragraph id="par_d1e56" role="paragraph" xml-lang="en">Might be caused by invisible objects, or some other text object traversal
  error. Again, needs debugging output.</paragraph>
         <paragraph id="par_d1e59" role="paragraph" xml-lang="en">If using the "paragraph locale" mode, then the langauge might simply
  mismatch between text snippets.</paragraph>
      </paragraph>
      <paragraph id="sect_d1e63" role="section" xml-lang="en">
         <paragraph id="hd_d1e65" role="heading" level="2" xml-lang="en">AttributeError: 'NoneType' object has no attribute 'getElementNames' / DEBUG:root:callHandlerMethod</paragraph>
         <paragraph id="par_d1e68" role="paragraph" xml-lang="en">Might be an entry in the log file, and settings won't get saved/applied
  in the options dialog. If so, the LO options registry couldn't be found.
  You might have luck with reinstalling the extension (which reapplies the
  XCS). Otherwise it's a programming error.</paragraph>
      </paragraph>
      <paragraph id="sect_d1e72" role="section" xml-lang="en">
         <paragraph id="hd_d1e74" role="heading" level="2" xml-lang="en">AttributeError: 'SxSWhatever' object has no attribute 'getString'</paragraph>
         <paragraph id="par_d1e77" role="paragraph" xml-lang="en">Or something alike might indicate that the document has complex/unknown
  elements embedded, which the traversion method trips over. (Some such
  objects might identify themselves as TextContent-capable, but aren't.)</paragraph>
         <paragraph id="par_d1e80" role="paragraph" xml-lang="en">Somewhat speculative error. And anyway, you would have to send in a
  sample document and the log to the extension author to get this fixed.
  Else, use selection/paragraph-wise translation for the time being.</paragraph>
      </paragraph>
      <paragraph id="sect_d1e84" role="section" xml-lang="en">
         <paragraph id="hd_d1e86" role="heading" level="2" xml-lang="en">uno.RuntimeException/AttributeError: ... object has no attribute 'getTypes'</paragraph>
         <paragraph id="par_d1e89" role="paragraph" xml-lang="en">Such errors are often resulting from one of the translation backends
  not returning a proper text string / translation. Please fill a bug report
  with your log, and use a different service for the time being.</paragraph>
      </paragraph>
      <paragraph id="sect_d1e94" role="section" xml-lang="en">
         <paragraph id="hd_d1e96" role="heading" level="2" xml-lang="en">AttributeError: 'LangSelection' object has no attribute 'to'</paragraph>
         <paragraph id="par_d1e99" role="paragraph" xml-lang="en">That's the shallow error message when the From→To language selection
  was canceled by closing the dialog.</paragraph>
      </paragraph>
      <paragraph id="sect_d1e103" role="section" xml-lang="en">
         <paragraph id="hd_d1e105" role="heading" level="2" xml-lang="en">Options dialog is empty</paragraph>
         <paragraph id="par_d1e108" role="paragraph" xml-lang="en">This might be a development bug only. If the log shows nothing but the __init__
  call, the extension usually requires removal and reinstall (per CLI *and*
  GUI extension manager perhaps). Presumably there's some old schema version
  in the OO registry, which prevents updated versions from taking effect.</paragraph>
      </paragraph>
      <paragraph id="sect_d1e112" role="section" xml-lang="en">
         <paragraph id="hd_d1e114" role="heading" level="2" xml-lang="en">WARNING:root:NO TRANSLATION RESULT EXTRACTED</paragraph>
         <paragraph id="par_d1e117" role="paragraph" xml-lang="en">If this messsage shows up in the log, the google translate backend
  (`pythonpath/translationbackends.py`) requires updating. Specifically the
  regex in `rx_gtrans` for extracting the target string.</paragraph>
      </paragraph>
      <paragraph id="sect_d1e121" role="section" xml-lang="en">
         <paragraph id="hd_d1e123" role="heading" level="2" xml-lang="en">MyMemory: PLEASE SELECT TWO DISTINCT LANGUAGES</paragraph>
         <paragraph id="par_d1e126" role="paragraph" xml-lang="en">The langauge detection failed. You'll probably have to use the
  Tools→PageTranslate→From➜To dialog to specify both input and target
  language.</paragraph>
      </paragraph>
      <paragraph id="sect_d1e130" role="section" xml-lang="en">
         <paragraph id="hd_d1e132" role="heading" level="2" xml-lang="en">MyMemory: INVALID EMAIL PROVIDED</paragraph>
         <paragraph id="par_d1e135" role="paragraph" xml-lang="en">Add an email address (Tools→Options→Language→PageTranslate) for MyMemory.</paragraph>
      </paragraph>
      <paragraph id="sect_d1e139" role="section" xml-lang="en">
         <paragraph id="hd_d1e141" role="heading" level="2" xml-lang="en">MyMemory: 'AUTO' IS AN INVALID SOURCE LANGUAGE.</paragraph>
         <paragraph id="par_d1e144" role="paragraph" xml-lang="en">This error shouldn't really happen anymore, as the default fallback
  for MyMemory is 'en' and not 'auto'.</paragraph>
      </paragraph>
      <paragraph id="sect_d1e149" role="section" xml-lang="en">
         <paragraph id="hd_d1e151" role="heading" level="2" xml-lang="en">ImportError: No module named deep_translator</paragraph>
         <paragraph id="par_d1e154" role="paragraph" xml-lang="en">You'll have to install this Python package first, before using
  some of the translation backends: `pip install deep-translator`.
  Or use a larger OXT with bundled extensions.</paragraph>
      </paragraph>
      <paragraph id="sect_d1e158" role="section" xml-lang="en">
         <paragraph id="hd_d1e160" role="heading" level="2" xml-lang="en">ImportError: No module named argostranslate</paragraph>
         <paragraph id="par_d1e163" role="paragraph" xml-lang="en">The ArgosTranslate backend requires installing the according Python
  package.</paragraph>
      </paragraph>
      <paragraph id="sect_d1e167" role="section" xml-lang="en">
         <paragraph id="hd_d1e169" role="heading" level="2" xml-lang="en">IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE! / Original error was: No module named 'numpy.core._multiarray_umath'</paragraph>
         <paragraph id="par_d1e172" role="paragraph" xml-lang="en">This is a problem of the OpenNMT backend. It can't be used with the
  LibreOffice-bundled Python. It's not compatible with the numpy binary
  extension. This backend only works with a distro-supplied Office, which
  ties to the system-installed Python. // Alternatively use the CLI tool
  with "command line tool" as backend.</paragraph>
      </paragraph>
      <paragraph id="sect_d1e176" role="section" xml-lang="en">
         <paragraph id="hd_d1e178" role="heading" level="2" xml-lang="en">CannotConvertException: value does not implement com.sun.star.text.XTextContent</paragraph>
         <paragraph id="par_d1e181" role="paragraph" xml-lang="en">That error came up for the annotation/comment option (preserving
  untranslated text). Should not occur with the current implementation.
  But if, it might be a symptom of complex documents. And disabling
  the annotate option might suffice to get rid of it.</paragraph>
      </paragraph>
      <paragraph id="sect_d1e185" role="section" xml-lang="en">
         <paragraph id="hd_d1e187" role="heading" level="2" xml-lang="en">How to report a bug</paragraph>
         <paragraph id="par_d1e190" role="paragraph" xml-lang="en">The project repository https://fossil.include-once.org/pagetranslate/
  allows to file a bug report (no registration necessary).</paragraph>
         <list id="list_d1e193" xml-lang="en">
            <listitem id="item_d1e195" xml-lang="en">
               <paragraph id="par_d1e197" role="paragraph" xml-lang="en">The log file MUST be included,</paragraph>
            </listitem>
            <listitem id="item_d1e201" xml-lang="en">
               <paragraph id="par_d1e203" role="paragraph" xml-lang="en">together with a sample document (as link),</paragraph>
            </listitem>
            <listitem id="item_d1e207" xml-lang="en">
               <paragraph id="par_d1e209" role="paragraph" xml-lang="en">as well as the OpenOffice version (Help → About → Copy)</paragraph>
            </listitem>
            <listitem id="item_d1e213" xml-lang="en">
               <paragraph id="par_d1e215" role="paragraph" xml-lang="en">latest or development version has been tested.</paragraph>
            </listitem>
         </list>
         <paragraph id="par_d1e220" role="paragraph" xml-lang="en">Insufficient submissions are unlikely to spark developer interest.</paragraph>
      </paragraph>
   </body>
</helpdocument>