In your translation file you should write this:
{0} Comments| {1} Comment| ]1,Inf] Comments: "{0} Kommentare| {1} Kommentar| ]1,Inf] Kommentare"
UPDATE: An xliff example that works for me:
<trans-unit id="search.results.summary"> <source>search.results.summary</source> <target>{0}Pas d'annotations trouvée pour "%search_text%"|{1}Une annotation trouvée pour "%search_text%"|]1,Inf]%search_count% annotations trouvées pour "%search_text%"</target> </trans-unit>
How do I use it:
<h2>{{ 'search.results.summary' | transchoice(search_count, { '%search_text%': search_text, '%search_count%': search_count}) }}</h2>
As you can see, I do not use complex notation as a source for my translation, since it is rather useless and will make the template less readable. Instead, I put a line separated by a dot representing the semantic value of my line.
In your case, I think the right thing to use would be something like this:
comment.summary: "{0} Kommentare|{1} Kommentar|]1,Inf] Kommentare"
and
{% transchoice post['comments']['count'] %} 'comment.summary' {% endtranschoice %}
Good luck.
source share