DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:deeplautotranslate

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
plugin:deeplautotranslate [2021-12-13 15:41] Aleksandrplugin:deeplautotranslate [2023-08-25 07:52] (current) – typo saggi
Line 6: Line 6:
 email      : me@netali.de  email      : me@netali.de 
 type       : Action type       : Action
-lastupdate : 2021-12-11 +lastupdate : 2023-08-24 
-compatible : Hogfather +compatible : Hogfather, Igor, Jack Jackrum 
-depends    : +depends    : translation
 conflicts  conflicts 
 similar    :  similar    : 
Line 16: Line 16:
 bugtracker : http://github.com/NetaliDev/dokuwiki-deepl-autotranslate/issues bugtracker : http://github.com/NetaliDev/dokuwiki-deepl-autotranslate/issues
 sourcerepo : http://github.com/NetaliDev/dokuwiki-deepl-autotranslate/ sourcerepo : http://github.com/NetaliDev/dokuwiki-deepl-autotranslate/
 +donationurl: https://paypal.me/NetaliDev
  
 screenshot_img :  screenshot_img : 
Line 40: Line 41:
   * ''en:start''    * ''en:start'' 
     * The english translation of the landing page     * The english translation of the landing page
 +
 +==== Operating Modes ====
  
 The plugin has two operating modes: the **direct mode** and the **editor mode**: The plugin has two operating modes: the **direct mode** and the **editor mode**:
Line 47: Line 50:
 You can configure the default operating mode in the plugin settings. You also can define a regex for page names that should always be handled in a specific mode. Additionally you can define a blacklist regex for page names that should never be auto translated. You can define expressions (words) in texts that should never be translated (abbreviations for example). You can configure the default operating mode in the plugin settings. You also can define a regex for page names that should always be handled in a specific mode. Additionally you can define a blacklist regex for page names that should never be auto translated. You can define expressions (words) in texts that should never be translated (abbreviations for example).
  
-If you want to retranslate a page, simply delete it and then it will be created again with your specified operating mode. +==== Retranslation ====
  
 +If you want to retranslate a page, simply delete it and then it will be created again with your specified operating mode. You can also use the retranslate button in the side menu if you have not disabled it (it is enabled by default).
 +
 +==== Push translations ====
 +
 +There also is a so called **push translation** feature in which you can configure languages to which you want to push your translations from the pages in the original language. If you have configured at least one language for which you want to use push translations and the retranslate button is not disabled, the button will also be displayed on the pages in the original language. When you press the button on the page in the original language, it will be translated into all the languages configured for push translations.
 +
 +==== Links and Media ====
 +
 +When a page in the original language links to pages or media that also exist in the target language, the links also point to the target in the target language. If the link target does not exist in the target language, it continues to point to the one in the original language. The corresponding link texts are also translated by DeepL.
 +
 +==== Glossaries ====
 +
 +You can use DeepL glossaries to specify a specific translation for specific words. To use this feature, set the namespace for the definitions of the glossaries (e.g. ''internal:glossaries''). When you create the start-page of the glossary definition namespace (e.g. ''internal:glossaries:start''), a template for this page is pasted to your editor. This template contains all supported glossary language pairs for your default language and links to their definition pages.
 +
 +When you create a glossary definition page (e.g. ''internal:glossaries:en_de'' for the EN -> DE glossary), a template for a glossary definition page will be pasted to your editor. You can modify the template as you want, but the important thing is: __the glossary entries will be generated from the first two table columns (body only) on this page__. So you can add more columns if you want and they won't affect the glossary definitions. Caution: the first two columns of __all__ tables on this page will be used to generate the glossary entries.
 +
 +When you remove all entries from the table or delete the definition page, the glossary will be deleted.
  
 ===== Configuration and Settings ===== ===== Configuration and Settings =====
Line 63: Line 83:
       * direct-mode       * direct-mode
       * editor-mode (default)       * editor-mode (default)
 +  * Optional: **Show translate button**
 +    * If enabled, it shows a button to force a (re)translation of pages in language namespaces
 +    * Default: enabled
 +  * Optional: **Push languages**
 +    * A space-separated list of languages (ISO codes) for which translations are created when the Translate button on the original page is pressed
 +    * The translation button is only shown on the original pages when at least one push language is given
 +  * Optional: **Glossary namespace**
 +    * A DokuWiki namespace that contains the definition of DeepL glossaries (see above)
   * Optional: **Blacklist regex**   * Optional: **Blacklist regex**
     * A regular expression which matches page names that should never be translated automatically      * A regular expression which matches page names that should never be translated automatically 
Line 71: Line 99:
   * Optional: **Ignored expressions**   * Optional: **Ignored expressions**
     * Expressions or words that shouldn't be translated. Separated by '':''. Useful for abbreviations.     * Expressions or words that shouldn't be translated. Separated by '':''. Useful for abbreviations.
 +  * Optional: **Default language is in a language namespace**
 +    * For example if your default language is German (de) and your German pages are in the ''de:'' namespace, you should enable this setting
 +    * This is usually not needed as the pages for the default language are usually not in a separate namespace
 +
 +===== Changelog =====
 +  * 2023-08-24: added support for ukrainian
 +  * 2023-02-17: excluded mailto-links from link-patching feature
 +  * 2023-02-01: prevented deepl from messing with table alignments (fix provided by the GitHub user [[https://github.com/extrasec|extrasec]] in [[https://github.com/NetaliDev/dokuwiki-deepl-autotranslate/pull/7|PR #7]])
 +  * 2023-01-31: prevented deepl from messing with nocache-instructions
 +  * 2022-09-15: prevented deepl from destroying the syntax when a whole line is formatted
 +  * 2022-09-11: added a feature to use DeepL glossaries for the translations
 +  * 2022-06-05: prevented interwiki and windows share links from being affected by patch_links and to keep the alignment of media in patch_links
 +  * 2022-06-04: prevented plugin embeds from being affected by patch_links and added perm check to when to show the push translation button
 +  * 2022-05-30: updated the link patching feature so that it always replaces relative links with absolute links after translation
 +  * 2022-05-29: prevented deepl from messing with tables and links in wikitext (outside of ''<nowiki>[[ ]]</nowiki>'')
 +  * 2022-05-25: bug fixes
 +  * 2022-05-24:
 +    * added option for default language is in a language namespace
 +    * added feature for translating link text
 +    * added feature for pointing links to already existing pages in the language namespace
 +    * fixed direct translation
 +    * fixed that DeepL breaks the DokuWiki syntax with unknown XML Tags
 +  * 2022-05-10: fixed ignore of file and code tags
 +  * 2022-05-09: added button for (re)translations and added output messages from plugin actions
 +  * 2021-12-15: added DokuWiki builtin-tags ''code'', ''file'' and ''php'' to the translation-ignore-tags to prevent the translation of the contents in those tags
 +  * 2021-12-14: changed from curl to the builtin DokuWiki HTTPClient
 +  * 2021-12-11: first version
plugin/deeplautotranslate.1639406485.txt.gz · Last modified: 2021-12-13 15:41 by Aleksandr

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki