[BUGFIX] Allow a languageKey in non-Extbase f:translate VH
Even though the <f:translate> ViewHelper has a "languageKey" argument, the parameter was only evaluated for Extbase requests. However, it should also be possible for non-Extbase Fluid parts - such as Fluid emails. The patch adds the "languageKey" handling and refactors the tests to rely on a fixture extension. Tests are added for "languageKey" scenarios including fallback chains. The new tests reveal a bug in extbase LocalizationUtility with fallback chains along the way, keeps according tests as skipped, and adds `@todo` for further investigation. Resolves: #101710 Related: #98377 Releases: main, 12.4 Change-Id: I5251a69c385b50d844d8e24b363109e03596cc6d Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/80614 Tested-by:core-ci <typo3@b13.com> Tested-by:
Christian Kuhn <lolli@schwarzbu.ch> Reviewed-by:
Christian Kuhn <lolli@schwarzbu.ch>
Showing
- typo3/sysext/fluid/Classes/ViewHelpers/TranslateViewHelper.php 8 additions, 4 deletions.../sysext/fluid/Classes/ViewHelpers/TranslateViewHelper.php
- typo3/sysext/fluid/Tests/Functional/Fixtures/Extensions/fluid_test/.gitignore 0 additions, 2 deletions...ests/Functional/Fixtures/Extensions/fluid_test/.gitignore
- typo3/sysext/fluid/Tests/Functional/Fixtures/Extensions/test_translate/Resources/Private/Language/de-AT.locallang.xlf 11 additions, 0 deletions..._translate/Resources/Private/Language/de-AT.locallang.xlf
- typo3/sysext/fluid/Tests/Functional/Fixtures/Extensions/test_translate/Resources/Private/Language/de.locallang.xlf 15 additions, 0 deletions...est_translate/Resources/Private/Language/de.locallang.xlf
- typo3/sysext/fluid/Tests/Functional/Fixtures/Extensions/test_translate/Resources/Private/Language/locallang.xlf 28 additions, 0 deletions...s/test_translate/Resources/Private/Language/locallang.xlf
- typo3/sysext/fluid/Tests/Functional/Fixtures/Extensions/test_translate/Resources/Public/Icons/Extension.svg 1 addition, 0 deletions...sions/test_translate/Resources/Public/Icons/Extension.svg
- typo3/sysext/fluid/Tests/Functional/Fixtures/Extensions/test_translate/composer.json 14 additions, 0 deletions...nctional/Fixtures/Extensions/test_translate/composer.json
- typo3/sysext/fluid/Tests/Functional/Fixtures/Extensions/test_translate/ext_emconf.php 21 additions, 0 deletions...ctional/Fixtures/Extensions/test_translate/ext_emconf.php
- typo3/sysext/fluid/Tests/Functional/ViewHelpers/TranslateViewHelperTest.php 156 additions, 22 deletions.../Tests/Functional/ViewHelpers/TranslateViewHelperTest.php
Please register or sign in to comment