92468[FEATURE] Support ICU MessageFormat for translations
Commit message
Review
-
Code review CR +2 Done
- Benni Mack +2
- Benjamin Franzke +1
- Garvin Hicking +1
- Anja Leichsenring +1
- Sven Liebert +1
-
Verified V +2 Done
- Benni Mack +2
- Benjamin Franzke +1
- Garvin Hicking +1
- Anja Leichsenring +1
- Sven Liebert +1
- core-ci +1 CI
Issues 1
Files 8
- typo3/sysext/core/Classes/Localization/LanguageService.php6+27 −1
- typo3/sysext/core/Documentation/Changelog/14.2/Feature-104546-SupportICUMessageFormatForPluralForms.rstnew+192 −0
- typo3/sysext/core/Tests/Functional/Fixtures/Extensions/test_localization/Resources/Private/Language/fr.locallang_icu.xlf4new+31 −0
- typo3/sysext/core/Tests/Functional/Fixtures/Extensions/test_localization/Resources/Private/Language/locallang_icu.xlfnew+25 −0
- typo3/sysext/core/Tests/Functional/Localization/LanguageServiceTest.php+112 −0
- typo3/sysext/extbase/Classes/Utility/LocalizationUtility.php+3 −1
- typo3/sysext/extensionmanager/Classes/Controller/ActionController.php+1 −1
- typo3/sysext/fluid/Classes/ViewHelpers/TranslateViewHelper.php+28 −7
Review log 2026
Show 1 earlier messages
-
Benni Mack uploaded patch set 1 01/22/26, 19:57
-
Benni Mack marked it work in progress 01/22/26, 19:57
-
core-ci voted on patch set 1 V -1 01/22/26, 20:06 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/94093
-
Garvin Hicking uploaded patch set 2
V -101/23/26, 10:32fix test fixture xliff -
core-ci voted on patch set 2 V +1 01/23/26, 10:39 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/94147
-
Benni Mack marked it ready for review 01/23/26, 21:11
-
Garvin Hicking commented on patch set 2 01/24/26, 11:24
LanguageService.php:285check out https://www.php.net/array_is_list to cut this significantly :)LanguageService.php:296gut feeling is the regexp might be too broad since the latter keys are optional? Wonder if is needed at all because this happens when we have named arguments but no formatting - what happens with the arguments in the vsprintf() fallback then, likely an error? So we might also maie that throw an exception because you use arguments on an ICU expection where there is none? -
Benni Mack uploaded patch set 3
V +101/24/26, 12:33 -
core-ci voted on patch set 3 V +1 01/24/26, 12:40 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/94252
-
Xavier Perseguers commented on patch set 3 02/11/26, 09:37
Thinking about it, I must admit I like the idea of something well-tested and easy to implement thanks to some PHP library. Minor changes in French :)fr.locallang_icu.xlf:23Téléchargé (with accents)fr.locallang_icu.xlf:27"Iel" would be the generic form, "Ils" is the 3rd plural form. "a aimé" (with an accent) -
Benjamin Franzke commented on patch set 3 02/20/26, 14:00
FYI: I work on the JavaScript counterpart/implementation in: > 92925: [WIP][TASK] Support ICU messages in JavaScript label API | https://review.typo3.org/c/Packages/TYPO3.CMS/+/92925 -
Benjamin Franzke uploaded patch set 4
V +102/23/26, 12:08 -
Benjamin Franzke commented on patch set 4 02/23/26, 12:08
Reply
DoneLanguageService.php:285ReplyDoneLanguageService.php:296ReplyI removed the regex to purely decide based on named parameter submission.fr.locallang_icu.xlf:23Replyit is just a fixture, but adapted, thx!fr.locallang_icu.xlf:27ReplyDone -
Benjamin Franzke uploaded patch set 5
CR +1V +102/23/26, 12:32 -
core-ci voted on patch set 4 V -1 02/23/26, 12:38 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/96567
-
core-ci voted on patch set 5 V +1 02/23/26, 13:07 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/96572
-
Benjamin Franzke voted on patch set 5 CR +1 V +1 02/23/26, 13:56
-
Garvin Hicking commented on patch set 5 CR +1 V +1 02/23/26, 14:48
Works for me, only one minor comment, but I can also live with the current implementation (maybe it's "safer" to use a regexp, because as the inline f:translate demo shows there might have been misuses implemented?!LanguageService.php:296Reply@ben@bnf.dev In the TranslateViewHelper.php file the regexp still exists. I would tend to also use array_is_list there, what do you think? -
Benjamin Franzke uploaded patch set 6
CR +1V +102/23/26, 15:14 -
Benjamin Franzke commented on patch set 6 CR +1 V +1 02/23/26, 15:14
LanguageService.php:296ReplyAck, we should adapt that as well! Thx & done! -
Garvin Hicking voted on patch set 6 CR +1 V +1 02/23/26, 15:27
-
core-ci voted on patch set 6 V +1 02/23/26, 15:27 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/96593
-
Sven Liebert voted on patch set 6 CR +1 V +1 02/23/26, 17:50
-
Anja Leichsenring voted on patch set 6 CR +1 V +1 02/23/26, 17:55
-
Benni Mack commented on patch set 6 CR +2 V +2 02/23/26, 19:23
thank you! -
Benni Mack merged patch set 7 02/23/26, 19:23