diff --git a/bookwyrm/templates/notifications.html b/bookwyrm/templates/notifications.html index b6074a4a1..f6fd7dabc 100644 --- a/bookwyrm/templates/notifications.html +++ b/bookwyrm/templates/notifications.html @@ -45,13 +45,37 @@ {% include 'snippets/avatar.html' with user=notification.related_user %} {% include 'snippets/username.html' with user=notification.related_user %} {% if notification.notification_type == 'FAVORITE' %} - {% blocktrans with preview_name=related_status|status_preview_name|safe related_path=related_status.local_path %}favorited your {{ preview_name }}{% endblocktrans %} + {% if related_status.status_type == 'Review' %} + {% blocktrans with book_title=related_status.book.title related_path=related_status.local_path %}favorited your review of {{ book_title }}{% endblocktrans %} + {% elif related_status.status_type == 'Comment' %} + {% blocktrans with book_title=related_status.book.title related_path=related_status.local_path %}favorited your comment on {{ book_title }}{% endblocktrans %} + {% elif related_status.status_type == 'Quotation' %} + {% blocktrans with book_title=related_status.book.title related_path=related_status.local_path %}favorited your quote from {{ book_title }}{% endblocktrans %} + {% else %} + {% blocktrans with related_path=related_status.local_path %}favorited your status{% endblocktrans %} + {% endif %} {% elif notification.notification_type == 'MENTION' %} - {% blocktrans with preview_name=related_status|status_preview_name|safe related_path=related_status.local_path %}mentioned you in a {{ preview_name }}{% endblocktrans %} + {% if related_status.status_type == 'Review' %} + {% blocktrans with related_path=related_status.local_path book_title=related_status.book.title %}mentioned you in a review of {{ book_title }}{% endblocktrans %} + {% elif related_status.status_type == 'Comment' %} + {% blocktrans with related_path=related_status.local_path book_title=related_status.book.title %}mentioned you in a comment on {{ book_title }}{% endblocktrans %} + {% elif related_status.status_type == 'Quotation' %} + {% blocktrans with related_path=related_status.local_path book_title=related_status.book.title %}mentioned you in a quote from {{ book_title }}{% endblocktrans %} + {% else %} + {% blocktrans with related_path=related_status.local_path %}mentioned you in a status{% endblocktrans %} + {% endif %} {% elif notification.notification_type == 'REPLY' %} - {% blocktrans with preview_name=related_status|status_preview_name|safe related_path=related_status.local_path parent_path=related_status.reply_parent.local_path %}replied to your {{ preview_name }}{% endblocktrans %} + {% if related_status.status_type == 'Review' %} + {% blocktrans with related_path=related_status.local_path parent_path=related_status.reply_parent.local_path book_title=related_status.reply_parent.book.title %}replied to your review of {{ book_title }}{% endblocktrans %} + {% elif related_status.status_type == 'Comment' %} + {% blocktrans with related_path=related_status.local_path parent_path=related_status.reply_parent.local_path book_title=related_status.reply_parent.book.title %}replied to your comment on {{ book_title }}{% endblocktrans %} + {% elif related_status.status_type == 'Quotation' %} + {% blocktrans with related_path=related_status.local_path parent_path=related_status.reply_parent.local_path book_title=related_status.reply_parent.book.title %}replied to your quote from {{ book_title }}{% endblocktrans %} + {% else %} + {% blocktrans with related_path=related_status.local_path parent_path=related_status.reply_parent.local_path %}replied to your status{% endblocktrans %} + {% endif %} {% elif notification.notification_type == 'FOLLOW' %} {% trans "followed you" %} @@ -62,9 +86,21 @@ {% include 'snippets/follow_request_buttons.html' with user=notification.related_user %} {% elif notification.notification_type == 'BOOST' %} - {% blocktrans with preview_name=related_status|status_preview_name|safe related_path=related_status.local_path %}boosted your {{ preview_name }}{% endblocktrans %} + {% if related_status.status_type == 'Review' %} + {% blocktrans with related_path=related_status.local_path book_title=related_status.book.title %}boosted your review of {{ book.title }}{% endblocktrans %} + {% elif related_status.status_type == 'Comment' %} + {% blocktrans with related_path=related_status.local_path book_title=related_status.book.title %}boosted your comment on{{ book.title }}{% endblocktrans %} + {% elif related_status.status_type == 'Quotation' %} + {% blocktrans with related_path=related_status.local_path book_title=related_status.book.title %}boosted your quote from {{ book.title }}{% endblocktrans %} + {% else %} + {% blocktrans with related_path=related_status.local_path %}boosted your status{% endblocktrans %} + {% endif %} {% elif notification.notification_type == 'ADD' %} - {% if notification.related_list_item.approved %}{% trans "added" %}{% else %}{% trans "suggested adding" %}{% endif %} {% include 'snippets/book_titleby.html' with book=notification.related_list_item.book %} to your list "{{ notification.related_list_item.book_list.name }}" + {% if notification.related_list_item.approved %} + {% blocktrans with book_path=notification.related_list_item.book.local_path book_title=notification.related_list_item.book.title list_path=notification.related_list_item.book_list.local_path list_name=notification.related_list_item.book_list.name %} added {{ book_title }} to your list "{{ list_name }}"{% endblocktrans %} + {% else %} + {% blocktrans with book_path=notification.related_list_item.book.local_path book_title=notification.related_list_item.book.title list_path=notification.related_list_item.book_list.local_path list_name=notification.related_list_item.book_list.name %} suggested adding {{ book_title }} to your list "{{ list_name }}"{% endblocktrans %} + {% endif %} {% endif %} {% elif notification.related_import %} {% blocktrans with related_id=notification.related_import.id %} your import completed.{% endblocktrans %}