From a6d628b3da76049de70c2467856ad9782819246c Mon Sep 17 00:00:00 2001 From: Marcus Schwemer Date: Wed, 18 Sep 2024 12:51:35 +0200 Subject: [PATCH] [TASK] Localize string for empty select, radio and checkboxes Related: in2code-de/powermail#999 --- Classes/Domain/Model/Field.php | 3 ++- Resources/Private/Language/locallang.xlf | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Classes/Domain/Model/Field.php b/Classes/Domain/Model/Field.php index d57d2565b..b2377b7f2 100644 --- a/Classes/Domain/Model/Field.php +++ b/Classes/Domain/Model/Field.php @@ -8,6 +8,7 @@ use In2code\Powermail\Exception\DeprecatedException; use In2code\Powermail\Utility\BackendUtility; use In2code\Powermail\Utility\FrontendUtility; +use In2code\Powermail\Utility\LocalizationUtility; use In2code\Powermail\Utility\TemplateUtility; use In2code\Powermail\Utility\TypoScriptUtility; use TYPO3\CMS\Core\Utility\ArrayUtility; @@ -691,7 +692,7 @@ protected function optionArray(string $string, string $typoScriptObjectPath, boo $string = TypoScriptUtility::parseTypoScriptFromTypoScriptPath($typoScriptObjectPath); } if (empty($string)) { - $string = 'Error, no options to show'; + $string = LocalizationUtility::translate('selectErrorEmpty'); } return $this->buildOptions($string, $parse); } diff --git a/Resources/Private/Language/locallang.xlf b/Resources/Private/Language/locallang.xlf index 1af53ddb1..4622c22b4 100644 --- a/Resources/Private/Language/locallang.xlf +++ b/Resources/Private/Language/locallang.xlf @@ -6,6 +6,9 @@ Please choose... + + Error, no options to show + Go back