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

⌈⌋ branch:  PageTranslate


Artifact Content

Artifact 44bc6660415f1402d3289cfc7f83eda0e20ae92b:

  • File OptionsDialog.xdl — part of check-in [29abf22448] at 2020-06-12 04:42:49 on branch trunk — Fix to dlg:help-url=… Now context-sensitive help pops up for F1 in settings window. (For LibreOffice before 7.0 at least) (user: mario size: 4708)

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE dlg:window PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "dialog.dtd">
<dlg:window xmlns:dlg="http://openoffice.org/2000/dialog" xmlns:script="http://openoffice.org/2000/script" dlg:id="OptionsPageTranslate" dlg:help-url="vnd.sun.star.help://help/vnd.include-once.pagetranslate/config.xhp?Language=en&amp;System=UNIX&amp;UseDB=no" dlg:left="110" dlg:top="50" dlg:width="283" dlg:height="258" dlg:closeable="true" dlg:moveable="true" dlg:title="Title" dlg:withtitlebar="false">
 <dlg:bulletinboard>
  <dlg:radiogroup>
   <dlg:radio dlg:id="google" dlg:tab-index="0" dlg:left="10" dlg:top="10" dlg:width="115" dlg:height="12" dlg:help-text="Standard translation service" dlg:value="Google Translate web service" dlg:group-name="backend" dlg:checked="true"/>
   <dlg:radio dlg:id="deepl_web" dlg:tab-index="1" dlg:left="10" dlg:top="25" dlg:width="115" dlg:height="12" dlg:help-text="not yet implemented" dlg:value="DeepL web interface (slower?)" dlg:group-name="backend"/>
   <dlg:radio dlg:id="deepl_api" dlg:tab-index="2" dlg:left="10" dlg:top="40" dlg:width="95" dlg:height="19" dlg:help-text="Requires subscription and API key" dlg:value="DeepL translation API (faster&#x0a;and better formatting?)" dlg:multiline="true" dlg:group-name="backend"/>
   <dlg:radio dlg:id="microsoft" dlg:tab-index="3" dlg:left="10" dlg:top="61" dlg:width="95" dlg:height="18" dlg:help-text="Requires an OAuth secret in API key" dlg:value="Microsoft Translator API&#x0a;(via translate-python)" dlg:multiline="true" dlg:group-name="backend"/>
   <dlg:radio dlg:id="mymemory" dlg:tab-index="4" dlg:left="10" dlg:top="82" dlg:width="84" dlg:height="19" dlg:help-text="Add an email address instead of API key" dlg:value="MyMemory&#x0a;(via translate-python)" dlg:multiline="true" dlg:group-name="backend"/>
   <dlg:radio dlg:id="cli" dlg:tab-index="5" dlg:left="10" dlg:top="105" dlg:width="83" dlg:height="18" dlg:help-text="For instace `translate-cli -t en {}`" dlg:value="command line tool&#x0a;(CLI program)" dlg:multiline="true" dlg:group-name="backend"/>
  </dlg:radiogroup>
  <dlg:textfield dlg:id="api_key" dlg:tab-index="6" dlg:left="115" dlg:top="53" dlg:width="93" dlg:height="12" dlg:help-text="Key required for DeepL, Microsoft Translator, or Google Translate API (not implemented here)"/>
  <dlg:titledbox dlg:id="FrameControl1" dlg:tab-index="7" dlg:disabled="true" dlg:left="110" dlg:top="39" dlg:width="105" dlg:height="36" dlg:help-text="requires an API key / else will use *SLOWER* web page requests">
   <dlg:title dlg:value="API key / OAuth secret"/>
  </dlg:titledbox>
  <dlg:checkbox dlg:id="frames" dlg:tab-index="8" dlg:left="10" dlg:top="149" dlg:width="184" dlg:height="12" dlg:help-text="Traverse subdocuments (frames / floating frames) as well" dlg:value="also iterate over TextFrames" dlg:checked="false"/>
  <dlg:checkbox dlg:id="quick" dlg:tab-index="9" dlg:left="10" dlg:top="132" dlg:width="185" dlg:height="12" dlg:help-text="Temporary placeholders instead of iterating over newline breaks. (Only tested with Google Translate. Might screw up others.)" dlg:value="quick paragraph linebreak handling" dlg:checked="false"/>
  <dlg:checkbox dlg:id="debug" dlg:tab-index="10" dlg:left="10" dlg:top="182" dlg:width="182" dlg:height="12" dlg:help-text="Log file in /tmp/pagetranslate-libreoffice.txt" dlg:value="additonal debugging" dlg:checked="true"/>
  <dlg:titledbox dlg:id="FrameControl2" dlg:tab-index="12" dlg:disabled="true" dlg:left="100" dlg:top="76" dlg:width="105" dlg:height="25" dlg:help-text="requires an API key / else will use *SLOWER* web page requests">
   <dlg:title dlg:value="Email address"/>
  </dlg:titledbox>
  <dlg:titledbox dlg:id="FrameControl3" dlg:tab-index="14" dlg:disabled="true" dlg:left="100" dlg:top="100" dlg:width="105" dlg:height="25" dlg:help-text="requires an API key / else will use *SLOWER* web page requests">
   <dlg:title dlg:value="Command"/>
  </dlg:titledbox>
  <dlg:textfield dlg:id="cmd" dlg:tab-index="13" dlg:left="106" dlg:top="109" dlg:width="93" dlg:height="12" dlg:help-text="Command to run, use `{}` as placeholder for text section"/>
  <dlg:textfield dlg:id="email" dlg:tab-index="11" dlg:left="105" dlg:top="85" dlg:width="93" dlg:height="12" dlg:help-text="MyMemory asks for an email addres (does not require it)"/>
  <dlg:checkbox dlg:id="slow" dlg:tab-index="15" dlg:left="11" dlg:top="165" dlg:width="183" dlg:height="12" dlg:help-text="Split sentences on formatting prior translation (= more roundtrips, less cohesive sentence structure / translation)" dlg:value="super slow mode (retain more inline-paragraph formatting)" dlg:checked="false"/>
 </dlg:bulletinboard>
</dlg:window>