[!!!][TASK] Remove the explicitConfirmationOfTranslation setting 54/56754/9
authorRens Admiraal <rens@simplyadmire.com>
Fri, 20 Apr 2018 12:45:18 +0000 (14:45 +0200)
committerAndreas Fernandez <a.fernandez@scripting-base.de>
Sat, 21 Apr 2018 12:36:26 +0000 (14:36 +0200)
This feature is unused, and the used buttons are being removed
in the "unsplit the split button" concept. This change removes
the buttons and installation tool setting.

Resolves: #84810
Releases: master
Change-Id: I0fa1f57df7e276b2d44f47c708cee78f08a43d81
Reviewed-on: https://review.typo3.org/56754
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Mathias Schreiber <mathias.schreiber@typo3.com>
Tested-by: Mathias Schreiber <mathias.schreiber@typo3.com>
Reviewed-by: Andreas Fernandez <a.fernandez@scripting-base.de>
Tested-by: Andreas Fernandez <a.fernandez@scripting-base.de>
typo3/sysext/backend/Classes/Controller/EditDocumentController.php
typo3/sysext/core/Classes/DataHandling/DataHandler.php
typo3/sysext/core/Configuration/DefaultConfiguration.php
typo3/sysext/core/Configuration/DefaultConfigurationDescription.yaml
typo3/sysext/core/Documentation/Changelog/master/Breaking-84810-RemoveExplicitConfirmationOfTranslation.rst [new file with mode: 0644]
typo3/sysext/core/Tests/Functional/Fixtures/Frontend/AdditionalConfiguration.php
typo3/sysext/install/Classes/Service/SilentConfigurationUpgradeService.php
typo3/sysext/lang/Resources/Private/Language/locallang_core.xlf

index eaa06bc..2d3172d 100644 (file)
@@ -499,8 +499,6 @@ class EditDocumentController
             || isset($parsedBody['_savedokview'])
             || isset($parsedBody['_savedoknew'])
             || isset($parsedBody['_duplicatedoc'])
             || isset($parsedBody['_savedokview'])
             || isset($parsedBody['_savedoknew'])
             || isset($parsedBody['_duplicatedoc'])
-            || isset($parsedBody['_translation_savedok'])
-            || isset($parsedBody['_translation_savedokclear'])
         ) {
             if ($response = $this->processData($request)) {
                 return $response;
         ) {
             if ($response = $this->processData($request)) {
                 return $response;
@@ -604,9 +602,7 @@ class EditDocumentController
             || isset($_POST['_saveandclosedok'])
             || isset($_POST['_savedokview'])
             || isset($_POST['_savedoknew'])
             || isset($_POST['_saveandclosedok'])
             || isset($_POST['_savedokview'])
             || isset($_POST['_savedoknew'])
-            || isset($_POST['_duplicatedoc'])
-            || isset($_POST['_translation_savedok'])
-            || isset($_POST['_translation_savedokclear']);
+            || isset($_POST['_duplicatedoc']);
         return $out;
     }
 
         return $out;
     }
 
@@ -650,13 +646,6 @@ class EditDocumentController
 
         $tce->setControl($parsedBody['control'] ?? $queryParams['control'] ?? []);
 
 
         $tce->setControl($parsedBody['control'] ?? $queryParams['control'] ?? []);
 
-        if (isset($parsedBody['_translation_savedok'])) {
-            $tce->updateModeL10NdiffData = 'FORCE_FFUPD';
-        }
-        if (isset($parsedBody['_translation_savedokclear'])) {
-            $tce->updateModeL10NdiffData = 'FORCE_FFUPD';
-            $tce->updateModeL10NdiffDataClear = true;
-        }
         // Set default values specific for the user
         $TCAdefaultOverride = $beUser->getTSConfigProp('TCAdefaults');
         if (is_array($TCAdefaultOverride)) {
         // Set default values specific for the user
         $TCAdefaultOverride = $beUser->getTSConfigProp('TCAdefaults');
         if (is_array($TCAdefaultOverride)) {
@@ -865,7 +854,6 @@ class EditDocumentController
 
         if ((int)$this->closeDoc < self::DOCUMENT_CLOSE_MODE_DEFAULT
             || isset($parsedBody['_saveandclosedok'])
 
         if ((int)$this->closeDoc < self::DOCUMENT_CLOSE_MODE_DEFAULT
             || isset($parsedBody['_saveandclosedok'])
-            || isset($parsedBody['_translation_savedok'])
         ) {
             // Redirect if element should be closed after save
             $possibleRedirect = $this->closeDocument(abs($this->closeDoc), $request);
         ) {
             // Redirect if element should be closed after save
             $possibleRedirect = $this->closeDocument(abs($this->closeDoc), $request);
@@ -1466,29 +1454,6 @@ class EditDocumentController
                     Icon::SIZE_SMALL
                 ));
             $saveSplitButton->addItem($saveAndCloseButton);
                     Icon::SIZE_SMALL
                 ));
             $saveSplitButton->addItem($saveAndCloseButton);
-            // FINISH TRANSLATION / SAVE / CLOSE
-            if ($GLOBALS['TYPO3_CONF_VARS']['BE']['explicitConfirmationOfTranslation']) {
-                $saveTranslationButton = $buttonBar->makeInputButton()
-                    ->setName('_translation_savedok')
-                    ->setValue('1')
-                    ->setForm('EditDocumentController')
-                    ->setTitle($lang->sL('LLL:EXT:lang/Resources/Private/Language/locallang_core.xlf:rm.translationSaveDoc'))
-                    ->setIcon($this->moduleTemplate->getIconFactory()->getIcon(
-                        'actions-document-save-cleartranslationcache',
-                        Icon::SIZE_SMALL
-                    ));
-                $saveSplitButton->addItem($saveTranslationButton);
-                $saveAndClearTranslationButton = $buttonBar->makeInputButton()
-                    ->setName('_translation_savedokclear')
-                    ->setValue('1')
-                    ->setForm('EditDocumentController')
-                    ->setTitle($lang->sL('LLL:EXT:lang/Resources/Private/Language/locallang_core.xlf:rm.translationSaveDocClear'))
-                    ->setIcon($this->moduleTemplate->getIconFactory()->getIcon(
-                        'actions-document-save-cleartranslationcache',
-                        Icon::SIZE_SMALL
-                    ));
-                $saveSplitButton->addItem($saveAndClearTranslationButton);
-            }
             $buttonBar->addButton($saveSplitButton, ButtonBar::BUTTON_POSITION_LEFT, 2);
         }
         // CLOSE button:
             $buttonBar->addButton($saveSplitButton, ButtonBar::BUTTON_POSITION_LEFT, 2);
         }
         // CLOSE button:
