Sfoglia il codice sorgente

Add "and" before the last item in the translation and remove full stop after the last item

Talha Mansoor 11 anni fa
parent
commit
dcc35780ee
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. 1 1
      templates/_includes/translations.html

+ 1 - 1
templates/_includes/translations.html

@@ -3,7 +3,7 @@
 <p id="list-of-translations">
 This post is also available in:
     {% for translation in article.translations %}
-    <a href="{{ SITEURL }}/{{ translation.url }}">{{ translation.lang }}</a>{%if not loop.last %}, {% else %}.{% endif %}
+    <a href="{{ SITEURL }}/{{ translation.url }}">{{ translation.lang }}</a>{% if loop.index0 + 2 == loop.length %} and{% elif not loop.last %}, {% endif %}
     {% endfor %}
 </p>
 {% endif %}