Skip to content

Commit

Permalink
[TASK] Localize string for empty select, radio and checkboxes
Browse files Browse the repository at this point in the history
Related: #999
  • Loading branch information
mschwemer committed Sep 18, 2024
1 parent de4e72b commit a6d628b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Classes/Domain/Model/Field.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
}
Expand Down
3 changes: 3 additions & 0 deletions Resources/Private/Language/locallang.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
<trans-unit id="pleaseChoose" resname="pleaseChoose">
<source>Please choose...</source>
</trans-unit>
<trans-unit id="selectErrorEmpty" resname="selectErrorEmpty">
<source>Error, no options to show</source>
</trans-unit>
<trans-unit id="back" resname="back">
<source>Go back</source>
</trans-unit>
Expand Down

0 comments on commit a6d628b

Please sign in to comment.