From 3f6b0608b2157f17ebccf761384d3dd1c4631b6f Mon Sep 17 00:00:00 2001 From: Hugh Rundle Date: Wed, 10 Nov 2021 21:37:16 +1100 Subject: [PATCH 1/2] Show user and book names for reading actions in Discover fixes #1596 This uses the same technique as #1572 to ensure read statuses from GeneratedNotes are translated. --- bookwyrm/templates/discover/card-header.html | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/bookwyrm/templates/discover/card-header.html b/bookwyrm/templates/discover/card-header.html index 0eb9a678c..56d412ea2 100644 --- a/bookwyrm/templates/discover/card-header.html +++ b/bookwyrm/templates/discover/card-header.html @@ -4,7 +4,21 @@ {% 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 }} + {% if status.content == 'wants to read' %} + {% blocktrans trimmed %} + {{ username }} wants to read {{ book_title }} + {% endblocktrans %} + {% endif %} + {% if status.content == 'finished reading' %} + {% blocktrans trimmed %} + {{ username }} finished reading {{ book_title }} + {% endblocktrans %} + {% endif %} + {% if status.content == 'started reading' %} + {% blocktrans trimmed %} + {{ username }} started reading {{ book_title }} + {% endblocktrans %} + {% endif %} {% elif status.status_type == 'Rating' %} {% blocktrans trimmed %} {{ username }} rated {{ book_title }} From eb62474b97535cb097631868eb67e4aeaaf175bf Mon Sep 17 00:00:00 2001 From: Hugh Rundle Date: Wed, 10 Nov 2021 22:04:19 +1100 Subject: [PATCH 2/2] fix broken book links in Discover --- bookwyrm/templates/discover/card-header.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bookwyrm/templates/discover/card-header.html b/bookwyrm/templates/discover/card-header.html index 56d412ea2..8b9f6fc17 100644 --- a/bookwyrm/templates/discover/card-header.html +++ b/bookwyrm/templates/discover/card-header.html @@ -1,7 +1,7 @@ {% 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 %} +{% with user_path=status.user.local_path username=status.user.display_name book_path=book.local_path book_title=book|book_title %} {% if status.status_type == 'GeneratedNote' %} {% if status.content == 'wants to read' %}