Review 12.4 Merged

82023[BUGFIX] Allow access to TypoScript overrides for labels in _LOCAL_LANG

Benni Mack CR +2 V +2 Hard +266 −119 updated 12/05/23, 11:53

Commit message

This bugfix enables the possibility to access _LOCAL_LANG
values from TypoScript properly again via Extbase's
LocalizationUtility, and thus for <f:translate> ViewHelpers
as well again.

This is what has changed under-the-hood:

The TranslateViewHelper is now only a thin layer
to Extbase's LocalizationUtility (as before), and only
checks if a current request or Locale/languageKey is
given, if a locale can be resolved. Everything else
is then dispatched to the LocalizationUtility.

<f:translate> is very clean now and has almost no further
responsibility than to call LocalizationUtility::translate

Instead of adding further LocalizationUtility magic,
overriding of TypoScript is now enabled for any kind
of plugin which hands in $extensionName. This is achieved
by building proper Locale objects from the request which
are then used to build the respective LanguageService.

As it turned out after the 12.4.0 release, the "Locales"
class is indeed the factory for creating a Locale, which
is decoupled from the actual LanguageService (= label magic),
the Locales factory receives a few create methods to make
life easier for usage, which both f:translate AND
LocalizationUtility receive, making their parts much smaller.

Further work will dissolve the usage of the Configuration
Manager of Extbase, but this won't happen in v12 anymore.

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 1

Files 14