Review main Merged

93397[FEATURE] Add generic TranslatorInterface

Benni Mack CR +2 V +2 Hard +601 −197 updated 03/27/26, 20:30

Commit message

This change adds a new "TranslatorInterface".

The main method "translate()" is prepared to also
deal with plurals, default values and alternative locales.

The second method "label()" is used where only have one full
string (like we know from "sL") like in TCA, or TypoScript,
but with the possibility of arguments, default value
and a custom locale.

EXT:indexed_search is now transformed properly to the new
domain syntax both on the PHP classes side as well as the
Fluid templates.

Review

  • Code review CR +2 Done
    • Benni Mack +2
    • Benjamin Franzke +1
    • Garvin Hicking +1
  • Verified V +2 Done
    • Benni Mack +2
    • Benjamin Franzke +1
    • Garvin Hicking +1
    • core-ci +1 CI

Issues 1

Files 21

Show 1 more file

Review log 1317

  1. Benni Mack uploaded patch set 1 03/27/26, 12:19

  2. core-ci voted on patch set 1 V +1 03/27/26, 12:32 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/98862

  3. Benni Mack uploaded patch set 2 V +1 03/27/26, 12:41

  4. core-ci voted on patch set 2 V -1 03/27/26, 12:51 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/98866

  5. Benjamin Franzke commented on patch set 2 03/27/26, 13:11

    ❤️

    LanguageServiceFactory.php:58

    Comment about "dependency injection" is outdated.
  6. Benni Mack uploaded patch set 3 V -1 03/27/26, 16:10

  7. Benni Mack commented on patch set 3 03/27/26, 16:10

    LanguageServiceFactory.php:58 Reply

    Done
  8. Benjamin Franzke voted on patch set 3 CR +1 03/27/26, 16:18

  9. core-ci voted on patch set 3 V -1 03/27/26, 16:49 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/98896

  10. Garvin Hicking commented on patch set 3 03/27/26, 18:32

    Feature-89334-AddGenericTranslatorInterface.rst:92

    ```suggestion * `my_extension.messages:my.key` ```

    Feature-89334-AddGenericTranslatorInterface.rst:93

    ```suggestion * `EXT:my_extension/Resources/Private/Language/locallang.xlf:my.key` ```

    Feature-89334-AddGenericTranslatorInterface.rst:94

    ```suggestion * `LLL:EXT:my_extension/Resources/Private/Language/locallang.xlf:my.key` ```

    Feature-89334-AddGenericTranslatorInterface.rst:96

    ```suggestion The `LLL:` prefix is optional and stripped before resolution. ``` Just a question: the double quotes come from Claude, yes? Because I see this very often now. Or do we have a helper tool that uses this syntax we try to avoid?
  11. Benni Mack uploaded patch set 4 CR +1 V -1 03/27/26, 18:39

  12. Garvin Hicking voted on patch set 4 CR +1 03/27/26, 18:45

  13. core-ci voted on patch set 4 V +1 03/27/26, 18:47 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/98910

  14. Garvin Hicking commented on patch set 4 V +1 03/27/26, 18:48

    Feature-89334-AddGenericTranslatorInterface.rst:92 Reply

    Done

    Feature-89334-AddGenericTranslatorInterface.rst:93 Reply

    Done

    Feature-89334-AddGenericTranslatorInterface.rst:94 Reply

    Done

    Feature-89334-AddGenericTranslatorInterface.rst:96 Reply

    Done
  15. Benjamin Franzke voted on patch set 4 CR +1 V +1 03/27/26, 20:10

  16. Benni Mack voted on patch set 4 CR +2 V +2 03/27/26, 20:30

  17. Benni Mack merged patch set 5 03/27/26, 20:30