make story category titles translatable (fix #338)

This commit is contained in:
emmapeel 2024-03-12 15:10:29 +00:00 committed by Jérôme Charaoui
parent 42412625bb
commit b937bf5c18
2 changed files with 3 additions and 3 deletions

View File

@ -8,7 +8,7 @@
<div class="row">
<div class="container d-flex justify-content-center flex-wrap mb-3">
{% for id, item in bag('story-categories').items() %}
<div class="p-2"><a class="btn btn-outline-primary" href="#{{ id }}">{{ item.title }}</a></div>
<div class="p-2"><a class="btn btn-outline-primary" href="#{{ id }}">{{ _(item.title) }}</a></div>
{% endfor %}
</div>
</div>
@ -16,7 +16,7 @@
<div class="row">
<div class="container text-center">
<a name="{{ id }}" class="anchor"></a>
<h2 class="text-primary text-center mx-auto my-3">{{ item.title }}</h2>
<h2 class="text-primary text-center mx-auto my-3">{{ _(item.title) }}</h2>
</div>
</div>
<div class="container py-3 story-cards">

View File

@ -21,7 +21,7 @@
{{ this.body }}
<p class="font-italic">{{ _("{} is a pseudonym. This is an anonymous story submitted by a Tor user.").format(this.title) }}</p>
{%- for cat in this.category %}
<a class="btn btn-outline-primary small mt-3" href="../#{{ cat }}">{{ bag('story-categories')[cat].title }}</a>
<a class="btn btn-outline-primary small mt-3" href="../#{{ cat }}">{{ _(bag('story-categories')[cat].title) }}</a>
{%- endfor %}
</div>
</div>