Skip to content
Snippets Groups Projects
Commit 68e8f031 authored by Benni Mack's avatar Benni Mack
Browse files

[BUGFIX] Use locale dependencies in Extbase LocalizationUtility

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)

Resolves: #102579
Related: #101710
Releases: main, 12.4
Change-Id: Id51082e75cf635bbe3cbdfc906dc2a7442ab06af
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/82065


Tested-by: default avatarGarvin Hicking <gh@faktor-e.de>
Tested-by: default avatarStefan Bürk <stefan@buerk.tech>
Reviewed-by: default avatarStefan Bürk <stefan@buerk.tech>
Tested-by: default avatarBenni Mack <benni@typo3.org>
Reviewed-by: default avatarGarvin Hicking <gh@faktor-e.de>
Reviewed-by: default avatarBenni Mack <benni@typo3.org>
Tested-by: default avatarcore-ci <typo3@b13.com>
parent 9e1e9493
No related merge requests found
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment