forked from mirrors/bookwyrm
Adds default shelf names translations
This commit is contained in:
parent
27914d07b9
commit
2c37893790
3 changed files with 6 additions and 2 deletions
|
@ -20,7 +20,10 @@
|
||||||
{% with shelf_counter=forloop.counter %}
|
{% with shelf_counter=forloop.counter %}
|
||||||
<li>
|
<li>
|
||||||
<p>
|
<p>
|
||||||
{{ shelf.name }}
|
{% 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 %}
|
||||||
</p>
|
</p>
|
||||||
<div class="tabs is-small is-toggle">
|
<div class="tabs is-small is-toggle">
|
||||||
<ul>
|
<ul>
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
<ul>
|
<ul>
|
||||||
{% for shelf_tab in shelves %}
|
{% for shelf_tab in shelves %}
|
||||||
<li class="{% if shelf_tab.identifier == shelf.identifier %}is-active{% endif %}">
|
<li class="{% if shelf_tab.identifier == shelf.identifier %}is-active{% endif %}">
|
||||||
<a href="/user/{{ user | username }}/shelf/{{ shelf_tab.identifier }}"{% if shelf_tab.identifier == shelf.identifier %} aria-current="page"{% endif %}>{{ shelf_tab.name }}</a>
|
<a href="/user/{{ user | username }}/shelf/{{ shelf_tab.identifier }}"{% if shelf_tab.identifier == shelf.identifier %} aria-current="page"{% endif %}>{% if shelf_tab.identifier == 'to-read' %}{% trans "To Read" %}{% elif shelf_tab.identifier == 'reading' %}{% trans "Currently Reading" %}{% elif shelf_tab.identifier == 'read' %}{% trans "Read" %}{% else %}{{ shelf_tab.name }}{% endif %}</a>
|
||||||
</li>
|
</li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
|
|
|
@ -166,6 +166,7 @@ def get_suggested_books(user, max_books=5):
|
||||||
continue
|
continue
|
||||||
shelf_preview = {
|
shelf_preview = {
|
||||||
'name': shelf.name,
|
'name': shelf.name,
|
||||||
|
'identifier': shelf.identifier,
|
||||||
'books': [s.book for s in shelf_books]
|
'books': [s.book for s in shelf_books]
|
||||||
}
|
}
|
||||||
suggested_books.append(shelf_preview)
|
suggested_books.append(shelf_preview)
|
||||||
|
|
Loading…
Reference in a new issue