[BUGFIX] Resolve default value in f:translate on time
Some components in the Core allow to either define locallang references or static labels. To process them in a template, usually the f:translate ViewHelper is used. Since the value will be dynamically and a static label as "key" will lead to an exception in non extbase context, the dynamic value must also be defined as the default, which will be used by the ViewHelper, in case the "key" can not be resolved. There are two possibilities to define the default. Either by setting the "default" attribute or by adding the value as tag content. Latter failed since #96473 because the tag content was resolved too late. The previous behaviour is now restored by evaluating a possible default value before processing the "key". Resolves: #96964 Related: #96473 Releases: main Change-Id: If932d2de14b8b58005051a03ccf7be290b66ddd9 Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/73599 Tested-by:core-ci <typo3@b13.com> Tested-by:
Christian Kuhn <lolli@schwarzbu.ch> Tested-by:
Stefan Bürk <stefan@buerk.tech> Tested-by:
Oliver Bartsch <bo@cedev.de> Reviewed-by:
Christian Kuhn <lolli@schwarzbu.ch> Reviewed-by:
Stefan Bürk <stefan@buerk.tech> Reviewed-by:
Oliver Bartsch <bo@cedev.de>
Showing
- typo3/sysext/fluid/Classes/ViewHelpers/TranslateViewHelper.php 6 additions, 5 deletions.../sysext/fluid/Classes/ViewHelpers/TranslateViewHelper.php
- typo3/sysext/fluid/Tests/Functional/ViewHelpers/TranslateViewHelperTest.php 9 additions, 0 deletions.../Tests/Functional/ViewHelpers/TranslateViewHelperTest.php
Please register or sign in to comment