Review 14.3 Merged

96758[BUGFIX] Resolve locale dependencies in LanguageServiceFactory

Benjamin Kott CR +2 V +2 Normal +67 −9 updated 10/16/26, 14:14

Commit message

LanguageServiceFactory::create() resolved the dependencies of a locale
given as string, but used a Locale object as is. A Locale built through
its constructor - as SiteLanguage does - does not carry a resolved
dependency list, so "da-DK" never fell back to "da" and label lookup
dropped straight to English.

This affected every caller handing over a Locale object, such as
LocalizationUtility::translate(), the form TranslationService and the
PageRenderer. createFromSiteLanguage() worked around it by casting the
locale to string.

A Locale without resolved dependencies is now resolved through the
Locales factory, while one carrying dependencies is honoured as is, so
custom locales keep working. createFromSiteLanguage() no longer needs
the string cast.

Review

  • Code review CR +2 Done
    • Benjamin Kott +2
  • Verified V +2 Done
    • Benjamin Kott +2
    • core-ci +1 CI

Issues 1

Files 4

Review log 57

  1. Benjamin Kott commented on patch set 1 10/16/26, 14:00

    Cherry Picked from branch main. The following files contain Git conflicts: * typo3/sysext/core/Tests/Functional/Localization/LanguageServiceTest.php
  2. Benjamin Kott uploaded patch set 2 10/16/26, 14:02

  3. Benjamin Kott commented on patch set 2 10/16/26, 14:03

    This change is ready for review.
  4. core-ci voted on patch set 1 V -1 10/16/26, 14:07 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/111365

  5. core-ci voted on patch set 2 V +1 10/16/26, 14:11 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/111366

  6. Benjamin Kott voted on patch set 2 CR +2 V +2 10/16/26, 14:14

  7. Benjamin Kott merged patch set 3 10/16/26, 14:14