Review main Merged

92748[TASK] Enhance XLIFF integrity checks to prevent locallang+messages

Garvin Hicking CR +2 V +2 Easy +38 −0 updated 02/18/26, 08:21

Commit message

To prevent cases as addressed in #108902 this patch adds a
integrity check to report CI failures when locallang.xlf and
messages.xlf coexist in the same directory (as only one file
is parsed).

Needs to be marged after #108902 is in, otherwise the check
already fails.

A test is adapted to fixate the curren situation.

Review

  • Code review CR +2 Done
    • Garvin Hicking +2
    • Oliver Klee +1
    • Benni Mack +1
    • Simon Schaufelberger +1
  • Verified V +2 Done
    • Garvin Hicking +2
    • Oliver Klee +1
    • Benni Mack +1
    • Simon Schaufelberger +1
    • core-ci +1 CI

Issues 2

Files 3

Review log 1621

  1. Garvin Hicking uploaded patch set 1 02/09/26, 08:13

  2. Mathias Brodala commented on patch set 1 02/09/26, 08:20

    Not sure if I fully understand but having both files is actually a valid usecase. E.g. if you want to support multiple TYPO3 versions and still use the newest options for newer TYPO3 versions. Also tools which generate these files could also output labels in both files to ensure compat with multiple TYPO3 versions. So what is the issue exactly? I'd expect only messages.xlf to be loaded if present and locallang.xlf ignored.
  3. Garvin Hicking commented on patch set 1 02/09/26, 08:29

    Reply

    Please see https://typo3.slack.com/archives/C03AM9R17/p1770543663809719 For multiple version support you'd use locallang.xlf. If you can fix the code to have locallang+message.xlf alongside, without too much performance impact, that would be lovely. But for now I want to prevent we create this situation in the core. We can discuss other approaches in slack or in a different patch? We can remove this check once we fix the root cause, but I'm not sure that will happen short-term.
  4. Mathias Brodala commented on patch set 1 02/09/26, 08:35

    Reply

    I'm fine with having this in TYPO3 to prevent accidents as mentioned. For 3rd party developers we should make sure to clearly mention this at suitable places.
  5. Garvin Hicking uploaded patch set 2 02/09/26, 08:38

  6. core-ci voted on patch set 1 V -1 02/09/26, 08:49 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/95442

  7. Oliver Klee commented on patch set 2 02/09/26, 08:53

    LanguageServiceTest.php:442

    Usually, assertions in tests should be as specific as possible. Let's make the comparison typesafe here: ```suggestion self::assertSame('test_translation_domain.messages:test.message', $subject->sL('test_translation_domain.messages:test.message')); ```
  8. core-ci voted on patch set 2 V -1 02/09/26, 09:13 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/95445

  9. Garvin Hicking commented on patch set 3 V -1 02/09/26, 09:31

    Published edit on patch set 2.
  10. core-ci voted on patch set 3 V -1 02/09/26, 09:39 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/95452

  11. Garvin Hicking uploaded patch set 4 V -1 02/09/26, 10:50

  12. Garvin Hicking commented on patch set 4 02/09/26, 10:50

    Reply

    I have amended the ReST file to contain a note about this.

    LanguageServiceTest.php:442 Reply

    Fix applied.
  13. core-ci voted on patch set 4 V -1 02/09/26, 10:58 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/95460

  14. Garvin Hicking rebased onto patch set 5 V -1 02/09/26, 13:33

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

  16. Oliver Klee voted on patch set 5 V +1 02/09/26, 14:54

  17. Benni Mack voted on patch set 5 CR +1 V +1 02/17/26, 22:12

  18. Oliver Klee voted on patch set 5 CR +1 02/17/26, 23:28

  19. Simon Schaufelberger voted on patch set 5 CR +1 V +1 02/18/26, 00:19

  20. Garvin Hicking voted on patch set 5 CR +2 V +2 02/18/26, 08:21

  21. Garvin Hicking merged patch set 6 02/18/26, 08:21