Review main Merged

92871[TASK] Use shared label for collapse_state_search.numberOfSearchMatches

Benjamin Franzke CR +2 V +2 Easy +10 −22 updated 03/26/26, 16:08

Commit message

Three components shipped an own translation and all were missing a
proper plural form. Streamline to use a shared label based on
the new JavaScript label dependency API (#108941).

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 2

Files 10

Review log 2648

Show 1523 earlier messages
  1. Benjamin Franzke uploaded patch set 1 02/17/26, 19:02

  2. Benjamin Franzke wrote 02/17/26, 19:02

    Hashtag added: labels
  3. core-ci voted on patch set 1 V +1 02/17/26, 19:14 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/96078

  4. Benjamin Franzke uploaded patch set 2 V +1 02/19/26, 12:58

  5. Benjamin Franzke marked it ready for review 02/19/26, 12:58

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

  7. Benjamin Franzke uploaded patch set 3 V -1 02/19/26, 13:21

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

  9. Garvin Hicking commented on patch set 3 02/20/26, 00:05

    collapse-state-search.ts:108

    This "one is the only number where a plural form differs" is not true for polish, russian, czech languages - plus arabic. I think having the "match(es)" form is better then for i18n? In PHP we could use ICU/intl probably, but don't know what JS allows...
  10. Benjamin Franzke commented on patch set 3 02/20/26, 07:32

    collapse-state-search.ts:108 Reply

    I actually tried to find an existing case in PHP but only found other usages of the `.plural` suffix. Can you point me to one? I'd ideally like to model ICU plural handling in JavaScript in future..
  11. Garvin Hicking commented on patch set 3 02/20/26, 11:59

    collapse-state-search.ts:108 Reply

    Sure, would this PHP help you: ``` <?php $message = '{count, plural, one {# match} other {# matches} }'; echo "EN:\n"; $formatter = new MessageFormatter('en', $message); echo $formatter->format(['count' => 1]) . "\n"; // 1 match echo $formatter->format(['count' => 2]) . "\n"; // 2 matches echo $formatter->format(['count' => 0]) . "\n"; // 0 matches echo "====\n"; $message = '{count, plural, one {# mecz} few {# mecze} many {# meczów} other {# meczu} }'; $formatter = new MessageFormatter('pl', $message); echo $formatter->format(['count' => 1]) . "\n"; // 1 mecz echo $formatter->format(['count' => 2]) . "\n"; // 2 mecze echo $formatter->format(['count' => 5]) . "\n"; // 5 meczów echo $formatter->format(['count' => 12]) . "\n"; // 12 meczów ``` Check out https://phrase.com/blog/posts/guide-to-the-icu-message-format/ in the "Plural" section, this was my main reading material while checking out https://review.typo3.org/c/Packages/TYPO3.CMS/+/92468 https://review.typo3.org/c/Packages/TYPO3.CMS/+/85509
  12. Benjamin Franzke commented on patch set 3 02/20/26, 12:22

    collapse-state-search.ts:108 Reply

    Alright thanks! I somehow missed that Benni pushed https://review.typo3.org/c/Packages/TYPO3.CMS/+/92468 So yeah, that's what we want in JS as well and therefore I'll look into providing that.
  13. Garvin Hicking commented on patch set 3 02/20/26, 12:46

    collapse-state-search.ts:108 Reply

    Cool - Benni picked the approach you linked for plural forms and is backed by the localization team if I read that right. I know he wants to wrap up this patch for v14. I'm a bit afraid on what kind of huge library we'd need to pull in from the JS side, or how we could prepare this server-side, so I'm very excited about what you'll come up with 😄
  14. Benjamin Franzke uploaded patch set 4 V +1 02/20/26, 13:58

  15. Benjamin Franzke commented on patch set 4 02/20/26, 14:05

    collapse-state-search.ts:108 Reply

    Yea, for the time being we need to pull a lib, but there is standardization going on to implement it in EcmaScript: https://github.com/tc39/proposal-intl-messageformat Therefore we'll use https://www.npmjs.com/package/intl-messageformat which implements that API as kind of a polyfill. It will be a cached library and it supported pre-parsed AST, so it looks quite doable.
  16. core-ci voted on patch set 4 V -1 02/20/26, 14:38 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/96356

  17. core-ci voted on patch set 4 V +1 02/20/26, 15:00 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/96356

  18. Benjamin Franzke rebased onto patch set 5 V +1 02/20/26, 22:04

  19. core-ci voted on patch set 5 V -1 02/20/26, 22:27 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/96413

  20. Benjamin Franzke uploaded patch set 6 V -1 02/21/26, 08:59

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

  22. Benjamin Franzke rebased onto patch set 7 V -1 02/21/26, 09:37

  23. core-ci voted on patch set 7 V -1 02/21/26, 09:56 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/96443

  1. Benjamin Franzke uploaded patch set 8 V -1 02/21/26, 10:20

  2. core-ci voted on patch set 8 V +1 02/21/26, 10:29 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/96445

  3. Benjamin Franzke rebased onto patch set 9 V +1 02/21/26, 15:57

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

  5. Benjamin Franzke rebased onto patch set 10 V +1 02/21/26, 20:44

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

  7. Benjamin Franzke commented on patch set 10 02/22/26, 14:26

    collapse-state-search.ts:108 Reply

    Done: 92925: [TASK] Support ICU MessageFormat in JavaScript label API | https://review.typo3.org/c/Packages/TYPO3.CMS/+/92925
  8. core-ci commented on patch set 10 02/22/26, 14:52 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/96469

  9. core-ci voted on patch set 10 V +1 02/22/26, 15:08 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/96469

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

  11. core-ci voted on patch set 11 V -1 02/23/26, 11:00 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/96552

  12. core-ci commented on patch set 11 02/23/26, 11:24 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/96552

  13. core-ci commented on patch set 11 02/23/26, 11:42 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/96552

  14. core-ci commented on patch set 11 02/23/26, 11:49 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/96552

  15. core-ci commented on patch set 11 02/23/26, 12:36 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/96552

  16. core-ci commented on patch set 11 02/23/26, 12:44 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/96552

  17. core-ci commented on patch set 11 02/23/26, 13:26 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/96552

  18. core-ci commented on patch set 11 02/23/26, 13:45 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/96552

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

  20. Benni Mack commented on patch set 11 02/23/26, 20:16

    TemplateCest.php:254

    good stuff!
  21. Benni Mack voted on patch set 11 CR +1 V +1 02/23/26, 21:20

  22. Benjamin Kott voted on patch set 11 CR +1 V +1 02/24/26, 10:30

  23. Benjamin Franzke commented on patch set 11 CR +2 V +2 02/24/26, 10:34

    TemplateCest.php:254 Reply

    Done
  24. Benjamin Franzke merged patch set 12 02/24/26, 10:34

  25. Simon Schaufelberger commented on patch set 11 CR +1 V +1 02/24/26, 10:34

    TemplateCest.php:254 Reply

    Really cool!