fix missing translations file

This commit is contained in:
Jesús 2020-06-12 15:24:40 -05:00
parent 7cae35947e
commit 26f8786b3f
No known key found for this signature in database
GPG Key ID: F6EE7BC59A315766

View File

@ -0,0 +1,16 @@
{% macro translations_for(article) %}
{% if article.translations %}
{{ _('Traducciones:') }}
{% for translation in article.translations %}
<a href="{{ SITEURL }}/{{ translation.url }}" hreflang="{{ translation.lang }}">{{ LANGUAGE_CODES[translation.lang] }}</a>{% if not loop.last %},{% endif %}
{% endfor %}
{% endif %}
{% endmacro %}
{% macro entry_hreflang(entry) %}
{% if entry.translations %}
{% for translation in entry.translations %}
<link rel="alternate" hreflang="{{ translation.lang }}" href="{{ SITEURL }}/{{ translation.url }}">
{% endfor %}
{% endif %}
{% endmacro %}