Bug #97721
closedNot possible to disable translateToMessage for some cases
100%
Description
TCEMAIN {
translateToMessage =
}
https://docs.typo3.org/m/typo3/reference-tsconfig/main/en-us/PageTsconfig/TceMain.html#translatetomessage
should disable prefix for new elements, but it doesn't work for some cases.
How to reproduce it:- use page TsConfig from top
- create a record with an image
- Translate it with Translation behavior: value of default language
- replace image in default language
- translation will have the translate to .. prefix
You also can use news for tests.
The behavior is caused by the following code:
typo3/cms-core/Classes/DataHandling/Localization/DataMapProcessor.php Line 1338-1352
$tsConfigTranslateToMessage = BackendUtility::getPagesTSconfig($pageId)['TCEMAIN.']['translateToMessage'] ?? '';
if (!empty($tsConfigTranslateToMessage)) {
$prefix = $tsConfigTranslateToMessage;
if ($languageService !== null) {
$prefix = $languageService->sL($prefix);
}
$prefix = sprintf($prefix, $languageTitle);
}
if (empty($prefix)) {
if ($languageTitle) {
$prefix = 'Translate to ' . $languageTitle . ':';
} else {
$prefix = 'Translate:';
}
}
If translateToMessage is empty, it's replaced by the default value.