Review main Merged Breaking

90658[!!!][FEATURE] Use symfony/translation for translatable labels

Benni Mack CR +2 V +2 Expert +1444 −644 updated 09/20/25, 05:49

Commit message

TYPO3's own custom LanguageStore and own parsers for
translations via locallang.php, locallang.xml and locallang.xlf
have served us very well. Now it is time to let them
retire, and replace this system with symfony/translation.

This change is the first part - it replaces the parsers,
their registry and the "LocalizationStore" (which was a giant
runtime cache) with the Symfony Translator and a custom
XLIFF parser - the latter mainly because TYPO3 has some
specialties in its place.

Ideally - in the next steps we can similarly expose the catalogues
even further to e.g. LanguageService, thinning out
TYPO3's legacy API even more.

Cool new features will happen along the way:
- Improved caching + warmup
- Introduce new APIs that utilize the catalogues (see Benji's Patch)
- Move towards a better / standardized file resolving

Current responsibilities:
1. LanguageService: Exposed to the outside world (public API)
2. LocalizationFactory: overrides, file location, fallbacks
3. Symfony Translator + XliffLoader: File parsing

Options removed:
- $GLOBALS['TYPO3_CONF_VARS']['SYS']['lang']['parser']

Options added:
- $GLOBALS['TYPO3_CONF_VARS']['LANG']['loader']

Options moved
- $GLOBALS['TYPO3_CONF_VARS']['SYS']['lang']['requireApprovedLocalizations'] => $GLOBALS['TYPO3_CONF_VARS']['LANG']['requireApprovedLocalizations']
- $GLOBALS['TYPO3_CONF_VARS']['SYS']['lang']['format'] => $GLOBALS['TYPO3_CONF_VARS']['LANG']['format']
- $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['lang']['availableLanguages'] => $GLOBALS['TYPO3_CONF_VARS']['LANG']['availableLocales']
- $GLOBALS['TYPO3_CONF_VARS']['SYS']['locallangXMLOverride'] => $GLOBALS['TYPO3_CONF_VARS']['LANG']['resourceOverrides']

Review

  • Code review CR +2 Done
    • Georg Ringer +2
    • Garvin Hicking +1
  • Verified V +2 Done
    • Georg Ringer +2
    • Garvin Hicking +1

Issues 1

Files 31

Show 11 more files

Review log 3451

Show 1426 earlier messages
  1. Benni Mack uploaded patch set 1 09/10/25, 20:31

  2. Benni Mack marked it work in progress 09/10/25, 20:31

  3. core-ci voted on patch set 1 V -1 09/10/25, 20:38 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/84801

  4. Benni Mack uploaded patch set 2 V -1 09/10/25, 20:51

  5. core-ci voted on patch set 2 V -1 09/10/25, 20:58 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/84802

  6. Benni Mack uploaded patch set 3 V -1 09/10/25, 21:08

  7. core-ci voted on patch set 3 V +1 09/10/25, 21:15 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/84803

  8. Benni Mack uploaded patch set 4 V +1 09/11/25, 09:37

  9. core-ci voted on patch set 4 V +1 09/11/25, 09:44 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/84826

  10. Benni Mack uploaded patch set 5 V +1 09/11/25, 10:22

  11. core-ci voted on patch set 5 V -1 09/11/25, 10:34 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/84827

  12. Benni Mack uploaded patch set 6 V -1 09/11/25, 11:07

  13. core-ci voted on patch set 6 V -1 09/11/25, 11:20 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/84833

  14. Benni Mack uploaded patch set 7 V -1 09/11/25, 11:41

  15. core-ci voted on patch set 7 V -1 09/11/25, 11:52 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/84836

  16. Benni Mack uploaded patch set 8 V -1 09/11/25, 13:17

  17. core-ci voted on patch set 8 V -1 09/11/25, 13:27 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/84844

  18. Garvin Hicking updated the commit message in patch set 9 V -1 09/11/25, 13:38

  19. Benni Mack uploaded patch set 10 09/11/25, 13:45

  20. Garvin Hicking uploaded patch set 11 09/11/25, 13:46

  21. Benni Mack uploaded patch set 12 09/11/25, 13:47

  22. core-ci voted on patch set 9 V -1 09/11/25, 13:59 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/84847

  23. core-ci voted on patch set 10 V -1 09/11/25, 14:00 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/84848

  24. core-ci voted on patch set 11 V -1 09/11/25, 14:02 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/84849

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

  26. Garvin Hicking uploaded patch set 13 V -1 09/11/25, 14:05

  1. Benni Mack marked it ready for review 09/11/25, 14:06

  2. Garvin Hicking commented on patch set 13 09/11/25, 14:13

    LanguagePackService.php:80

    I wonder if we should cover this in the RST. I know a lot of project code that actively queries this variable. The Breaking.rst should receive this.
  3. core-ci voted on patch set 13 V -1 09/11/25, 14:16 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/84852

  4. Benni Mack uploaded patch set 14 V -1 09/11/25, 14:37

  5. core-ci voted on patch set 14 V -1 09/11/25, 14:49 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/84853

  6. Benni Mack commented on patch set 14 09/11/25, 15:02

    LanguagePackService.php:80 Reply

    Done
  7. Benni Mack uploaded patch set 15 V -1 09/11/25, 15:19

  8. core-ci voted on patch set 15 V +1 09/11/25, 15:27 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/84855

  9. Garvin Hicking commented on patch set 15 09/11/25, 16:51

    XliffLoader.php:40

    due to this method only accepting strings, the resource check is moot? because this would throw an exception on a resource? Hiw about throwing directly if $resource is not a string...?
  10. Garvin Hicking commented on patch set 15 09/11/25, 17:24

    I think we could add these arrays to the extension scanner array matcher? Silent migration applied to write context but not reading, so catching these would help for people accessing these in extensions
  11. Garvin Hicking commented on patch set 15 09/11/25, 17:37

    XliffLoader.php:36

    This could be final readonly if we want to lock it down, and private methods?
  12. Benni Mack commented on patch set 15 09/11/25, 17:59

    XliffLoader.php:40 Reply

    we could do this, yes.
  13. Garvin Hicking uploaded patch set 16 V +1 09/11/25, 18:06

  14. Garvin Hicking commented on patch set 16 09/11/25, 18:07

    Reply

    Added this.

    XliffLoader.php:40 Reply

    Done
  15. Garvin Hicking commented on patch set 16 09/11/25, 18:12

    DefaultConfigurationDescription.yaml:249

    Both these "array" types could instead use the new "element-list" type (https://review.typo3.org/c/Packages/TYPO3.CMS/+/89040) - what do you think?
  16. core-ci voted on patch set 16 V +1 09/11/25, 18:14 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/84858

  17. Benni Mack commented on patch set 16 09/11/25, 19:25

    XliffLoader.php:36 Reply

    go ahead.

    DefaultConfigurationDescription.yaml:249 Reply

    yes please!
  18. Garvin Hicking uploaded patch set 17 V +1 09/11/25, 19:38

  19. Garvin Hicking commented on patch set 17 CR +1 V +1 09/11/25, 19:39

    XliffLoader.php:36 Reply

    Done

    DefaultConfigurationDescription.yaml:249 Reply

    Done
  20. Georg Ringer voted on patch set 17 CR +2 V +2 09/11/25, 19:50

  21. Georg Ringer merged patch set 18 09/11/25, 19:50

  22. core-ci voted on patch set 17 V +1 09/11/25, 19:57 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/84860

  23. Benjamin Franzke commented on patch set 18 09/12/25, 08:51

    DefaultConfigurationDescription.yaml:243

    It seems this should have been type `map` since it is using string-indexed values (currently `'xlf'` in `DefaultConfiguration.php`)
  24. Benjamin Franzke commented on patch set 18 09/12/25, 08:57

    DefaultConfigurationDescription.yaml:243 Reply

    90671: [BUGFIX] Make sure SYS/LANG/loader is a map | https://review.typo3.org/c/Packages/TYPO3.CMS/+/90671
  25. Lina Wolf commented on patch set 18 09/20/25, 05:49