Review main Merged

80596[BUGFIX] Allow a languageKey in non-Extbase f:translate VH

Benni Mack CR +2 V +2 Hard +254 −28 updated 08/22/23, 11:56

Commit message

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.

Review

  • Code review CR +2 Done
    • Christian Kuhn +2
    • Torben Hansen +1
    • Andreas Kienast +1
    • Jörg Bösche +1
  • Verified V +2 Done
    • Christian Kuhn +2
    • Torben Hansen +1
    • Andreas Kienast +1
    • core-ci +1 CI

Issues 2

Files 9

Review log 1924

  1. Benni Mack uploaded patch set 1 08/18/23, 10:59

  2. core-ci voted on patch set 1 V +1 08/18/23, 11:06 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/45601

  3. Benni Mack updated the commit message in patch set 2 V +1 08/18/23, 14:41

  4. core-ci voted on patch set 2 V +1 08/18/23, 14:49 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/45607

  5. Torben Hansen voted on patch set 2 V +1 CR +1 08/19/23, 10:07

  6. Sybille Peters updated the commit message in patch set 3 CR +1 V +1 08/19/23, 11:39

  7. core-ci voted on patch set 3 V +1 08/19/23, 11:45 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/45618

  8. Torben Hansen voted on patch set 3 V +1 CR +1 08/21/23, 08:15

  9. Christian Kuhn commented on patch set 3 08/21/23, 13:56

    TranslateViewHelper.php:213

    Why Locale here? The languageKey argument is string, Localization\Locale is stringable, but does fluid actually accept this? If so, does it cast to string?
  10. Christian Kuhn commented on patch set 3 CR -1 08/21/23, 13:59

    I think it would be good to extend functional tests here to find out about details. Maybe it's time to go away from the indexed_search tests and have a dedicated fixture extension that we can use in FE context as well. I'll try to figure something out. -1 working on it.
  11. Andreas Kienast voted on patch set 3 CR +1 08/21/23, 14:02

  12. Christian Kuhn commented on patch set 3 08/22/23, 11:20

    TranslateViewHelper.php:213 Reply

    Yes, the VH does accept a locale object, so we'll keep this code. Next patch set comes with some tests that show this.
  13. Christian Kuhn uploaded patch set 4 CR +1 V +1 08/22/23, 11:28

  14. Christian Kuhn commented on patch set 4 08/22/23, 11:34

    .gitignore:2

    removing this useless file as drive-by.
  15. core-ci voted on patch set 4 V +1 08/22/23, 11:35 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/45667

  16. Christian Kuhn voted on patch set 4 V +1 CR +1 08/22/23, 11:39

  17. Christian Kuhn updated the commit message in patch set 5 CR +1 V +1 08/22/23, 11:40

  18. Christian Kuhn voted on patch set 5 V +1 CR +1 08/22/23, 11:40

  19. Torben Hansen voted on patch set 5 V +1 CR +1 08/22/23, 11:41

  20. Andreas Kienast voted on patch set 5 V +1 CR +1 08/22/23, 11:41

  21. core-ci voted on patch set 5 V +1 08/22/23, 11:48 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/45668

  22. Jörg Bösche voted on patch set 5 CR +1 08/22/23, 11:52

  23. Christian Kuhn voted on patch set 5 V +2 CR +2 08/22/23, 11:55

  24. Christian Kuhn merged patch set 6 08/22/23, 11:56