Project

General

Profile

Actions

Bug #95212

closed

Form plugin translation doesn't work with YAML configuration (key : translationFiles)

Added by RVVN no-lastname-given almost 3 years ago. Updated 11 days ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2021-09-14
Due date:
% Done:

100%

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

Description

Hi,

following the official documentation ( [[https://docs.typo3.org/c/typo3/cms-form/master/en-us/I/Concepts/FormPlugin/Index.html#translation-of-form-plugin]] ) to translate the form plugin in backend, I set my YAML configuration like this :

TYPO3:
  CMS:
    Form:
      prototypes:
        standard:
          formEngine:
            translationFiles:
              # custom translation file
              20: 'EXT:my_site_package/Resources/Private/Language/Database.xlf'

But this file is never used.

I found in Form TranslationService (line 191 for version 10.4) that the translationFiles array is not replaced by a key-descending-sorted array (returned value from "sortArrayWithIntegerKeysDescending" method)

$this->sortArrayWithIntegerKeysDescending($translationFiles);

The translationFiles array remains the same, so the XLIFF file from the Form extension (at index 10) takes precedence over additional custom ones.

A fix could be :

$translationFiles = $this->sortArrayWithIntegerKeysDescending($translationFiles);

Note : version 11 is affected too.

Actions #1

Updated by RVVN no-lastname-given almost 3 years ago

  • Description updated (diff)
Actions #2

Updated by RVVN no-lastname-given almost 3 years ago

  • Description updated (diff)
Actions #3

Updated by Jonathan Kieling about 1 month ago

  • TYPO3 Version changed from 10 to 12

Still the case with TYPO3 CMS 12.4.16

Actions #4

Updated by Gerrit Code Review about 1 month 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/+/84787

Actions #5

Updated by Gerrit Code Review about 1 month 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/+/84787

Actions #6

Updated by Gerrit Code Review 29 days ago

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

Actions #7

Updated by Jonathan Kieling 29 days ago

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

Updated by Benni Mack 11 days ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF