From e2622d05942f90f46ea33a6f1e057f64390fd4d4 Mon Sep 17 00:00:00 2001 From: Mouse Reeve Date: Thu, 4 Mar 2021 14:27:49 -0800 Subject: [PATCH] Catches a couple translations, hides profile box when empty --- bookwyrm/templates/discover/landing_layout.html | 4 ++-- bookwyrm/templates/discover/large-book.html | 3 ++- bookwyrm/templates/discover/small-book.html | 3 ++- bookwyrm/templates/layout.html | 10 +++++----- bookwyrm/templates/snippets/username.html | 4 ++-- bookwyrm/templates/user/user_layout.html | 4 ++-- 6 files changed, 15 insertions(+), 13 deletions(-) diff --git a/bookwyrm/templates/discover/landing_layout.html b/bookwyrm/templates/discover/landing_layout.html index 3aa27e393..5cfa1fd39 100644 --- a/bookwyrm/templates/discover/landing_layout.html +++ b/bookwyrm/templates/discover/landing_layout.html @@ -54,11 +54,11 @@

{% trans "Your Account" %}

{% include 'user/user_preview.html' with user=request.user %} + {% if request.user.summary %}
- {% if request.user.summary %} {{ request.user.summary | to_markdown | safe }} - {% endif %}
+ {% endif %}
{% endif %} diff --git a/bookwyrm/templates/discover/large-book.html b/bookwyrm/templates/discover/large-book.html index 7881a33ab..44b91b946 100644 --- a/bookwyrm/templates/discover/large-book.html +++ b/bookwyrm/templates/discover/large-book.html @@ -1,4 +1,5 @@ {% load bookwyrm_tags %} +{% load i18n %} {% if book %}
@@ -8,7 +9,7 @@

{{ book.title }}

{% if book.authors %} -

by {% include 'snippets/authors.html' with book=book %}

+

{% trans "by" %} {% include 'snippets/authors.html' with book=book %}

{% endif %} {% if book|book_description %}
{{ book|book_description|to_markdown|safe|truncatewords_html:50 }}
diff --git a/bookwyrm/templates/discover/small-book.html b/bookwyrm/templates/discover/small-book.html index 72108c309..6df277466 100644 --- a/bookwyrm/templates/discover/small-book.html +++ b/bookwyrm/templates/discover/small-book.html @@ -1,11 +1,12 @@ {% load bookwyrm_tags %} +{% load i18n %} {% if book %} {% include 'snippets/book_cover.html' with book=book %} {% include 'snippets/stars.html' with rating=book|rating:request.user %}

{{ book.title }}

{% if book.authors %} -

by {% include 'snippets/authors.html' with book=book %}

+

{% trans "by" %} {% include 'snippets/authors.html' with book=book %}

{% endif %} {% endif %} diff --git a/bookwyrm/templates/layout.html b/bookwyrm/templates/layout.html index 6e4458893..ee42b4f6e 100644 --- a/bookwyrm/templates/layout.html +++ b/bookwyrm/templates/layout.html @@ -149,12 +149,12 @@
- +
@@ -165,7 +165,7 @@ {% if site.allow_registration and request.path != '' and request.path != '/' %} {% endif %} @@ -199,7 +199,7 @@ {% if site.support_link %}
- Support {{ site.name }} on {{ site.support_title }} + {% blocktrans %}Support {{ site.name }} on {{ site.support_title }}{% endblocktrans %}
{% endif %}
diff --git a/bookwyrm/templates/snippets/username.html b/bookwyrm/templates/snippets/username.html index e18ba1f8d..b004582d5 100644 --- a/bookwyrm/templates/snippets/username.html +++ b/bookwyrm/templates/snippets/username.html @@ -4,7 +4,7 @@ <{% if anchor %}a href="{{ user.local_path }}"{% else %}span{% endif %} class="user ml-1" > - {{ user.name|default:user|username }} + {{ user.display_name }} {% if possessive %}'s{% endif %} @@ -12,4 +12,4 @@ {% if show_full and user.name or show_full and user.localname %} ({{ user.username }}) {% endif %} -{% endspaceless %} \ No newline at end of file +{% endspaceless %} diff --git a/bookwyrm/templates/user/user_layout.html b/bookwyrm/templates/user/user_layout.html index bc7fe126e..d76291608 100644 --- a/bookwyrm/templates/user/user_layout.html +++ b/bookwyrm/templates/user/user_layout.html @@ -17,11 +17,11 @@ {% include 'user/user_preview.html' with user=user %}
+ {% if user.summary %}
- {% if user.summary %} {{ user.summary | to_markdown | safe }} - {% endif %}
+ {% endif %}
{% if not is_self and request.user.is_authenticated %} {% include 'snippets/follow_button.html' with user=user %}