From 32d965c5f40bd53b44f97fe78a273420117c5e9a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20B=C3=BCrk?= Date: Mon, 6 Jul 2026 08:04:22 +0200 Subject: [PATCH] [BUGFIX] DPL-158: Use static DeepL Write localization icon The `ApplyLocalizationModesEventListener` selected a TYPO3 core version aware icon identifier (`actions-localize-deepl-13` for v13, `actions-localize-deepl` otherwise). Both identifiers no longer exist and the localization mode was rendered without its icon. Use the static `actions-localize-deepl-write` icon registered in `Configuration/Icons.php` instead, matching the TYPO3 v14 `DeeplWriteLocalizationHandler`. The now obsolete `Typo3Version` lookup is removed. --- Core13/Event/Listener/ApplyLocalizationModesEventListener.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Core13/Event/Listener/ApplyLocalizationModesEventListener.php b/Core13/Event/Listener/ApplyLocalizationModesEventListener.php index 02ce7a4..fdff042 100644 --- a/Core13/Event/Listener/ApplyLocalizationModesEventListener.php +++ b/Core13/Event/Listener/ApplyLocalizationModesEventListener.php @@ -5,7 +5,6 @@ namespace WebVision\DeeplWrite\Core13\Event\Listener; use TYPO3\CMS\Core\Attribute\AsEventListener; -use TYPO3\CMS\Core\Information\Typo3Version; use WebVision\Deepl\Base\Event\GetLocalizationModesEvent; use WebVision\Deepl\Base\Localization\LocalizationMode; @@ -24,12 +23,11 @@ final class ApplyLocalizationModesEventListener )] public function __invoke(GetLocalizationModesEvent $event): void { - $majorVersion = (new Typo3Version())->getMajorVersion(); $writeMode = new LocalizationMode( identifier: 'deeplwrite', title: $event->getLanguageService()->sL('LLL:EXT:deepl_write/Resources/Private/Language/locallang.xlf:localize.educate.deeplwriteHeader'), description: $event->getLanguageService()->sL('LLL:EXT:deepl_write/Resources/Private/Language/locallang.xlf:localize.educate.deeplwrite'), - icon: ($majorVersion === 13 ? 'actions-localize-deepl-13' : 'actions-localize-deepl'), + icon: 'actions-localize-deepl-write', before: [], after: ['translate', 'copy'], );