Project

General

Profile

Actions

Bug #97721

closed

Not possible to disable translateToMessage for some cases

Added by Jessica Jagodzinski almost 2 years ago. Updated over 1 year 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 #1

Updated by Gerrit Code Review almost 2 years ago

  • Status changed from New to Under Review

Patch set 1 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/74815

Actions #2

Updated by Gerrit Code Review almost 2 years ago

Patch set 2 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/74815

Actions #3

Updated by Gerrit Code Review almost 2 years ago

Patch set 1 for branch 11.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/74767

Actions #4

Updated by Oliver Bartsch almost 2 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #5

Updated by Benni Mack over 1 year ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF