Review main Merged

86846[BUGFIX] Fix LocalizationUtility in TS override mode not using defaults

Garvin Hicking CR +2 V +2 Normal +82 −2 updated 11/05/24, 07:47

Commit message

When using LocalizationUtility::translate in a context where
any TypoScript overrides via `_LOCAL_LANG` for the requested language
are set, a translation key lookup falls back to return "" (empty string),
even though the specifically requested translation key might not be
overridden at all.

In that case, a NULL value would be expected to detect missing
language keys (instead of empty values).

This patch will specifically check for a translation key to
exist in the `_LOCAL_LANG` TypoScript override.

Tests are added to verify this expected null value is now yielded.

Review

  • Code review CR +2 Done
    • Garvin Hicking +2
    • Georg Ringer +1
    • Markus Klein +1
    • Sebastian Iffland +1
  • Verified V +2 Done
    • Garvin Hicking +2
    • Georg Ringer +1
    • Markus Klein +1
    • core-ci +1 CI

Issues 1

Files 4

Review log 1417

  1. Garvin Hicking uploaded patch set 1 10/31/24, 13:11

  2. Garvin Hicking uploaded patch set 2 10/31/24, 13:12

  3. core-ci voted on patch set 1 V -1 10/31/24, 13:19 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/68920

  4. core-ci voted on patch set 2 V +1 10/31/24, 13:20 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/68921

  5. Markus Klein commented on patch set 2 10/31/24, 13:25

  6. Simon Schaufelberger voted on patch set 2 CR +1 V +1 11/03/24, 16:57

  7. Georg Ringer voted on patch set 2 CR +1 V +1 11/03/24, 18:30

  8. Nikita Hovratov voted on patch set 2 CR +1 11/03/24, 20:24

  9. Nikita Hovratov commented on patch set 2 CR 0 11/03/24, 20:26

    LocalizationUtilityTest.php:239

    method starting with uppercase character
  10. Garvin Hicking commented on patch set 3 CR +1 V +1 11/03/24, 22:29

    Published edit on patch set 2.
  11. core-ci voted on patch set 3 V +1 11/03/24, 22:35 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/69002

  12. Sebastian Iffland voted on patch set 3 CR +1 11/04/24, 06:52

  13. Markus Klein commented on patch set 3 11/04/24, 13:02

    LocalizationUtilityTest.php:239 Reply

    Done
  14. Markus Klein voted on patch set 3 CR +1 V +1 11/04/24, 13:03

  15. Georg Ringer voted on patch set 3 CR +1 V +1 11/04/24, 21:18

  16. Garvin Hicking voted on patch set 3 CR +2 V +2 11/05/24, 07:39

  17. Garvin Hicking merged patch set 4 11/05/24, 07:47