index d0a48a6..bfb647a 100644 (file)
@@ -25,6 +25,7 @@ use TYPO3\CMS\Backend\Utility\BackendUtility;
 use TYPO3\CMS\Core\Authentication\BackendUserAuthentication;
 use TYPO3\CMS\Core\Cache\CacheManager;
 use TYPO3\CMS\Core\Cache\Frontend\FrontendInterface;
 use TYPO3\CMS\Core\Authentication\BackendUserAuthentication;
 use TYPO3\CMS\Core\Cache\CacheManager;
 use TYPO3\CMS\Core\Cache\Frontend\FrontendInterface;
+use TYPO3\CMS\Core\Compatibility\PublicPropertyDeprecationTrait;
 use TYPO3\CMS\Core\Configuration\FlexForm\Exception\InvalidIdentifierException;
 use TYPO3\CMS\Core\Configuration\FlexForm\Exception\InvalidParentRowException;
 use TYPO3\CMS\Core\Configuration\FlexForm\Exception\InvalidParentRowLoopException;
 use TYPO3\CMS\Core\Configuration\FlexForm\Exception\InvalidIdentifierException;
 use TYPO3\CMS\Core\Configuration\FlexForm\Exception\InvalidParentRowException;
 use TYPO3\CMS\Core\Configuration\FlexForm\Exception\InvalidParentRowLoopException;
