Commit 09eda80e authored by Rens Admiraal's avatar Rens Admiraal Committed by Andreas Fernandez
Browse files

[!!!][TASK] Remove the explicitConfirmationOfTranslation setting

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: default avatarTYPO3com <no-reply@typo3.com>
Reviewed-by: default avatarMathias Schreiber <mathias.schreiber@typo3.com>
Tested-by: default avatarMathias Schreiber <mathias.schreiber@typo3.com>
Reviewed-by: Andreas Fernandez's avatarAndreas Fernandez <a.fernandez@scripting-base.de>
Tested-by: Andreas Fernandez's avatarAndreas Fernandez <a.fernandez@scripting-base.de>
parent f6455976
......@@ -499,8 +499,6 @@ class EditDocumentController
|| isset($parsedBody['_savedokview'])
|| isset($parsedBody['_savedoknew'])
|| isset($parsedBody['_duplicatedoc'])
|| isset($parsedBody['_translation_savedok'])
|| isset($parsedBody['_translation_savedokclear'])
) {
if ($response = $this->processData($request)) {
return $response;
......@@ -604,9 +602,7 @@ class EditDocumentController
|| 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;
}
......@@ -650,13 +646,6 @@ class EditDocumentController
$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)) {
......@@ -865,7 +854,6 @@ class EditDocumentController
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);
......@@ -1466,29 +1454,6 @@ class EditDocumentController
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:
......
......@@ -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\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;
......@@ -74,6 +75,15 @@ use TYPO3\CMS\Core\Versioning\VersionState;
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:
......@@ -169,7 +179,7 @@ class DataHandler implements LoggerAwareInterface
*
* @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!
......@@ -177,7 +187,7 @@ class DataHandler implements LoggerAwareInterface
*
* @var bool
*/
public $updateModeL10NdiffDataClear = false;
protected $updateModeL10NdiffDataClear = false;
/**
* 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 ($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'])) {
......@@ -1534,7 +1541,7 @@ class DataHandler implements LoggerAwareInterface
$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;
}
......@@ -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') {
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'];
......
......@@ -1202,7 +1202,6 @@ return [
'interfaces' => 'backend',
'explicitADmode' => 'explicitDeny',
'flexformForceCDATA' => 0,
'explicitConfirmationOfTranslation' => false,
'versionNumberInFilename' => false,
'debug' => false,
'toolbarItems' => [], // Array: Registered toolbar items classes
......
......@@ -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.'
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: |
......
.. 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
......@@ -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.
// $GLOBALS['TYPO3_CONF_VARS']['BE']['explicitConfirmationOfTranslation'] = TRUE;
$GLOBALS['TYPO3_CONF_VARS']['FE']['debug'] = false;
// Register hooks for frontend test
......
......@@ -128,6 +128,8 @@ class SilentConfigurationUpgradeService
// #83878
'SYS/isInitialInstallationInProgress',
'SYS/isInitialDatabaseImportDone',
// #84810
'BE/explicitConfirmationOfTranslation',
];
public function __construct(ConfigurationManager $configurationManager = null)
......
......@@ -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.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>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment