93435[FEATURE] Introduce PSR-14 `ModifyLocalizationHandlerIsAvailableEvent`
Commit message
Review
-
Code review CR +2 Done
- Stefan Bürk +2
- Garvin Hicking +1
- Guido Schmechel +1
- Josua Vogel +1
- Oliver Hader +1
- Simon Schaufelberger +1
-
Verified V +2 Done
- Stefan Bürk +2
- Garvin Hicking +1
- Guido Schmechel +1
- Josua Vogel +1
- Oliver Hader +1
- Simon Schaufelberger +1
- core-ci +1 CI
Issues 2
Files 4
- typo3/sysext/backend/Classes/Localization/Event/ModifyLocalizationHandlerIsAvailableEvent.phpnew+38 −0
- typo3/sysext/backend/Classes/Localization/LocalizationHandlerRegistry.php+14 −3
- typo3/sysext/backend/Tests/Functional/Localization/LocalizationHandlerRegistryTest.php4new+137 −0
- typo3/sysext/core/Documentation/Changelog/14.2/Feature-109429-IntroducePSR-14ModifyLocalizationHandlerIsAvailableEvent.rst29new+87 −0
Review log 2228
Show 23 earlier messages
-
Stefan Bürk uploaded patch set 1 03/30/26, 17:09
-
Stefan Bürk uploaded patch set 2 03/30/26, 17:11
-
core-ci voted on patch set 2 V -1 03/30/26, 17:27 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/99099
-
Garvin Hicking commented on patch set 2 03/30/26, 17:31
Feature-109429-IntroducePSR-14ModifyLocalizationHandlerIsAvailableEvent.rst:15```suggestion is introduced and fired in :php-short:`\TYPO3\CMS\Backend\Localization\LocalizationHandlerRegistry` ```Feature-109429-IntroducePSR-14ModifyLocalizationHandlerIsAvailableEvent.rst:17This changelog is very technical and people might not understand what "Localization" refers to. I myself first thought it's about the XLIFF localization/translation interface, not the "translation wizard". Can you add one sentence like "This affects the localization wizard when translating pages or records in the TYPO3 backend."?Feature-109429-IntroducePSR-14ModifyLocalizationHandlerIsAvailableEvent.rst:17```suggestion on the :php-short:`\TYPO3\CMS\Backend\Localization\LocalizationInstructions\LocalizationInstructions`. ```Feature-109429-IntroducePSR-14ModifyLocalizationHandlerIsAvailableEvent.rst:19```suggestion The event provides the following properties: ```Feature-109429-IntroducePSR-14ModifyLocalizationHandlerIsAvailableEvent.rst:24```suggestion a handler has been xclass'd without changing the identifier. ```Feature-109429-IntroducePSR-14ModifyLocalizationHandlerIsAvailableEvent.rst:26```suggestion instruction passed to the handler's `isAvailable()` method to define the context. ```Feature-109429-IntroducePSR-14ModifyLocalizationHandlerIsAvailableEvent.rst:27```suggestion * :php:`public bool $isAvailable`: The returned availibility state of the handler, ```Feature-109429-IntroducePSR-14ModifyLocalizationHandlerIsAvailableEvent.rst:28```suggestion which can be altered by a PSR-14 Event listener. ```Feature-109429-IntroducePSR-14ModifyLocalizationHandlerIsAvailableEvent.rst:54```suggestion // Return early if not ManualLocalizationHandler ```Feature-109429-IntroducePSR-14ModifyLocalizationHandlerIsAvailableEvent.rst:62```suggestion if ($event->instructions->mode !== LocalizationMode::TRANSLATE) { ```Feature-109429-IntroducePSR-14ModifyLocalizationHandlerIsAvailableEvent.rst:79```suggestion Custom extensions (public or project-specific) are ```Feature-109429-IntroducePSR-14ModifyLocalizationHandlerIsAvailableEvent.rst:80```suggestion now able to intercept, which handlers are available for offering localization steps in the translation wizard, based on the provided ``` -
core-ci voted on patch set 1 V -1 03/30/26, 17:46 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/99098
-
Stefan Bürk uploaded patch set 3
V -103/30/26, 18:57 -
Stefan Bürk uploaded patch set 4 03/30/26, 18:59
-
Stefan Bürk commented on patch set 4 03/30/26, 18:59
Feature-109429-IntroducePSR-14ModifyLocalizationHandlerIsAvailableEvent.rst:14ReplyDoneFeature-109429-IntroducePSR-14ModifyLocalizationHandlerIsAvailableEvent.rst:15ReplyDoneFeature-109429-IntroducePSR-14ModifyLocalizationHandlerIsAvailableEvent.rst:17ReplyAdded something. Hope it's okay now for you.Feature-109429-IntroducePSR-14ModifyLocalizationHandlerIsAvailableEvent.rst:17ReplyDoneFeature-109429-IntroducePSR-14ModifyLocalizationHandlerIsAvailableEvent.rst:19ReplyDoneFeature-109429-IntroducePSR-14ModifyLocalizationHandlerIsAvailableEvent.rst:24ReplyDoneFeature-109429-IntroducePSR-14ModifyLocalizationHandlerIsAvailableEvent.rst:26ReplyDoneFeature-109429-IntroducePSR-14ModifyLocalizationHandlerIsAvailableEvent.rst:27ReplyDoneFeature-109429-IntroducePSR-14ModifyLocalizationHandlerIsAvailableEvent.rst:28ReplyDoneFeature-109429-IntroducePSR-14ModifyLocalizationHandlerIsAvailableEvent.rst:54ReplyDoneFeature-109429-IntroducePSR-14ModifyLocalizationHandlerIsAvailableEvent.rst:62ReplyDoneFeature-109429-IntroducePSR-14ModifyLocalizationHandlerIsAvailableEvent.rst:79ReplyDoneFeature-109429-IntroducePSR-14ModifyLocalizationHandlerIsAvailableEvent.rst:80ReplyDone -
Garvin Hicking commented on patch set 4 03/30/26, 19:02
```suggestion This change introduces and dispatches the new PSR-14 ``````suggestion allow instances and extensions to overrule available state ``````suggestion for a handler based on the `LocalizationInstructions`. ``` -
core-ci voted on patch set 4 V +1 03/30/26, 19:10 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/99106
-
Stefan Bürk uploaded patch set 5
V +103/30/26, 19:12 -
Stefan Bürk commented on patch set 5 03/30/26, 19:12
Feature-109429-IntroducePSR-14ModifyLocalizationHandlerIsAvailableEvent.rst:17ReplyDone -
Garvin Hicking voted on patch set 5 CR +1 V +1 03/30/26, 19:18
-
Josua Vogel voted on patch set 5 CR +1 V +1 03/30/26, 19:22
-
Simon Schaufelberger commented on patch set 5 03/30/26, 19:25
convenientLocalizationHandlerRegistryTest.php:35can be privateLocalizationHandlerRegistryTest.php:109remove empty lineFeature-109429-IntroducePSR-14ModifyLocalizationHandlerIsAvailableEvent.rst:18use `:php:` -
core-ci voted on patch set 5 V +1 03/30/26, 19:27 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/99107
-
core-ci voted on patch set 3 V +1 03/30/26, 19:33 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/99105
-
Stefan Bürk commented on patch set 5 03/30/26, 19:38
Reply
DoneLocalizationHandlerRegistryTest.php:35ReplyDoneLocalizationHandlerRegistryTest.php:109ReplyDoneFeature-109429-IntroducePSR-14ModifyLocalizationHandlerIsAvailableEvent.rst:18ReplySee comment from @garvin with edit suggest. Keeping it now as is, this can be battled after 14.2 feature freaze in a doc change. Stopping a back and forth here now. Sorry. -
Stefan Bürk uploaded patch set 6
CR +1V +103/30/26, 19:39 -
Josua Vogel voted on patch set 6 CR +1 V +1 03/30/26, 19:40
-
Simon Schaufelberger voted on patch set 6 CR +1 V +1 03/30/26, 19:42
-
core-ci voted on patch set 6 V +1 03/30/26, 19:49 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/99110
-
Garvin Hicking voted on patch set 6 CR +1 V +1 03/30/26, 20:10
-
Oliver Hader voted on patch set 6 CR +1 V +1 03/30/26, 20:25
-
Guido Schmechel voted on patch set 6 CR +1 V +1 03/30/26, 20:29
-
Stefan Bürk voted on patch set 6 CR +2 V +2 03/30/26, 20:31
-
Stefan Bürk merged patch set 7 03/30/26, 20:31
Feature-109429-IntroducePSR-14ModifyLocalizationHandlerIsAvailableEvent.rst:14