Review 13.4 Merged

94095[BUGFIX] Ensure correct TS overrides for labels

Markus Klein CR +2 V +2 Normal +42 −15 updated 06/10/26, 09:54

Commit message

The current implementation had several flaws, which are all fixed now.

1.) The assumption, that labels not having a translation
in the target language, will adhere to a TS override for the default
language is wrong. This would have to be applied for all
languages in the fallback chain, which is not possible
in the current code structure. We don't know which language
in the fallback chain contributed a value.

2.) LanguageService::getTypo3LanguageKey returns "en"
if a proper EN locale is present. This needs special
treatment in the overrides calculation, because there
"default" and "en" are actually the same.

3.) The LanguageService::overrideLabels array used a
completely wrong data structure, which made the array
override with the data structure from the XLF files
completely useless. Things only worked, because TS overrides where
inherited within the overrides from default, which covered a lot of
cases by accident.
This is also the reason, why the fixed bug actually occurred.

This change now fixes those flaws, aligns the test assumptions and adds
phpstan info too, for better understanding.

Review

  • Code review CR +2 Done
    • Christian Kuhn +2
  • Verified V +2 Done
    • Christian Kuhn +2
    • Oliver Klee +1
    • core-ci +1 CI

Issues 1

Files 3

Review log 1522

  1. Markus Klein uploaded patch set 1 05/15/26, 12:32

  2. core-ci voted on patch set 1 V -1 05/15/26, 12:43 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/102056

  3. Markus Klein uploaded patch set 2 V -1 05/15/26, 12:58

  4. Markus Klein uploaded patch set 3 05/15/26, 12:59

  5. core-ci voted on patch set 2 V -1 05/15/26, 13:09 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/102057

  6. core-ci voted on patch set 3 V -1 05/15/26, 13:10 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/102058

  7. Markus Klein uploaded patch set 4 V -1 05/15/26, 14:07

  8. Markus Klein uploaded patch set 5 05/15/26, 14:09

  9. Markus Klein uploaded patch set 6 05/15/26, 14:12

  10. core-ci voted on patch set 4 V -1 05/15/26, 14:15 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/102059

  11. core-ci voted on patch set 5 V +1 05/15/26, 14:18 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/102060

  12. core-ci voted on patch set 6 V +1 05/15/26, 14:19 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/102061

  13. Oliver Klee voted on patch set 6 V +1 05/15/26, 14:30

  14. Simon Schaufelberger voted on patch set 6 CR +1 V +1 05/15/26, 17:25

  15. Markus Klein uploaded patch set 7 CR +1 V +1 05/21/26, 14:17

  16. core-ci voted on patch set 7 V +1 05/21/26, 14:23 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/102321

  17. Oliver Klee voted on patch set 7 V +1 05/21/26, 14:32

  18. Markus Klein commented on patch set 7 CR -1 06/04/26, 21:27

    Work for main in progress, has to wait
  19. Markus Klein voted on patch set 7 CR 0 06/06/26, 06:04

  20. Markus Klein commented on patch set 7 06/06/26, 06:04

    Reply

    Done
  21. Christian Kuhn voted on patch set 7 CR +2 V +2 06/10/26, 09:54

  22. Christian Kuhn merged patch set 8 06/10/26, 09:54