Project

General

Profile

Actions

Bug #97721

closed

Not possible to disable translateToMessage for some cases

Added by Jessica Jagodzinski over 2 years ago. Updated about 2 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2022-06-01
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
11
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

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.

Actions

Also available in: Atom PDF