Project

General

Profile

Actions

Task #99692

closed

Remove hardcoded "Translate to:" in DataMapProcessor

Added by Philipp Idler over 1 year ago. Updated 9 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 #1

Updated by Eric Harrer 9 months ago

  • TYPO3 Version changed from 11 to 10
Actions #2

Updated by Eric Harrer 9 months ago

Your code snippet seems to still refer to version 10.4.
This hardcoded string already has been removed in TYPO3 v11 and up.

Actions #3

Updated by Eric Harrer 9 months ago

  • Related to Epic #101557: Translation Handling Findings added
Actions #4

Updated by Eric Harrer 9 months ago

  • Related to deleted (Epic #101557: Translation Handling Findings)
Actions #5

Updated by Eric Harrer 9 months ago

  • Related to Story #101561: DataHandler related translation issues added
Actions #6

Updated by Jo Hasenau 9 months ago

  • Status changed from New to Closed
  • Priority changed from Should have to Won't have this time

This is fixed in 11 and won't be fixed in 10 due to ELTS.

Actions

Also available in: Atom PDF