I'm working with Symfony 6.1.1 + php8.1.7 and have a problem with translations (XLIFF)
If the translation file is without translation all fine but pluralization won't work correctly with the translation key in the file
Translation call in Twig
{{ "{0}Any item found|{1}One item found|]1,Inf[ Found %count% items" | trans({'%count%': paginated_data.totalItemCount}) }}
Result with deleted translation from .xlf
And result with existing translation in the file (In the picture you can see, that translator gives the translation from the correct target block)
There is part of the xliff file with translation
<trans-unit id="Y9p7sja1" resname="{0}Any item found|{1}One item found|]1,Inf[ Found %count% items">
<source>{0}Any item found|{1}One item found|]1,Inf[ Found %count% items</source>
<target>{0}Any item found1|{1}One item found2|]1,Inf[ Found %count% items3</target>
</trans-unit>
In debug panel, all is fine and Symfony says that pluralization working
The answer much simplest than i've expected.
Symofny XLIFF format for translations doesn't support pecent "%" sign for mark variables, it means that you must to change percent to some another sign like bracers "{}" and it's going to be work.
In the previous translation format, placeholders were often wrapped in % (e.g. %name%). This % character is no longer valid with the ICU MessageFormat syntax, so you must rename your parameters if you are upgrading from the previous format.
<trans-unit id="Y9p7sja1" resname="{0}Any item found|{1}One item found|]1,Inf[ Found {count} items">
<source>{0}Any item found|{1}One item found|]1,Inf[ Found {count} items</source>
<target>{0}Any item found1|{1}One item found2|]1,Inf[ Found {count} items3</target>
</trans-unit>