Review main Merged

92925[TASK] Support ICU MessageFormat in JavaScript label API

Benjamin Franzke CR +2 V +2 Hard +379 −38 updated 02/24/26, 10:14

Commit message

The existing variable argument placeholders are
extended to allow ICU Message Format, which means that
named parameters can be supplied as a JavaScript object.

A new `label.render()` method is introduced that allows
to rendering label as parts, which can be integrated
into lit in order to replace previous `unsafeHTML()`
usages. (xml-like tags in labels are rendered via
a supplied renderer, which itself can use lit to render).

Also `string` arguments can receive `TemplateResult`s as arguments,
allowing to inject securly rendered elements into label
placeholders.

Commands executed:

  npm install --save intl-messageformat
  npm run build

Review

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

Issues 3

Files 28

Show 8 more files

Review log 2950

Show 1325 earlier messages
  1. Benjamin Franzke uploaded patch set 1 02/20/26, 13:58

  2. Benjamin Franzke commented on patch set 1 02/20/26, 14:02

    We may also see if we can remove the `%s/%d` parsing in here and only support ICU labels. I'd probably wait to see how many usages we have in JS in total and decide based on that, since that means we need to create new labels for the ones that need to be migrated.
  3. Benjamin Franzke wrote 02/20/26, 14:05

    Hashtag added: labels
  4. core-ci voted on patch set 1 V -1 02/20/26, 14:36 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/96357

  5. core-ci commented on patch set 1 02/20/26, 15:01 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/96357

  6. Benjamin Franzke updated the commit message in patch set 2 V -1 02/20/26, 15:24

  7. core-ci voted on patch set 2 V +1 02/20/26, 15:35 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/96372

  8. Benjamin Franzke uploaded patch set 3 V +1 02/20/26, 21:09

  9. core-ci voted on patch set 3 V -1 02/20/26, 21:24 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/96408

  10. core-ci commented on patch set 3 02/20/26, 21:30 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/96408

  11. core-ci commented on patch set 3 02/20/26, 21:42 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/96408

  12. Benjamin Franzke uploaded patch set 4 V -1 02/20/26, 22:04

  13. Benjamin Franzke commented on patch set 4 02/20/26, 22:07

    Reply

    will keep for now.
  14. core-ci voted on patch set 4 V -1 02/20/26, 22:44 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/96412

  15. Benjamin Franzke uploaded patch set 5 V -1 02/21/26, 01:16

  16. core-ci voted on patch set 5 V +1 02/21/26, 01:31 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/96424

  17. Benjamin Franzke rebased onto patch set 6 V +1 02/21/26, 08:59

  18. core-ci voted on patch set 6 V +1 02/21/26, 09:12 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/96438

  19. Benjamin Franzke uploaded patch set 7 V +1 02/21/26, 09:37

  20. core-ci voted on patch set 7 V +1 02/21/26, 10:17 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/96442

  21. Benjamin Franzke uploaded patch set 8 V +1 02/21/26, 15:43

  22. Benjamin Franzke uploaded patch set 9 02/21/26, 15:49

  23. core-ci voted on patch set 8 V +1 02/21/26, 16:00 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/96455

  24. core-ci voted on patch set 9 V +1 02/21/26, 16:26 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/96457

  25. Benjamin Franzke uploaded patch set 10 V +1 02/21/26, 16:38

  1. Benjamin Franzke uploaded patch set 11 02/21/26, 16:40

  2. Benjamin Franzke uploaded patch set 12 02/21/26, 16:48

  3. core-ci voted on patch set 10 V +1 02/21/26, 16:50 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/96461

  4. core-ci voted on patch set 11 V +1 02/21/26, 16:53 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/96462

  5. core-ci voted on patch set 12 V +1 02/21/26, 16:59 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/96463

  6. Benjamin Franzke uploaded patch set 13 V +1 02/21/26, 19:01

  7. core-ci voted on patch set 13 V +1 02/21/26, 19:19 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/96468

  8. Benjamin Franzke rebased onto patch set 14 V +1 02/23/26, 10:19

  9. core-ci voted on patch set 14 V -1 02/23/26, 10:51 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/96551

  10. core-ci voted on patch set 14 V +1 02/23/26, 11:13 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/96551

  11. Benni Mack voted on patch set 14 CR +1 V +1 02/23/26, 20:15

  12. Benjamin Franzke uploaded patch set 15 CR +1 V +1 02/23/26, 20:54

    Resolve Merge-Conflict
  13. core-ci voted on patch set 15 V +1 02/23/26, 21:08 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/96617

  14. Benni Mack voted on patch set 15 CR +1 V +1 02/23/26, 21:19

  15. Benjamin Kott commented on patch set 15 02/23/26, 21:29

    label-provider-test.ts:65

    this does not respect the date and time config of the backend
  16. Benjamin Franzke uploaded patch set 16 CR +1 V +1 02/23/26, 22:40

  17. Benjamin Franzke commented on patch set 16 02/23/26, 22:40

    label-provider-test.ts:65 Reply

    I've now mapped the "medium" preset to SYS.ddmmyy and SYS.hhmm. We do not have a corresponding setting for the date/time Intl presets short/long/full. I'd like to replace the entirety of configuring formats by configuring time-locales in future – see https://review.typo3.org/c/Packages/TYPO3.CMS/+/85262 – in order basically always use locale-based mapping. Anyway, supporting "medium" should be fine for now. Note that timezones were already respected.
  18. core-ci voted on patch set 16 V +1 02/23/26, 22:50 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/96655

  19. Benni Mack voted on patch set 16 CR +1 V +1 02/24/26, 07:48

  20. Benjamin Franzke uploaded patch set 17 CR +1 V +1 02/24/26, 08:07

  21. core-ci voted on patch set 17 V +1 02/24/26, 08:20 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/96680

  22. Benni Mack voted on patch set 17 CR +1 V +1 02/24/26, 08:47

  23. Benjamin Kott voted on patch set 17 CR +1 V +1 02/24/26, 10:13

  24. Benjamin Franzke voted on patch set 17 CR +2 V +2 02/24/26, 10:14

  25. Benjamin Franzke merged patch set 18 02/24/26, 10:14