Bug #95212
closedForm plugin translation doesn't work with YAML configuration (key : translationFiles)
100%
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.
Updated by Jonathan Kieling about 1 month ago
- TYPO3 Version changed from 10 to 12
Still the case with TYPO3 CMS 12.4.16
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
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
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
Updated by Jonathan Kieling 29 days ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset c56ab1dce146c85c5cd871f1adcdab457b5e9ef2.