[BUGFIX] Try to translate given help text of select items 83/57283/2
authorMathias Brodala <mbrodala@pagemachine.de>
Thu, 21 Jun 2018 10:11:43 +0000 (12:11 +0200)
committerStefan Neufeind <typo3.neufeind@speedpartner.de>
Sat, 30 Jun 2018 13:08:01 +0000 (15:08 +0200)
Use the LanguageService for help texts of select items.
This can be tested with the element 'select_checkbox_3' of the
styleguide extension.

Resolves: #78984
Releases: master, 8.7
Change-Id: Idb6e63547ac480b18fcb1ca997d5d07e4bcb4e81
Reviewed-on: https://review.typo3.org/57283
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Georg Tiefenbrunn <georg.tiefenbrunn@gmail.com>
Reviewed-by: Jan Helke <typo3@helke.de>
Reviewed-by: Joerg Boesche <typo3@joergboesche.de>
Reviewed-by: Stefan Neufeind <typo3.neufeind@speedpartner.de>
Tested-by: Stefan Neufeind <typo3.neufeind@speedpartner.de>
typo3/sysext/backend/Classes/Form/FormDataProvider/AbstractItemProvider.php

index 1052ed0..92ced0f 100644 (file)
@@ -1303,6 +1303,11 @@ abstract class AbstractItemProvider
             $value = strlen((string)$item[1]) > 0 ? $item[1] : '';
             $icon = $item[2] ?: null;
             $helpText = $item[3] ?: null;
+
+            if (is_string($helpText)) {
+                $helpText = $languageService->sL($helpText);
+            }
+
             $itemArray[$key] = [
                 $label,
                 $value,