diff --git a/templates/default/torrent/info.html.twig b/templates/default/torrent/info.html.twig index 9560e68..10f8721 100644 --- a/templates/default/torrent/info.html.twig +++ b/templates/default/torrent/info.html.twig @@ -344,7 +344,8 @@
{% if torrent.locales %}
- {% for i, locale in torrent.locales | sort %}{% if i > 0 %},{% endif %} {{ locale | locale_name(locale) | u.title }}{% endfor %} + {% set i = 0 %} + {% for locale in torrent.locales | sort %}{% if i > 0 %},{% endif %} {{ locale | locale_name(locale) | u.title }}{% set i = i + 1 %}{% endfor %}
{% endif %}
@@ -360,7 +361,8 @@
{% if torrent.categories %}
- {% for i, category in torrent.categories | sort %}{% if i > 0 %},{% endif %} {{ category | u.title }}{% endfor %} + {% set i = 0 %} + {% for category in torrent.categories | sort %}{% if i > 0 %},{% endif %} {{ category | u.title }}{% set i = i + 1 %}{% endfor %}
{% endif %}
diff --git a/templates/default/user/info.html.twig b/templates/default/user/info.html.twig index 5893fd3..dcc72cf 100644 --- a/templates/default/user/info.html.twig +++ b/templates/default/user/info.html.twig @@ -172,7 +172,8 @@ {{ 'Languages' | trans }} - {% for i, locale in user.locales | sort %}{% if i > 0 %},{% endif %} {{ locale | locale_name(locale) | u.title }}{% endfor %} + {% set i = 0 %} + {% for locale in user.locales | sort %}{% if i > 0 %},{% endif %} {{ locale | locale_name(locale) | u.title }}{% set i = i + 1 %}{% endfor %} @@ -180,7 +181,8 @@ {{ 'Categories' | trans }} - {% for i, category in user.categories | sort %}{% if i > 0 %},{% endif %} {{ category | u.title }}{% endfor %} + {% set i = 0 %} + {% for category in user.categories | sort %}{% if i > 0 %},{% endif %} {{ category | u.title }}{% set i = i + 1 %}{% endfor %}