diff --git a/bookwyrm/importers/goodreads_import.py b/bookwyrm/importers/goodreads_import.py index 7b577ea85..c62e65827 100644 --- a/bookwyrm/importers/goodreads_import.py +++ b/bookwyrm/importers/goodreads_import.py @@ -3,10 +3,10 @@ from . import Importer class GoodreadsImporter(Importer): - """GoodReads is the default importer, thus Importer follows its structure. + """Goodreads is the default importer, thus Importer follows its structure. For a more complete example of overriding see librarything_import.py""" - service = "GoodReads" + service = "Goodreads" def parse_fields(self, entry): """handle the specific fields in goodreads csvs""" diff --git a/bookwyrm/importers/importer.py b/bookwyrm/importers/importer.py index a10b4060c..6d898a2a3 100644 --- a/bookwyrm/importers/importer.py +++ b/bookwyrm/importers/importer.py @@ -1,4 +1,4 @@ -""" handle reading a csv from an external service, defaults are from GoodReads """ +""" handle reading a csv from an external service, defaults are from Goodreads """ import csv import logging diff --git a/bookwyrm/templates/book/publisher_info.html b/bookwyrm/templates/book/publisher_info.html index e0711fa82..b39bcf5ce 100644 --- a/bookwyrm/templates/book/publisher_info.html +++ b/bookwyrm/templates/book/publisher_info.html @@ -3,7 +3,7 @@ {% load i18n %} {% load humanize %} -{% firstof book.physical_format_detail book.physical_format as format %} +{% firstof book.physical_format_detail book.get_physical_format_display as format %} {% firstof book.physical_format book.physical_format_detail as format_property %} {% with pages=book.pages %} {% if format or pages %} @@ -18,7 +18,7 @@

{% if format and not pages %} - {% blocktrans %}{{ format }}{% endblocktrans %} + {{ format }} {% elif format and pages %} {% blocktrans %}{{ format }}, {{ pages }} pages{% endblocktrans %} {% elif pages %} diff --git a/bookwyrm/templates/discover/card-header.html b/bookwyrm/templates/discover/card-header.html new file mode 100644 index 000000000..0eb9a678c --- /dev/null +++ b/bookwyrm/templates/discover/card-header.html @@ -0,0 +1,26 @@ +{% load i18n %} +{% load utilities %} + +{% with user_path=status.user.local_path username=status.user.display_name book_path=status.book.local_poth book_title=book|book_title %} + +{% if status.status_type == 'GeneratedNote' %} + {{ status.content|safe }} +{% elif status.status_type == 'Rating' %} + {% blocktrans trimmed %} + {{ username }} rated {{ book_title }} + {% endblocktrans %} +{% elif status.status_type == 'Review' %} + {% blocktrans trimmed %} + {{ username }} reviewed {{ book_title }} + {% endblocktrans %} +{% elif status.status_type == 'Comment' %} + {% blocktrans trimmed %} + {{ username }} commented on {{ book_title }} + {% endblocktrans %} +{% elif status.status_type == 'Quotation' %} + {% blocktrans trimmed %} + {{ username }} quoted {{ book_title }} + {% endblocktrans %} +{% endif %} + +{% endwith %} diff --git a/bookwyrm/templates/discover/large-book.html b/bookwyrm/templates/discover/large-book.html index 6d80c3daf..1fa0afb92 100644 --- a/bookwyrm/templates/discover/large-book.html +++ b/bookwyrm/templates/discover/large-book.html @@ -36,23 +36,7 @@

- - {{ status.user.display_name }} - - - {% if status.status_type == 'GeneratedNote' %} - {{ status.content|safe }} - {% elif status.status_type == 'Rating' %} - {% trans "rated" %} - {% elif status.status_type == 'Review' %} - {% trans "reviewed" %} - {% elif status.status_type == 'Comment' %} - {% trans "commented on" %} - {% elif status.status_type == 'Quotation' %} - {% trans "quoted" %} - {% endif %} - - {{ book.title }} + {% include "discover/card-header.html" %}

diff --git a/bookwyrm/templates/discover/small-book.html b/bookwyrm/templates/discover/small-book.html index 5b2070188..76732ca14 100644 --- a/bookwyrm/templates/discover/small-book.html +++ b/bookwyrm/templates/discover/small-book.html @@ -22,23 +22,7 @@

- - {{ status.user.display_name }} - - - {% if status.status_type == 'GeneratedNote' %} - {{ status.content|safe }} - {% elif status.status_type == 'Rating' %} - {% trans "rated" %} - {% elif status.status_type == 'Review' %} - {% trans "reviewed" %} - {% elif status.status_type == 'Comment' %} - {% trans "commented on" %} - {% elif status.status_type == 'Quotation' %} - {% trans "quoted" %} - {% endif %} - - {{ book.title }} + {% include "discover/card-header.html" %}

{% if status.rating %}

diff --git a/bookwyrm/templates/email/invite/html_content.html b/bookwyrm/templates/email/invite/html_content.html index 358e23dc1..adc993b7b 100644 --- a/bookwyrm/templates/email/invite/html_content.html +++ b/bookwyrm/templates/email/invite/html_content.html @@ -12,6 +12,6 @@

{% url 'code-of-conduct' as coc_path %} {% url 'about' as about_path %} - {% blocktrans %}Learn more about this instance.{% endblocktrans %} + {% blocktrans %}Learn more about {{ site_name }}.{% endblocktrans %}

{% endblock %} diff --git a/bookwyrm/templates/email/invite/text_content.html b/bookwyrm/templates/email/invite/text_content.html index c3fcdc04e..26dcd1720 100644 --- a/bookwyrm/templates/email/invite/text_content.html +++ b/bookwyrm/templates/email/invite/text_content.html @@ -5,6 +5,6 @@ {{ invite_link }} -{% trans "Learn more about this instance:" %} https://{{ domain }}{% url 'about' %} +{% blocktrans %}Learn more about {{ site_name }}:{% endblocktrans %} https://{{ domain }}{% url 'about' %} {% endblock %} diff --git a/bookwyrm/templates/import/import.html b/bookwyrm/templates/import/import.html index cc296b75b..81f0daa54 100644 --- a/bookwyrm/templates/import/import.html +++ b/bookwyrm/templates/import/import.html @@ -22,8 +22,8 @@