Use the translated shelf name in the “remove from” shelf button

The button to remove a book from a shelf when looking at the book’s page
wasn’t using the translated shelf name. It was also concatenating
strings instead of using a placeholder, which is difficult to translate
in some languages. This fixes it to use the translate_shelf_name
function and use the same placeholder string as in other places.
This commit is contained in:
Neil Roberts 2023-05-15 11:26:12 +02:00
parent 70a5153271
commit 666f09c576

View file

@ -91,7 +91,9 @@
{% csrf_token %}
<input type="hidden" name="book" value="{{ book.id }}">
<input type="hidden" name="shelf" value="{{ shelf.id }}">
<button class="button is-fullwidth is-small is-radiusless is-danger is-light" type="submit">{% trans "Remove from" %} {{ shelf.name }}</button>
<button class="button is-fullwidth is-small is-radiusless is-danger is-light" type="submit">
{% blocktrans with name=shelf|translate_shelf_name %}Remove from {{ name }}{% endblocktrans %}
</button>
</form>
</li>
{% endif %}