@@ -74,6 +75,15 @@ use TYPO3\CMS\Core\Versioning\VersionState;
 class DataHandler implements LoggerAwareInterface
 {
     use LoggerAwareTrait;
 class DataHandler implements LoggerAwareInterface
 {
     use LoggerAwareTrait;
+    use PublicPropertyDeprecationTrait;
+
+    /**
+     * @var array
+     */
+    protected $deprecatedPublicProperties = [
+        'updateModeL10NdiffData' => 'Using updateModeL10NdiffData is deprecated and will not be possible anymore in TYPO3 v10.',
+        'updateModeL10NdiffDataClear' => 'Using updateModeL10NdiffDataClear is deprecated and will not be possible anymore in TYPO3 v10.',
+    ];
 
     // *********************
     // Public variables you can configure before using the class:
 
     // *********************
     // Public variables you can configure before using the class:
@@ -169,7 +179,7 @@ class DataHandler implements LoggerAwareInterface
      *
      * @var bool|string
      */
      *
      * @var bool|string
      */
-    public $updateModeL10NdiffData = true;
+    protected $updateModeL10NdiffData = true;
 
     /**
      * If TRUE, the translation diff. fields will in fact be reset so that they indicate that all needs to change again!
 
     /**
      * If TRUE, the translation diff. fields will in fact be reset so that they indicate that all needs to change again!
@@ -177,7 +187,7 @@ class DataHandler implements LoggerAwareInterface
      *
      * @var bool
      */
      *
      * @var bool
      */
-    public $updateModeL10NdiffDataClear = false;
+    protected $updateModeL10NdiffDataClear = false;
 
     /**
      * If TRUE, workspace restrictions are bypassed on edit an create actions (process_datamap()).
 
     /**
      * If TRUE, workspace restrictions are bypassed on edit an create actions (process_datamap()).
@@ -732,9 +742,6 @@ class DataHandler implements LoggerAwareInterface
         if ($this->BE_USER->uc['recursiveDelete']) {
             $this->deleteTree = 1;
         }
         if ($this->BE_USER->uc['recursiveDelete']) {
             $this->deleteTree = 1;
         }
-        if ($GLOBALS['TYPO3_CONF_VARS']['BE']['explicitConfirmationOfTranslation'] && $this->updateModeL10NdiffData === true) {
-            $this->updateModeL10NdiffData = false;
-        }
         // Initializing default permissions for pages
         $defaultPermissions = $GLOBALS['TYPO3_CONF_VARS']['BE']['defaultPermissions'];
         if (isset($defaultPermissions['user'])) {
         // Initializing default permissions for pages
         $defaultPermissions = $GLOBALS['TYPO3_CONF_VARS']['BE']['defaultPermissions'];
         if (isset($defaultPermissions['user'])) {
@@ -1534,7 +1541,7 @@ class DataHandler implements LoggerAwareInterface
                             $fieldArray[$field] = $res['value'];
                         }
                         // Add the value of the original record to the diff-storage content:
                             $fieldArray[$field] = $res['value'];
                         }
                         // Add the value of the original record to the diff-storage content:
-                        if ($this->updateModeL10NdiffData && $GLOBALS['TCA'][$table]['ctrl']['transOrigDiffSourceField']) {
+                        if ($GLOBALS['TCA'][$table]['ctrl']['transOrigDiffSourceField']) {
                             $originalLanguage_diffStorage[$field] = $this->updateModeL10NdiffDataClear ? '' : $originalLanguageRecord[$field];
                             $diffStorageFlag = true;
                         }
                             $originalLanguage_diffStorage[$field] = $this->updateModeL10NdiffDataClear ? '' : $originalLanguageRecord[$field];
                             $diffStorageFlag = true;
                         }
@@ -3188,7 +3195,7 @@ class DataHandler implements LoggerAwareInterface
                     // Finally, check if new and old values are different (or no .vDEFbase value is found) and if so, we record the vDEF value for diff'ing.
                     // We do this after $dataValues has been updated since I expect that $dataValues_current holds evaluated values from database (so this must be the right value to compare with).
                     if (mb_substr($vKey, -9) !== '.vDEFbase') {
                     // Finally, check if new and old values are different (or no .vDEFbase value is found) and if so, we record the vDEF value for diff'ing.
                     // We do this after $dataValues has been updated since I expect that $dataValues_current holds evaluated values from database (so this must be the right value to compare with).
                     if (mb_substr($vKey, -9) !== '.vDEFbase') {
-                        if ($this->updateModeL10NdiffData && $GLOBALS['TYPO3_CONF_VARS']['BE']['flexFormXMLincludeDiffBase'] && $vKey !== 'vDEF' && ((string)$dataValues[$key][$vKey] !== (string)$dataValues_current[$key][$vKey] || !isset($dataValues_current[$key][$vKey . '.vDEFbase']) || $this->updateModeL10NdiffData === 'FORCE_FFUPD')) {
+                        if ($GLOBALS['TYPO3_CONF_VARS']['BE']['flexFormXMLincludeDiffBase'] && $vKey !== 'vDEF' && ((string)$dataValues[$key][$vKey] !== (string)$dataValues_current[$key][$vKey] || !isset($dataValues_current[$key][$vKey . '.vDEFbase']))) {
                             // Now, check if a vDEF value is submitted in the input data, if so we expect this has been processed prior to this operation (normally the case since those fields are higher in the form) and we can use that:
                             if (isset($dataValues[$key]['vDEF'])) {
                                 $diffValue = $dataValues[$key]['vDEF'];
                             // Now, check if a vDEF value is submitted in the input data, if so we expect this has been processed prior to this operation (normally the case since those fields are higher in the form) and we can use that:
                             if (isset($dataValues[$key]['vDEF'])) {
                                 $diffValue = $dataValues[$key]['vDEF'];
index f94d9fe..d297b40 100644 (file)
@@ -1202,7 +1202,6 @@ return [
         'interfaces' => 'backend',
         'explicitADmode' => 'explicitDeny',
         'flexformForceCDATA' => 0,
         'interfaces' => 'backend',
         'explicitADmode' => 'explicitDeny',
         'flexformForceCDATA' => 0,
-        'explicitConfirmationOfTranslation' => false,
         'versionNumberInFilename' => false,
         'debug' => false,
         'toolbarItems' => [], // Array: Registered toolbar items classes
         'versionNumberInFilename' => false,
         'debug' => false,
         'toolbarItems' => [], // Array: Registered toolbar items classes
index de847ec..99267e5 100644 (file)
@@ -325,9 +325,6 @@ BE:
         flexformForceCDATA:
             type: bool
             description: 'If set, will add CDATA to Flexform XML. Some versions of libxml have a bug that causes HTML entities to be stripped from any XML content and this setting will avoid the bug by adding CDATA.'
         flexformForceCDATA:
             type: bool
             description: 'If set, will add CDATA to Flexform XML. Some versions of libxml have a bug that causes HTML entities to be stripped from any XML content and this setting will avoid the bug by adding CDATA.'
-        explicitConfirmationOfTranslation:
-            type: bool
-            description: 'If set, then the diff-data of localized records is not saved automatically when updated but requires that a translator clicks the special finish_translation/save/close button that becomes available.'
         versionNumberInFilename:
             type: bool
             description: |
         versionNumberInFilename:
             type: bool
             description: |
diff --git a/typo3/sysext/core/Documentation/Changelog/master/Breaking-84810-RemoveExplicitConfirmationOfTranslation.rst b/typo3/sysext/core/Documentation/Changelog/master/Breaking-84810-RemoveExplicitConfirmationOfTranslation.rst
new file mode 100644 (file)
index 0000000..aff3f27
--- /dev/null
@@ -0,0 +1,34 @@
+.. include:: ../../Includes.txt
+
+===========================================================
+Breaking: #84810 - Remove explicitConfirmationOfTranslation
+===========================================================
+
+See :issue:`84810`
+
+Description
+===========
+
+Removes the explicitConfirmationOfTranslation feature which seems to be completely unused. Besides that it does no longer fit in the new button bar introduced with the "unsplit the split button concept".
+It has been detected before that there were missing icons for those buttons in earlier releases for which not even a bugreport was created.
+
+
+Impact
+======
+
+The buttons will disappear if the setting was actually used.
+
+
+Affected Installations
+======================
+
+Installations using the "Translation finished, save and close" and "Translation NOT finished, Save" buttons in their translation workflow.
+Or possibly where the translation labels might be re-used in extensions.
+
+
+Migration
+=========
+
+There's no migration needed as the setting is automatically removed. Possible calls to the previously public methods will appear in the deprecation log but it seems to be highly unlikely those are used.
+
+.. index:: Backend, LocalConfiguration, NotScanned, ext:core
index 9aa9b21..ced90bb 100644 (file)
@@ -5,8 +5,6 @@ defined('TYPO3_MODE') or die();
 // The code here should only manipulate TYPO3_CONF_VARS for example to set the database configuration
 // dependent to the requested environment.
 
 // The code here should only manipulate TYPO3_CONF_VARS for example to set the database configuration
 // dependent to the requested environment.
 
-// $GLOBALS['TYPO3_CONF_VARS']['BE']['explicitConfirmationOfTranslation'] = TRUE;
-
 $GLOBALS['TYPO3_CONF_VARS']['FE']['debug'] = false;
 
 // Register hooks for frontend test
 $GLOBALS['TYPO3_CONF_VARS']['FE']['debug'] = false;
 
 // Register hooks for frontend test
index b5f6e36..75d11e6 100644 (file)
@@ -128,6 +128,8 @@ class SilentConfigurationUpgradeService
         // #83878
         'SYS/isInitialInstallationInProgress',
         'SYS/isInitialDatabaseImportDone',
         // #83878
         'SYS/isInitialInstallationInProgress',
         'SYS/isInitialDatabaseImportDone',
+        // #84810
+        'BE/explicitConfirmationOfTranslation',
     ];
 
     public function __construct(ConfigurationManager $configurationManager = null)
     ];
 
     public function __construct(ConfigurationManager $configurationManager = null)
index 116f916..7dab485 100644 (file)
@@ -852,12 +852,6 @@ Do you want to refresh it now?</source>
                        <trans-unit id="rm.saveCloseDoc">
                                <source>Save and close</source>
                        </trans-unit>
                        <trans-unit id="rm.saveCloseDoc">
                                <source>Save and close</source>
                        </trans-unit>
-                       <trans-unit id="rm.translationSaveDoc">
-                               <source>Translation finished, save and close</source>
-                       </trans-unit>
-                       <trans-unit id="rm.translationSaveDocClear">
-                               <source>Translation NOT finished, Save</source>
-                       </trans-unit>
                        <trans-unit id="rm.saveCloseAllDocs">
                                <source>Save and close all</source>
                        </trans-unit>
                        <trans-unit id="rm.saveCloseAllDocs">
                                <source>Save and close all</source>
                        </trans-unit>