Review 12.4 Merged

82019[BUGFIX] Use locale dependencies in Extbase LocalizationUtility

Benni Mack CR +2 V +2 Normal +87 −7 updated 12/04/23, 09:02

Commit message

Since TYPO3 v12.4, TYPO3 uses locales such as "de_DE"
or "de-AT" in Site Configuration natively.

In order to resolve the "locale dependencies" natively,
a new Locale object needs to be created be the "Locales"
factory class. This is needed to check for "de_AT.locallang.xlf"
and falling back to "de.locallang.xlf" in a multi-step mode.

This change adapts one place in Extbase's LocalizationUtility
where a new Locale object was previously instantiated via
new Locale() instead of using the "Locales" class which
deals with all dependencies (incl. manually defined dependencies)
directly there.

A new comment is added to explain this inside the constructor
of Locale.

In addition, some more tests are added (including the ones
that did not work before), as well as an example that
it does not matter if the file is called "de-AT.locallang.xlf"
(with a hyphen) or "de_CH.locallang.xlf" (with an underscore)

Review

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

Issues 2

Files 4

Review log 57

  1. Benni Mack commented on patch set 1 12/04/23, 08:42

    Cherry Picked from branch main. The following files contain Git conflicts: * typo3/sysext/extbase/Classes/Utility/LocalizationUtility.php
  2. core-ci voted on patch set 1 V -1 12/04/23, 08:51 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/50298

  3. Benni Mack uploaded patch set 2 V -1 12/04/23, 08:54

  4. Benni Mack marked it ready for review 12/04/23, 08:55

  5. core-ci voted on patch set 2 V +1 12/04/23, 09:00 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/50302

  6. Benni Mack voted on patch set 2 CR +2 V +2 12/04/23, 09:02

  7. Benni Mack merged patch set 3 12/04/23, 09:02