Project

General

Profile

Actions

Task #99692

closed

Remove hardcoded "Translate to:" in DataMapProcessor

Added by Philipp Idler over 1 year ago. Updated 10 months ago.

Status:
Closed
Priority:
Won't have this time
Assignee:
-
Category:
Localization
Target version:
-
Start date:
2023-01-24
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
10
PHP Version:
8.0
Tags:
Complexity:
easy
Sprint Focus:

Description

When a record in TYPO3 backend is translated it will be prefixed by default with string "Translate to: ".

According to the documentation it should be possible to adjust the prefix. In some cases this prefix may be empty:

TCEMAIN.translateToMessage =

BUT in DataMapProcessor this empty line will be overwritten with hardcoded initial value "Translated to: ". So there is no posibility to surpress this prefix.

/typo3/sysext/core/Classes/DataHandling/Localization/DataMapProcessor.php

        $tsConfigTranslateToMessage = BackendUtility::getPagesTSconfig($pageId)['TCEMAIN.']['translateToMessage'] ?? '';
        if (!empty($tsConfigTranslateToMessage)) {
            $prefix = $tsConfigTranslateToMessage;
            if ($languageService !== null) {
                $prefix = $languageService->sL($prefix);
            }
            $prefix = sprintf($prefix, $languageRecord['title']);
        }
        if (empty($prefix)) {
            $prefix = 'Translate to ' . $languageRecord['title'] . ':';
        }

Why does this fallback exists and can we remove it?


Related issues 1 (1 open0 closed)

Related to TYPO3 Core - Story #101561: DataHandler related translation issuesNew2023-08-03

Actions
Actions

Also available in: Atom PDF