From 3b17cbfdd6d262012451c44562b8bcebe2811b7a Mon Sep 17 00:00:00 2001 From: mhofmann Date: Fri, 12 Jul 2024 20:14:22 +0200 Subject: [PATCH] [DOCUMENTATION] Update documentation to latest --- .ddev/config.yaml | 1 - .../Administration/Configuration/Index.rst | 42 ++++++++++++++++++- .../Administration/Updates/Index.rst | 16 ++++++- Documentation/Faq/Index.rst | 21 +++++++++- Documentation/Files/versionSupport.csv | 5 ++- .../Reference/TableConfiguration/Index.rst | 7 +++- 6 files changed, 84 insertions(+), 8 deletions(-) diff --git a/.ddev/config.yaml b/.ddev/config.yaml index 127940ce..7e2e9d8c 100644 --- a/.ddev/config.yaml +++ b/.ddev/config.yaml @@ -21,7 +21,6 @@ web_environment: - typo3DatabasePassword=root - typo3DatabaseUsername=root nodejs_version: "16" -DEEPL_API_KEY: "" # Key features of DDEV's config.yaml: diff --git a/Documentation/Administration/Configuration/Index.rst b/Documentation/Administration/Configuration/Index.rst index 1798f303..b8475c13 100644 --- a/Documentation/Administration/Configuration/Index.rst +++ b/Documentation/Administration/Configuration/Index.rst @@ -5,10 +5,43 @@ Configuration ============= +Set up API and formality +------------------------ + +.. attention:: + Before using the DeepL API, you need to get an API key from your `DeepL Profile`_. + +Go to :guilabel:`Admin Tools > Settings > Extension Configuration`. + +Open the settings for :guilabel:`wv_deepltranslate` and add your API key. + +The extension is set up to auto-detect the corresponding DeepL API URL. + +.. _sitesetup: +Set up translation language +--------------------------- + +#. Go to :guilabel:`Site Management > Sites` and edit your site configuration +#. Switch to tab `Languages` and open your target +#. Go to :guilabel:`DeepL Settings` and set up your `Target Language (ISO Code)` +#. Save + +.. note:: + Although the dropdown can also be set in the standard language, it makes no sense + to define a target language for the source language. + +Configure tables +---------------- + +If not default set, you need to define the `l10n_mode` for the fields you want to +have translatable by `wv_deepltranslate`. + +See the :ref:`tableConfiguration` for details. + Detecting target language ------------------------- -From TYPO3 11.5 LTS on the detection of the target language works as following: +The following chain tries to detect the language to translate into: #. Set up DeepL Translation language in SiteConfiguration * Target languages detected from DeepL will only appear @@ -16,8 +49,13 @@ From TYPO3 11.5 LTS on the detection of the target language works as following: * Needed for detecting EN-GB, EN-US, PT-PT or PT-BR #. Fallback to Language ISO code +For currently allowed languages see the `DeepL conform language key`_. As this +extension retrieves available languages from the API, translations are restricted +to the languages listed in the official DeepL API documentation. + If none of these match against DeepL API, translation for this language is disabled for usage within DeepL. Translation buttons and dropdowns respect this setting. -.. _DeepL conform language key: https://www.deepl.com/de/docs-api/general/get-languages/ +.. _DeepL conform language key: https://developers.deepl.com/docs/api-reference/languages +.. _DeepL Profile: https://www.deepl.com/en/your-account/keys diff --git a/Documentation/Administration/Updates/Index.rst b/Documentation/Administration/Updates/Index.rst index 28d3a6cc..3bfaca3e 100644 --- a/Documentation/Administration/Updates/Index.rst +++ b/Documentation/Administration/Updates/Index.rst @@ -2,11 +2,25 @@ .. _updates: +======= Updates ======= +Version 3.x > 4.x +================= + +If you are upgrading from 3.x on TYPO3 11 LTS to 12 LTS and you used site config +setup of translations, you simply can update. + +Upgrade with Core Upgrade +------------------------- + +If you upgrade fom TYPO3 below v11 you have to define the target languages in +the site configuration. See the :ref:`sitesetup` in this +documentation. + Version 2.x > 3.x ------------------ +================= .. note:: This Upgrade is only needed, if you are using glossary functionality. diff --git a/Documentation/Faq/Index.rst b/Documentation/Faq/Index.rst index b5e0bcd2..bcb6f835 100644 --- a/Documentation/Faq/Index.rst +++ b/Documentation/Faq/Index.rst @@ -5,8 +5,27 @@ FAQ === +My dropdown in the site configuration is empty +---------------------------------------------- + +This happens, if TYPO3 cached the request from DeepL API for allowed languages +but no API key was provided. In this case, clear your system cache in TYPO3. +Normally no cache files should be created, when no API key is provided. + +If this step does take no effect, delete the cached files manually. The location +is the following: + +* composer based installation + `var/cache/data/wvdeepltranslate` +* legacy installation + `typo3temp/var/cache/data/wvdeepltranslate` + +After deleting the files in this directory and going to Site configuration, the +extension loads the cache again and the dropdown should have all translatable +language keys. + What will be the cost for DeepL API subscription? ----------------------------------------------------------------- +------------------------------------------------- You can find all the details regarding DeepL API usage here: diff --git a/Documentation/Files/versionSupport.csv b/Documentation/Files/versionSupport.csv index 11277a83..df6839d3 100644 --- a/Documentation/Files/versionSupport.csv +++ b/Documentation/Files/versionSupport.csv @@ -1,2 +1,3 @@ -2.3,9-11,>=7.4 -3.0,9-11,>=7.4 +"2.3","9-11",">=7.4" +"3.0","9-11",">=7.4" +"4.0-4.x","11-12","7.4, 8.0, 8.1, 8.2" diff --git a/Documentation/Reference/TableConfiguration/Index.rst b/Documentation/Reference/TableConfiguration/Index.rst index 8b33f588..2c289267 100644 --- a/Documentation/Reference/TableConfiguration/Index.rst +++ b/Documentation/Reference/TableConfiguration/Index.rst @@ -10,6 +10,11 @@ Table Configuration understands fields which need to be translated, only if their ``l10n_mode`` is set to ``prefixLangTitle``. +.. attention:: + `wv_deepltranslate` only translates fields defined as TCA type `input` or `text`. + Other fields can currently not automatically translated due to limitations + in the DataHandler. + For detecting translatable fields, *wv_deepltranslate* uses a DataHandler hook. The following setup is needed, to get *wv_deepltranslate* work on your table: @@ -18,4 +23,4 @@ The following setup is needed, to get *wv_deepltranslate* work on your table: :caption: /Configuration/TCA/Overrides/.php $GLOBALS['TCA']['']['columns']['']['l10n_mode'] = 'prefixLangTitle'; - $GLOBALS['TCA']['']['columns']['']['l10n_mode'] = 'prefixLangTitle'; + $GLOBALS['TCA']['']['columns']['']['l10n_mode'] = 'prefixLangTitle';