From 2e9b11973378c346ac424e4d915162807f4a81b3 Mon Sep 17 00:00:00 2001 From: ghost Date: Sat, 4 Nov 2023 07:03:53 +0200 Subject: [PATCH] fix comma separator --- templates/default/torrent/info.html.twig | 6 ++++-- templates/default/user/info.html.twig | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) 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 %}