Review main Merged

91942[BUGFIX] Properly resolve "english" XLIFF translation domain

Garvin Hicking CR +2 V +2 Normal +66 −5 updated 12/01/25, 13:27

Commit message

The implemented language handling in #93334 contained
a flaw in language file resolving sort order.

Given an extension that provides these label files:

- de.locallang.xlf
- en.locallang.xlf
- locallang.xlf

The ordering in `LabelFileResolver->getOrderedFileResources()` would
put all three files in the array key 'en'. Later loops over that
result would regard the last entry as the proper 'en' base language
entry (forfeiting all previous iterations).

If an extension would now provide a file:

- ru.locallang.xlf

this would insert a translated file as the last resolved file into
the array, using this translation as the base-level entry.

So, every locale which has a letter after "l" would be regarded as
the default language, instead of english.

This patch provides a test that would fail with current behavior,
and adjusts the `getOrderedFileResources()` method to actually
only "store" english files in the 'en' scope.

Review

  • Code review CR +2 Done
    • Benni Mack +2
    • Stefan Bürk +1
    • Sebastian Fischer +1
  • Verified V +2 Done
    • Benni Mack +2
    • Stefan Bürk +1
    • core-ci +1 CI

Issues 2

Files 3

Review log 1218

  1. Garvin Hicking uploaded patch set 1 12/01/25, 09:50

  2. Garvin Hicking uploaded patch set 2 12/01/25, 09:54

  3. Garvin Hicking uploaded patch set 3 12/01/25, 09:55

  4. Sebastian Fischer voted on patch set 3 CR +1 12/01/25, 09:57

  5. core-ci voted on patch set 1 V +1 12/01/25, 10:00 Copied votes on follow-up patch sets have been updated: * Verified+1 has been copied to patch set 2 (copy condition: "changekind:NO_CHANGE"). Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/91331

  6. core-ci voted on patch set 2 V +1 12/01/25, 10:04 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/91332

  7. core-ci voted on patch set 3 V +1 12/01/25, 10:05 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/91333

  8. Garvin Hicking updated the commit message in patch set 4 CR +1 V +1 12/01/25, 12:12

  9. Garvin Hicking commented on patch set 5 12/01/25, 12:15

    Published edit on patch set 4.
  10. core-ci voted on patch set 4 V +1 12/01/25, 12:21 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/91349

  11. core-ci voted on patch set 5 V +1 12/01/25, 12:25 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/91350

  12. Benni Mack updated the commit message in patch set 6 V +1 12/01/25, 12:58

  13. Benni Mack voted on patch set 6 CR +1 V +1 12/01/25, 12:59

  14. core-ci voted on patch set 6 V +1 12/01/25, 13:06 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/91357

  15. Sebastian Fischer voted on patch set 6 CR +1 12/01/25, 13:20

  16. Stefan Bürk voted on patch set 6 CR +1 V +1 12/01/25, 13:21

  17. Benni Mack voted on patch set 6 CR +2 V +2 12/01/25, 13:27

  18. Benni Mack merged patch set 7 12/01/25, 13:27