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

    Imported before Forger kept the single votes, the next import adds them.

  • Verified V +2

    Imported before Forger kept the single votes, the next import adds them.

Issues 2

Files 4