Review main Merged

93036[BUGFIX] Use numerical f:translate arguments instead named arguments

Garvin Hicking CR +2 V +2 Easy +7 −7 updated 03/02/26, 15:20

Commit message

With #102158 a syntax of f:translate arguments was utilized that
wrongly utilizes named arguments. These are now interpreted as
ICU syntax, and will not resolve "%1$d" or "%s" placeholders
anymore.

With this patch, properly numerically indexed arrays are used
to enforce usual sprintf() resolving.

No other core usages have been found with a manual search for
all f:translate arguments with these regexps:

<f:translate[^>]+arguments=
\{f:translate[^>]+arguments:

Review

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

Issues 2

Files 3

Review log 1013

  1. Garvin Hicking uploaded patch set 1 03/02/26, 13:18

  2. Garvin Hicking uploaded patch set 2 03/02/26, 13:23

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

  4. Garvin Hicking updated the commit message in patch set 3 03/02/26, 13:28

  5. Benjamin Franzke commented on patch set 2 03/02/26, 13:28

    I guess you ran this throw $IDE. Did it check multiline usages?
  6. core-ci voted on patch set 2 V +1 03/02/26, 13:33 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/97108

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

  8. Garvin Hicking commented on patch set 3 03/02/26, 13:48

    Reply

    Yes, I used the "m" regexp multiline operator, and manually went through all 102+33 results. Zero AI tokens were involved in the process of checking this. ;)
  9. Benjamin Franzke commented on patch set 3 CR +1 V +1 03/02/26, 13:54

    Reply

    Haven't found more via: ``` find typo3 -name '*.fluid.html' | while read file; do sed -e :a -e '/$/N; s/\n/ /; ta' $file | grep "<f:translate[^>]*arguments=\"{[ \\t\\n]*[^ \\t\\n0-9]"; done ``` and ``` find typo3 -name '*.fluid.html' | while read file; do sed -e :a -e '/$/N; s/\n/ /; ta' $file | grep "{f:translate([^}]*arguments:[ ]*'{[ \\t\\n]*[^ \\t\\n0-9]"; done ```
  10. Riccardo De Contardi commented on patch set 3 V +1 03/02/26, 14:01

    verified on media module
  11. Benni Mack voted on patch set 3 CR +1 V +1 03/02/26, 14:08

  12. Garvin Hicking voted on patch set 3 CR +2 V +2 03/02/26, 15:20

  13. Garvin Hicking merged patch set 4 03/02/26, 15:20