Review main Merged

91947[TASK] Manage localization fallback and load override files using Symfony Translator

Ayke Halder CR +2 V +2 Hard +164 −117 updated 07/15/26, 16:32

Commit message

This directly adds resources to Symfony Translator catalogue.
The correct order is ensured by setting Translator's fallback locales.

This still merges the fallback catalogues afterwards. Merging of
catalogues can be dropped with a complete switch to Symfony Translator
instead of current use of TYPO3 translation cache.

This fixes the localization cache warmer to generate cache entries for
all activated languages.

This gives a performance gain as the Symfony Translator catalogue is
not recreated after every newly added file.
Instead it is recreated once per 'domain and language' after all files
for the 'domain and language' have been added.

With this change cache warmup takes more time as before, as cache
entries are created for all active languages now.

Review

  • Code review CR +2 Done
    • Benni Mack +2
    • Garvin Hicking +1
  • Verified V +2 Done
    • Benni Mack +2
    • Garvin Hicking +1
    • core-ci +1 CI

Issues 2

Files 13

Review log 5077

Show 2952 earlier messages
  1. Ayke Halder uploaded patch set 1 12/01/25, 14:59

  2. core-ci voted on patch set 1 V -1 12/01/25, 15:12 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/91368

  3. Ayke Halder uploaded patch set 2 V -1 12/01/25, 15:36

  4. Ayke Halder uploaded patch set 3 12/01/25, 15:48

  5. core-ci voted on patch set 2 V -1 12/01/25, 15:50 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/91370

  6. core-ci voted on patch set 3 V +1 12/01/25, 15:56 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/91372

  7. Ayke Halder uploaded patch set 4 V +1 12/01/25, 19:16

  8. core-ci voted on patch set 4 V +1 12/01/25, 19:24 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/91382

  9. Ayke Halder uploaded patch set 5 V +1 12/01/25, 19:44

  10. core-ci voted on patch set 5 V -1 12/01/25, 19:51 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/91383

  11. Ayke Halder uploaded patch set 6 V -1 12/01/25, 20:57

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

  13. Ayke Halder updated the commit message in patch set 7 V +1 12/02/25, 10:39

  14. Ayke Halder marked it ready for review 12/02/25, 10:39

  15. Ayke Halder commented on patch set 7 12/02/25, 10:44

    For reviewers: In patch set 1: https://review.typo3.org/c/Packages/TYPO3.CMS/+/91947/1 > Actually I tried to only move the code around and not change the program flow at all. > Which worked pretty well - with exemption for the order in which fallbacks and overrides got included, that was still wrong. In the follow-up patch sets: https://review.typo3.org/c/Packages/TYPO3.CMS/+/91947/2..7 > * The order in which fallbacks and overrides get included is working. > * All fallbacks and overrides are completely handled by Symfony Translator!
  16. core-ci voted on patch set 7 V +1 12/02/25, 10:46 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/91417

  17. Ayke Halder commented on patch set 7 12/02/25, 10:46

    Reply

    Edit: For follow-up patch sets use this link: https://review.typo3.org/c/Packages/TYPO3.CMS/+/91947/1..7
  18. Ayke Halder updated the commit message in patch set 8 V +1 12/02/25, 11:05

  19. core-ci voted on patch set 8 V +1 12/02/25, 12:04 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/91426

  20. Benni Mack voted on patch set 8 CR +1 V +1 12/02/25, 12:38

  21. Ayke Halder rebased onto patch set 9 CR +1 V +1 12/02/25, 22:24

  22. core-ci voted on patch set 9 V +1 12/02/25, 22:33 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/91472

  23. Ayke Halder commented on patch set 9 CR -1 12/04/25, 09:17

    I'd like to merge this one first: 91994: [TASK] Load source item for non-translated XLIFF files | https://review.typo3.org/c/Packages/TYPO3.CMS/+/91994
  24. Ayke Halder uploaded patch set 10 CR -1 V +1 12/13/25, 17:36

  25. core-ci voted on patch set 10 V -1 12/13/25, 17:49 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/92188

  26. Ayke Halder uploaded patch set 11 V -1 12/13/25, 17:54

  27. Ayke Halder uploaded patch set 12 12/13/25, 18:00

  28. core-ci voted on patch set 11 V -1 12/13/25, 18:08 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/92189

  29. core-ci voted on patch set 12 V -1 12/13/25, 18:16 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/92190

  30. Ayke Halder uploaded patch set 13 V -1 12/13/25, 18:20

  31. core-ci voted on patch set 13 V -1 12/13/25, 18:36 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/92191

  32. Ayke Halder uploaded patch set 14 V -1 12/13/25, 18:47

  33. core-ci voted on patch set 14 V -1 12/13/25, 19:03 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/92192

  34. Ayke Halder uploaded patch set 15 V -1 12/14/25, 10:41

  35. core-ci voted on patch set 15 V -1 12/14/25, 10:53 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/92211

  36. Ayke Halder uploaded patch set 16 V -1 12/14/25, 10:56

  37. core-ci voted on patch set 16 V -1 12/14/25, 11:10 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/92212

  38. Ayke Halder uploaded patch set 17 V -1 12/15/25, 21:24

  39. core-ci voted on patch set 17 V +1 12/15/25, 21:31 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/92253

  40. Ayke Halder uploaded patch set 18 V +1 12/16/25, 00:05

  41. core-ci voted on patch set 18 V +1 12/16/25, 00:12 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/92256

  42. Ayke Halder uploaded patch set 19 V +1 12/16/25, 10:00

  43. core-ci voted on patch set 19 V +1 12/16/25, 10:12 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/92279

  44. Ayke Halder uploaded patch set 20 V +1 12/16/25, 11:30

  45. core-ci voted on patch set 20 V -1 12/16/25, 11:49 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/92290

  46. Ayke Halder uploaded patch set 21 V -1 12/16/25, 18:48

  47. Ayke Halder updated the commit message in patch set 22 12/16/25, 18:50

  48. core-ci voted on patch set 21 V -1 12/16/25, 18:57 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/92309

  49. core-ci voted on patch set 22 V -1 12/16/25, 18:59 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/92310

  50. Ayke Halder uploaded patch set 23 V -1 12/16/25, 19:12

  51. core-ci voted on patch set 23 V +1 12/16/25, 19:20 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/92311

  52. Ayke Halder marked it ready for review 12/16/25, 19:37

  1. Ayke Halder commented on patch set 23 12/16/25, 19:38

    Reply

    The aforementioned change and this change are both ready to review.
  2. Ayke Halder uploaded patch set 24 V +1 12/16/25, 23:50

  3. core-ci voted on patch set 24 V +1 12/16/25, 23:57 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/92318

  4. Ayke Halder rebased onto patch set 25 V +1 01/21/26, 16:03

  5. core-ci voted on patch set 25 V +1 01/21/26, 16:14 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/93965

  6. Garvin Hicking commented on patch set 25 V -1 01/23/26, 10:41

    With this patch applied the command: vendor/bin/typo3 language:domain:search -e core no longer lists any labels. Even after cache:warmup is called (which takes quite long now as anticipated)
  7. Garvin Hicking commented on patch set 25 01/23/26, 11:16

    Reply

    I found out that the `LabelFinder` used in that command has no tests. I am working on these. That might help to pinpoint a change in this too?
  8. Ayke Halder commented on patch set 25 01/23/26, 15:49

    Reply

    It might not be working because of changes in `typo3/sysext/core/Classes/Localization/LabelFileResolver.php`

    LabelFileResolver.php:53

    This change is only necessary as some lowlevel function like `vendor/bin/typo3 language:domain:search -e core` are dependant on getting all files including locales.
  9. Ayke Halder commented on patch set 25 01/23/26, 15:59

    Reply

    And also see how `localizationFactory::addFileReferenceToTranslator()` already handles non-existent files.

    LocalizationFactory.php:246

    This catches not found files. So actually in `LabelFileResolver::getAllLabelFilesOfPackage()` it is not necessary anymore to make sure a file really exists.
  10. Garvin Hicking commented on patch set 25 01/23/26, 16:40

    Reply

    Do I understand right, you're still checking this? (I have not yet reviewed this patch further because I figured this might be a showstopper or reveal problems. Also I'm afraid im not nearly as deep into all of this like you are atm. But it's hard for me to focus because the issues tend to act like a hydra and for every issue we face 5 more questions)
  11. Ayke Halder uploaded patch set 26 V +1 01/24/26, 12:00

  12. core-ci voted on patch set 26 V +1 01/24/26, 12:08 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/94250

  13. Ayke Halder commented on patch set 26 01/24/26, 14:05

    Reply

    @garvin@hick.ing You already solved this issue with: 92479: [BUGFIX] Fix resolving localized strings in language:domain:search CLI | https://review.typo3.org/c/Packages/TYPO3.CMS/+/92479 About the underlying issue: This re-introduces 'default' locale inside Core logics - as there are files like: * default: locallang.xlf * en: en.locallang.xlf * de: de.locallang.xlf * de_AT: de-AT.locallang.xlf For Consumers like translate methods there is still no 'default' locale to be used. For this very special lowlevel function `bin/typo3 language:domain:search` (Core logic) it now makes a difference of checking 'default' or 'en' - see: * ddev exec bin/typo3 language:domain:search -e core --locale=default --search=record * ddev exec bin/typo3 language:domain:search -e core --locale=en --search=record

    LabelFileResolver.php:53 Reply

    Done
  14. Ayke Halder commented on patch set 26 01/24/26, 17:06

    Reply

    Actually the result of `language:domain:search -e core --locale=default` is identical to `… --locale=en`.
  15. Garvin Hicking commented on patch set 26 01/24/26, 21:48

    LabelFileResolver.php:69

    I did not properly find out why the subdirectory recursion is disabled here, could you maybe elaborate?
  16. Ayke Halder commented on patch set 26 01/25/26, 17:18

    LabelFileResolver.php:69 Reply

    The forth argument is not about recursion, it's actually about adding directories to the result, instead of files only. We do not need any directories here - only files. ``` @param bool $regDirs If set, directories are also included in output. ```
  17. Garvin Hicking commented on patch set 26 CR +1 V +1 01/25/26, 17:33

    LabelFileResolver.php:69 Reply

    Oh thanks. Was too late yesterday for me. Thanks.
  18. Benni Mack rebased onto patch set 27 CR +1 V +1 01/27/26, 12:42

  19. core-ci voted on patch set 27 V +1 01/27/26, 12:51 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/94425

  20. Benni Mack marked it ready for review 01/27/26, 15:26

  21. Garvin Hicking voted on patch set 27 CR +1 V +1 01/27/26, 16:19

  22. Benni Mack voted on patch set 27 CR +2 V +2 01/27/26, 16:33

  23. Benni Mack merged patch set 28 01/27/26, 16:33

  24. Georg Ringer commented on patch set 28 01/28/26, 11:40

    POST -1 after this change, using contentblocks in a v14 project (all auf dev-main) leads to issues that all contentblock content elements get the same title. If I open another element, clear cache, reload, then all elements will get the title of that element
  25. Ayke Halder commented on patch set 28 07/15/26, 16:32

    Reply

    Fixed with 92563: [BUGFIX] Allow extensions to self-handle localization files in custom directories | https://review.typo3.org/c/Packages/TYPO3.CMS/+/92563