- Tag links now use the actual taxonomy name for the URL and the displayed label is wrapped in a translation macro instead of the previous placeholder-based logic. - Simplify the taxonomy tag URL by passing the name directly and add translation support for the tag label. - Introduce a new taxon_name_i18n variable to translate the taxonomy name and swap in this localized value for the page title and “See all” link, while also simplifying the all-taxa URL by passing taxonomy.name directly to get_url. Signed-off-by: CHEN, CHUN <jim60105@gmail.com>
28 lines
1.3 KiB
HTML
28 lines
1.3 KiB
HTML
{% extends "base.html" %}
|
|
|
|
{% block content %}
|
|
{%- set date_format = macros_translate::translate(key="date_format", default="%B %d, %Y", language_strings=language_strings) -%}
|
|
{%- set date_locale = macros_translate::translate(key="date_locale", default="en_US", language_strings=language_strings) -%}
|
|
{%- set number_of_posts = term.pages | length -%}
|
|
|
|
{%- set taxon_name = taxonomy.name -%}
|
|
{%- set taxon_name_i18n = macros_translate::translate(key=taxonomy.name, default=taxonomy.name, language_strings=language_strings) -%}
|
|
{%- set term_name = "“" ~ term.name ~ "”" -%}
|
|
<h1>
|
|
{{- macros_translate::translate(key='posts_with_taxon', default='Posts with $TAXON $TERM', language_strings=language_strings) | replace(from="$TAXON", to=taxon_name_i18n) | replace(from="$TERM", to=term_name) -}}
|
|
<a href="{{ current_url ~ 'atom.xml' }}"><i class="icon feed"></i></a>
|
|
</h1>
|
|
|
|
<p>
|
|
<small>
|
|
<a href="{{- get_url(path=taxonomy.name, lang=lang) | lower -}}">
|
|
{{- macros_translate::translate(key="all_taxa", default="See all $TAXON", language_strings=language_strings) | replace(from="$TAXON", to=taxon_name_i18n) -}}
|
|
</a>
|
|
<br />
|
|
{{ macros_translate::translate(key='posts', number=number_of_posts, default='$NUMBER posts', language_strings=language_strings) }}
|
|
</small>
|
|
</p>
|
|
|
|
{% include "partials/articles.html" %}
|
|
{% endblock content %}
|