Project

General

Profile

Actions

Bug #95212

open

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

Added by RVVN no-lastname-given over 2 years ago. Updated over 2 years ago.

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

0%

Estimated time:
TYPO3 Version:
10
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 over 2 years ago

  • Description updated (diff)
Actions #2

Updated by RVVN no-lastname-given over 2 years ago

  • Description updated (diff)
Actions

Also available in: Atom PDF