Review main Abandoned

91184[POC][FEATURE] Introduce JS Label Translator API for translation domains

Benni Mack CR 0 V 0 Hard +794 −11 updated 01/23/26, 15:26

Commit message

This change introduces a new translation API in JavaScript
that enables loading translation domains on-demand via AJAX,
replacing the need for the global TYPO3.lang object with
a modern, domain-based approach.

The API provides two main usage patterns:

1. Domain-specific instances: For modules using many labels from the
   same domain, create a reusable instance
2. One-off translations: For simple cases with single label lookups

Structure:

- Translator: Static factory class for creating domain instances
- DomainTranslator: Instance class for accessing labels in a domain
- TranslationCache: In-memory cache for loaded domains
- TranslationLoader: AJAX loader with request batching
- TranslationController: PHP backend for serving translations

The API is fully backward compatible. Existing code using TYPO3.lang
continues to work. The new API is opt-in for new development.

Some modules are migrated to see this:
- backend: sortable-table
- filelist: file-list-rename-handler

Review

  • Code review CR 0
  • Verified V 0
    • core-ci +1 CI

Files 16

Review log 68

  1. Benni Mack uploaded patch set 1 10/21/25, 11:37

  2. core-ci voted on patch set 1 V +1 10/21/25, 11:44 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/87178

  3. Benni Mack marked it work in progress 10/21/25, 12:03

  4. Nikita Hovratov commented on patch set 1 10/21/25, 16:35

    Wrong issue number? 😊
  5. Benni Mack updated the commit message in patch set 2 V +1 10/21/25, 18:58

  6. Benni Mack commented on patch set 2 10/21/25, 18:59

    Reply

    LOL. thx.
  7. core-ci voted on patch set 2 V +1 10/21/25, 19:07 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/87197

  8. Benni Mack abandoned the change 01/23/26, 15:26

    wont do it like this