#108362LabelFileResolver::getOrderedFileResources adds every file to key en
Description
When LabelFileResolver::getOrderedFileResources gets called with $fileReference = EXT:sf_books/Resources/Private/Language/de.locallang_be.xlf and $locale = de the file gets added to the $result[‘en’] anyway. By this the result always returns with the file in en and de.
In itself this would not be a problem. But LabelFileResolver::getAllLabelFilesOfPackage adds the $orderedFiles to an bigger $result and in there $result[‘en’] contains all files:
$result = {array7}
de = {array3}
en = {array15}
0 = “/var/www/html/vendor/evoweb/sf-books/Resources/Private/Language/de.locallang_be.xlf“
1 = “/var/www/html/vendor/evoweb/sf-books/Resources/Private/Language/de.locallang_db.xlf“
2 = “/var/www/html/vendor/evoweb/sf-books/Resources/Private/Language/de.locallang.xlf“
3 = “/var/www/html/vendor/evoweb/sf-books/Resources/Private/Language/fi.locallang_be.xlf“
4 = “/var/www/html/vendor/evoweb/sf-books/Resources/Private/Language/fi.locallang.xlf“
5 = “/var/www/html/vendor/evoweb/sf-books/Resources/Private/Language/fr.locallang_be.xlf“
6 = “/var/www/html/vendor/evoweb/sf-books/Resources/Private/Language/fr.locallang.xlf“
7 = “/var/www/html/vendor/evoweb/sf-books/Resources/Private/Language/li.locallang.xlf“
8 = “/var/www/html/vendor/evoweb/sf-books/Resources/Private/Language/locallang_be.xlf“
9 = “/var/www/html/vendor/evoweb/sf-books/Resources/Private/Language/locallang_db.xlf“
10 = “/var/www/html/vendor/evoweb/sf-books/Resources/Private/Language/locallang.xlf“
11 = “/var/www/html/vendor/evoweb/sf-books/Resources/Private/Language/lt.locallang_be.xlf“
12 = “/var/www/html/vendor/evoweb/sf-books/Resources/Private/Language/ru.locallang_be.xlf“
13 = “/var/www/html/vendor/evoweb/sf-books/Resources/Private/Language/ru.locallang.xlf“
14 = “/var/www/html/vendor/evoweb/sf-books/Configuration/Sets/Books/labels.xlf”
This is bad, because then the last file for domain.message gets taken. In this example “/var/www/html/vendor/evoweb/sf-books/Resources/Private/Language/ru.locallang.xlf” wins. Which leads to have russian labels instead of english labels for en.
Affected code is https://github.com/TYPO3/typo3/blob/c9b3c85a993c0b09af7953bb8e8a2ae79a14fea5/typo3/sysext/core/Classes/Localization/LabelFileResolver.php#L121
!clipboard-202511291552-bhx4t.png!
!clipboard-202511291553-eussh.png!
clipboard-202511291553-xgmsh.png