mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-11-26 03:21:05 +00:00
Use translation snippet
This commit is contained in:
parent
150756dbd0
commit
5fd0115216
3 changed files with 8 additions and 20 deletions
|
@ -16,10 +16,7 @@
|
|||
{% with shelf_counter=forloop.counter %}
|
||||
<li>
|
||||
<p>
|
||||
{% if shelf.identifier == 'to-read' %}{% trans "To Read" %}
|
||||
{% elif shelf.identifier == 'reading' %}{% trans "Currently Reading" %}
|
||||
{% elif shelf.identifier == 'read' %}{% trans "Read" %}
|
||||
{% else %}{{ shelf.name }}{% endif %}
|
||||
{% include "snippets/translated_shelf_name.html" with shelf=shelf %}
|
||||
</p>
|
||||
<div class="tabs is-small is-toggle">
|
||||
<ul>
|
||||
|
|
|
@ -25,10 +25,7 @@
|
|||
|
||||
<button class="button is-fullwidth is-small shelf-option is-radiusless is-white" type="submit" {% if shelf.identifier == current.identifier %}disabled{% endif %}>
|
||||
<span>
|
||||
{% if shelf.identifier == 'to-read' %}{% trans "To Read" %}
|
||||
{% elif shelf.identifier == 'reading' %}{% trans "Currently Reading" %}
|
||||
{% elif shelf.identifier == 'read' %}{% trans "Read" %}
|
||||
{% else %}{{ shelf.name }}{% endif %}
|
||||
{% include "snippets/translated_shelf_name.html" with shelf=shelf %}
|
||||
</span>
|
||||
</button>
|
||||
</form>
|
||||
|
|
|
@ -1,16 +1,10 @@
|
|||
{% load i18n %}
|
||||
{% if is_self %}
|
||||
{% if shelf.identifier == 'to-read' %}
|
||||
{% trans "To Read" %}
|
||||
{% elif shelf.identifier == 'reading' %}
|
||||
{% trans "Currently Reading" %}
|
||||
{% elif shelf.identifier == 'read' %}
|
||||
{% trans "Read" %}
|
||||
{% elif shelf.identifier == 'all' %}
|
||||
{% trans "Your books" %}
|
||||
{% if shelf.identifier == 'all' %}
|
||||
{% trans "Your books" %}
|
||||
{% else %}
|
||||
{% include "snippets/translated_shelf_name.html" with shelf=shelf %}
|
||||
{% endif %}
|
||||
{% else %}
|
||||
{{ shelf.name }}
|
||||
{% endif %}
|
||||
{% else %}
|
||||
{% blocktrans with username=user.display_name %}{{ username }}'s books{% endblocktrans %}
|
||||
{% blocktrans with username=user.display_name %}{{ username }}'s books{% endblocktrans %}
|
||||
{% endif %}
|
||||
|
|
Loading…
Reference in a new issue