Merge pull request #2512 from hueyy/fix/year_of_reading_no_page_data

Fix year of reading: phrasing when there are books without page data
This commit is contained in:
Mouse Reeve 2022-12-16 12:24:14 -08:00 committed by GitHub
commit 09e4735ad9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -123,16 +123,18 @@
</h2>
<p class="subtitle is-5">{% trans "Thats great!" %}</p>
<p class="title is-4 is-serif">
{% blocktrans with pages=pages_average|intcomma %}That makes an average of {{ pages }} pages per book.{% endblocktrans %}
</p>
{% if pages > 0 %}
<p class="title is-4 is-serif">
{% blocktrans with pages=pages_average|intcomma %}That makes an average of {{ pages }} pages per book.{% endblocktrans %}
</p>
{% endif %}
{% if no_page_number %}
<p class="subtitle is-6">
{% blocktrans trimmed count counter=no_page_number %}
({{ no_page_number }} book doesnt have pages)
(No page data was available for {{ no_page_number }} book)
{% plural %}
({{ no_page_number }} books dont have pages)
(No page data was available for {{ no_page_number }} books)
{% endblocktrans %}
</p>
{% endif %}