From 1e6390a405f343a3076e869727e002ffccb9dd8c Mon Sep 17 00:00:00 2001 From: Mouse Reeve Date: Sat, 23 Oct 2021 06:59:06 -0700 Subject: [PATCH 1/6] Fixes whitespace in translation strings --- bookwyrm/templates/groups/suggested_users.html | 6 +++++- bookwyrm/templates/notifications/items/accept.html | 2 +- bookwyrm/templates/notifications/items/fav.html | 2 +- bookwyrm/templates/notifications/items/invite.html | 2 +- bookwyrm/templates/notifications/items/item_layout.html | 7 ++----- bookwyrm/templates/notifications/items/join.html | 2 +- bookwyrm/templates/notifications/items/leave.html | 2 +- bookwyrm/templates/notifications/items/remove.html | 8 ++++---- bookwyrm/templates/notifications/items/update.html | 6 +++--- 9 files changed, 19 insertions(+), 18 deletions(-) diff --git a/bookwyrm/templates/groups/suggested_users.html b/bookwyrm/templates/groups/suggested_users.html index 951e7bf05..64498eb85 100644 --- a/bookwyrm/templates/groups/suggested_users.html +++ b/bookwyrm/templates/groups/suggested_users.html @@ -36,7 +36,11 @@ {% endfor %} {% else %} -

No potential members found for "{{ user_query }}"

+

+ {% blocktrans trimmed %} + No potential members found for "{{ user_query }}" + {% endblocktrans %} +


{% endif %} diff --git a/bookwyrm/templates/notifications/items/accept.html b/bookwyrm/templates/notifications/items/accept.html index 19acab15e..045e23266 100644 --- a/bookwyrm/templates/notifications/items/accept.html +++ b/bookwyrm/templates/notifications/items/accept.html @@ -13,7 +13,7 @@ {% block description %} - {% blocktrans with group_name=notification.related_group.name group_path=notification.related_group.local_path %} + {% blocktrans trimmed with group_name=notification.related_group.name group_path=notification.related_group.local_path %} accepted your invitation to join group "{{ group_name }}" {% endblocktrans %} diff --git a/bookwyrm/templates/notifications/items/fav.html b/bookwyrm/templates/notifications/items/fav.html index afc18d73e..fbb865e4f 100644 --- a/bookwyrm/templates/notifications/items/fav.html +++ b/bookwyrm/templates/notifications/items/fav.html @@ -24,7 +24,7 @@ {% elif related_status.status_type == 'Comment' %} {% blocktrans trimmed %} - liked your comment on{{ book_title }} + liked your comment on {{ book_title }} {% endblocktrans %} {% elif related_status.status_type == 'Quotation' %} diff --git a/bookwyrm/templates/notifications/items/invite.html b/bookwyrm/templates/notifications/items/invite.html index ddfa3b345..de3b89e42 100644 --- a/bookwyrm/templates/notifications/items/invite.html +++ b/bookwyrm/templates/notifications/items/invite.html @@ -12,7 +12,7 @@ {% endblock %} {% block description %} -{% blocktrans trimmed with group_name=notification.related_group.name group_path=notification.related_group.local_path %} +{% blocktrans trimmed with group_name=notification.related_group.name group_path=notification.related_group.local_path %} invited you to join the group {{ group_name }} {% endblocktrans %}
diff --git a/bookwyrm/templates/notifications/items/item_layout.html b/bookwyrm/templates/notifications/items/item_layout.html index 382978d47..8db68dafb 100644 --- a/bookwyrm/templates/notifications/items/item_layout.html +++ b/bookwyrm/templates/notifications/items/item_layout.html @@ -1,4 +1,3 @@ -{% load humanize %} {% load bookwyrm_tags %} {% related_status notification as related_status %}
@@ -10,10 +9,8 @@

{% if notification.related_user %} - - {% include 'snippets/avatar.html' with user=notification.related_user %} - {{ notification.related_user.display_name }} - + {% include 'snippets/avatar.html' with user=notification.related_user %} + {{ notification.related_user.display_name }} {% endif %} {% block description %}{% endblock %}

diff --git a/bookwyrm/templates/notifications/items/join.html b/bookwyrm/templates/notifications/items/join.html index 93b356424..c10def456 100644 --- a/bookwyrm/templates/notifications/items/join.html +++ b/bookwyrm/templates/notifications/items/join.html @@ -13,7 +13,7 @@ {% block description %} -{% blocktrans with group_name=notification.related_group.name group_path=notification.related_group.local_path %} +{% blocktrans trimmed with group_name=notification.related_group.name group_path=notification.related_group.local_path %} has joined your group "{{ group_name }}" {% endblocktrans %} diff --git a/bookwyrm/templates/notifications/items/leave.html b/bookwyrm/templates/notifications/items/leave.html index 9c7a71b61..422a31dea 100644 --- a/bookwyrm/templates/notifications/items/leave.html +++ b/bookwyrm/templates/notifications/items/leave.html @@ -13,7 +13,7 @@ {% block description %} - {% blocktrans with group_name=notification.related_group.name group_path=notification.related_group.local_path %} + {% blocktrans trimmed with group_name=notification.related_group.name group_path=notification.related_group.local_path %} has left your group "{{ group_name }}" {% endblocktrans %} diff --git a/bookwyrm/templates/notifications/items/remove.html b/bookwyrm/templates/notifications/items/remove.html index 7ee38b4a7..18a0cf178 100644 --- a/bookwyrm/templates/notifications/items/remove.html +++ b/bookwyrm/templates/notifications/items/remove.html @@ -14,13 +14,13 @@ {% block description %} {% if notification.related_user %} -{% blocktrans with group_name=notification.related_group.name group_path=notification.related_group.local_path %} -has been removed from your group "{{ group_name }}" -{% endblocktrans %} + {% blocktrans trimmed with group_name=notification.related_group.name group_path=notification.related_group.local_path %} + has been removed from your group "{{ group_name }}" + {% endblocktrans %} {% else %} - {% blocktrans with group_name=notification.related_group.name group_path=notification.related_group.local_path %} + {% blocktrans trimmed with group_name=notification.related_group.name group_path=notification.related_group.local_path %} You have been removed from the "{{ group_name }} group" {% endblocktrans %} diff --git a/bookwyrm/templates/notifications/items/update.html b/bookwyrm/templates/notifications/items/update.html index f963fd3a9..be796b785 100644 --- a/bookwyrm/templates/notifications/items/update.html +++ b/bookwyrm/templates/notifications/items/update.html @@ -13,15 +13,15 @@ {% block description %} {% if notification.notification_type == 'GROUP_PRIVACY' %} - {% blocktrans with group_name=notification.related_group.name group_path=notification.related_group.local_path %} + {% blocktrans trimmed with group_name=notification.related_group.name group_path=notification.related_group.local_path %} has changed the privacy level for {{ group_name }} {% endblocktrans %} {% elif notification.notification_type == 'GROUP_NAME' %} - {% blocktrans with group_name=notification.related_group.name group_path=notification.related_group.local_path %} + {% blocktrans trimmed with group_name=notification.related_group.name group_path=notification.related_group.local_path %} has changed the name of {{ group_name }} {% endblocktrans %} {% else %} - {% blocktrans with group_name=notification.related_group.name group_path=notification.related_group.local_path %} + {% blocktrans trimmed with group_name=notification.related_group.name group_path=notification.related_group.local_path %} has changed the description of {{ group_name }} {% endblocktrans %} {% endif %} From 353ccc1d7d05d5063a92aaf959fcd8a799b624cf Mon Sep 17 00:00:00 2001 From: Mouse Reeve Date: Sat, 23 Oct 2021 07:11:38 -0700 Subject: [PATCH 2/6] Updates references locale --- bw-dev | 5 +--- locale/en_US/LC_MESSAGES/django.po | 47 ++++++++++-------------------- 2 files changed, 16 insertions(+), 36 deletions(-) diff --git a/bw-dev b/bw-dev index c9c2115ce..6c9def8ff 100755 --- a/bw-dev +++ b/bw-dev @@ -105,11 +105,8 @@ case "$CMD" in collectstatic) runweb python manage.py collectstatic --no-input ;; - add_locale) - runweb django-admin makemessages --no-wrap --ignore=venv -l $@ - ;; makemessages) - runweb django-admin makemessages --no-wrap --ignore=venv --all $@ + runweb django-admin makemessages --no-wrap --ignore=venv -l en_US $@ ;; compilemessages) runweb django-admin compilemessages --ignore venv $@ diff --git a/locale/en_US/LC_MESSAGES/django.po b/locale/en_US/LC_MESSAGES/django.po index 110eb7d16..0d2cb22bf 100644 --- a/locale/en_US/LC_MESSAGES/django.po +++ b/locale/en_US/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: 0.0.1\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-10-22 17:47+0000\n" +"POT-Creation-Date: 2021-10-23 14:06+0000\n" "PO-Revision-Date: 2021-02-28 17:19-0800\n" "Last-Translator: Mouse Reeve \n" "Language-Team: English \n" @@ -1321,6 +1321,11 @@ msgid_plural "%(shared_books)s books on your shelves" msgstr[0] "" msgstr[1] "" +#: bookwyrm/templates/groups/suggested_users.html:40 +#, python-format +msgid "No potential members found for \"%(user_query)s\"" +msgstr "" + #: bookwyrm/templates/groups/user_groups.html:15 msgid "Manager" msgstr "" @@ -1833,10 +1838,7 @@ msgstr "" #: bookwyrm/templates/notifications/items/accept.html:16 #, python-format -msgid "" -"\n" -" accepted your invitation to join group \"%(group_name)s\"\n" -" " +msgid "accepted your invitation to join group \"%(group_name)s\"" msgstr "" #: bookwyrm/templates/notifications/items/add.html:24 @@ -1876,7 +1878,7 @@ msgstr "" #: bookwyrm/templates/notifications/items/fav.html:25 #, python-format -msgid "liked your comment on%(book_title)s" +msgid "liked your comment on %(book_title)s" msgstr "" #: bookwyrm/templates/notifications/items/fav.html:31 @@ -1909,17 +1911,12 @@ msgstr "" #: bookwyrm/templates/notifications/items/join.html:16 #, python-format -msgid "" -"\n" -"has joined your group \"%(group_name)s\"\n" +msgid "has joined your group \"%(group_name)s\"" msgstr "" #: bookwyrm/templates/notifications/items/leave.html:16 #, python-format -msgid "" -"\n" -" has left your group \"%(group_name)s\"\n" -" " +msgid "has left your group \"%(group_name)s\"" msgstr "" #: bookwyrm/templates/notifications/items/mention.html:20 @@ -1944,17 +1941,12 @@ msgstr "" #: bookwyrm/templates/notifications/items/remove.html:17 #, python-format -msgid "" -" \n" -"has been removed from your group \"%(group_name)s\"\n" +msgid "has been removed from your group \"%(group_name)s\"" msgstr "" #: bookwyrm/templates/notifications/items/remove.html:23 #, python-format -msgid "" -"\n" -" You have been removed from the \"%(group_name)s group\"\n" -" " +msgid "You have been removed from the \"%(group_name)s group\"" msgstr "" #: bookwyrm/templates/notifications/items/reply.html:21 @@ -1984,26 +1976,17 @@ msgstr "" #: bookwyrm/templates/notifications/items/update.html:16 #, python-format -msgid "" -"\n" -" has changed the privacy level for %(group_name)s\n" -" " +msgid "has changed the privacy level for %(group_name)s" msgstr "" #: bookwyrm/templates/notifications/items/update.html:20 #, python-format -msgid "" -"\n" -" has changed the name of %(group_name)s\n" -" " +msgid "has changed the name of %(group_name)s" msgstr "" #: bookwyrm/templates/notifications/items/update.html:24 #, python-format -msgid "" -"\n" -" has changed the description of %(group_name)s\n" -" " +msgid "has changed the description of %(group_name)s" msgstr "" #: bookwyrm/templates/notifications/notifications_page.html:18 From d80a28e12899c3f9d000840a6576d4a163373c0e Mon Sep 17 00:00:00 2001 From: Mouse Reeve Date: Sat, 23 Oct 2021 08:00:45 -0700 Subject: [PATCH 3/6] Consistent quotes around group names in notifications --- bookwyrm/templates/notifications/items/invite.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bookwyrm/templates/notifications/items/invite.html b/bookwyrm/templates/notifications/items/invite.html index de3b89e42..abb8cd02f 100644 --- a/bookwyrm/templates/notifications/items/invite.html +++ b/bookwyrm/templates/notifications/items/invite.html @@ -13,7 +13,7 @@ {% block description %} {% blocktrans trimmed with group_name=notification.related_group.name group_path=notification.related_group.local_path %} -invited you to join the group {{ group_name }} +invited you to join the group "{{ group_name }}" {% endblocktrans %}
{% include 'snippets/join_invitation_buttons.html' with group=notification.related_group %} From 0f9c363b00be6a89b52a62d063aed6857f93ab95 Mon Sep 17 00:00:00 2001 From: Mouse Reeve Date: Sat, 23 Oct 2021 08:13:07 -0700 Subject: [PATCH 4/6] Updates locale file for quotes fix --- locale/en_US/LC_MESSAGES/django.po | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/locale/en_US/LC_MESSAGES/django.po b/locale/en_US/LC_MESSAGES/django.po index 0d2cb22bf..0521e64ba 100644 --- a/locale/en_US/LC_MESSAGES/django.po +++ b/locale/en_US/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: 0.0.1\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-10-23 14:06+0000\n" +"POT-Creation-Date: 2021-10-23 15:11+0000\n" "PO-Revision-Date: 2021-02-28 17:19-0800\n" "Last-Translator: Mouse Reeve \n" "Language-Team: English \n" @@ -1906,7 +1906,7 @@ msgstr "" #: bookwyrm/templates/notifications/items/invite.html:15 #, python-format -msgid "invited you to join the group %(group_name)s" +msgid "invited you to join the group \"%(group_name)s\"" msgstr "" #: bookwyrm/templates/notifications/items/join.html:16 From 9a07c11b19818bc8133009765db7cd2306359973 Mon Sep 17 00:00:00 2001 From: Mouse Reeve Date: Sun, 24 Oct 2021 06:43:31 -0700 Subject: [PATCH 5/6] Fixes group quotes and button whitespace --- bookwyrm/templates/notifications/items/remove.html | 2 +- bookwyrm/templates/snippets/remove_from_group_button.html | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bookwyrm/templates/notifications/items/remove.html b/bookwyrm/templates/notifications/items/remove.html index 18a0cf178..eba18fd89 100644 --- a/bookwyrm/templates/notifications/items/remove.html +++ b/bookwyrm/templates/notifications/items/remove.html @@ -21,7 +21,7 @@ {% else %} {% blocktrans trimmed with group_name=notification.related_group.name group_path=notification.related_group.local_path %} - You have been removed from the "{{ group_name }} group" + You have been removed from the "{{ group_name }}" group {% endblocktrans %} {% endif %} diff --git a/bookwyrm/templates/snippets/remove_from_group_button.html b/bookwyrm/templates/snippets/remove_from_group_button.html index 6d1de0dd3..1672e0388 100644 --- a/bookwyrm/templates/snippets/remove_from_group_button.html +++ b/bookwyrm/templates/snippets/remove_from_group_button.html @@ -13,10 +13,10 @@
From 7502158e58c9ac9e068e294e96bf2faddd3f13cb Mon Sep 17 00:00:00 2001 From: Mouse Reeve Date: Sun, 24 Oct 2021 07:10:20 -0700 Subject: [PATCH 6/6] Builds latest changes --- locale/en_US/LC_MESSAGES/django.po | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/locale/en_US/LC_MESSAGES/django.po b/locale/en_US/LC_MESSAGES/django.po index 0521e64ba..7d8fc801a 100644 --- a/locale/en_US/LC_MESSAGES/django.po +++ b/locale/en_US/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: 0.0.1\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-10-23 15:11+0000\n" +"POT-Creation-Date: 2021-10-24 14:09+0000\n" "PO-Revision-Date: 2021-02-28 17:19-0800\n" "Last-Translator: Mouse Reeve \n" "Language-Team: English \n" @@ -549,6 +549,7 @@ msgstr "" #: bookwyrm/templates/book/edit/edit_book.html:97 #: bookwyrm/templates/groups/members.html:16 #: bookwyrm/templates/landing/password_reset.html:30 +#: bookwyrm/templates/snippets/remove_from_group_button.html:16 msgid "Confirm" msgstr "" @@ -1782,6 +1783,7 @@ msgid "Set" msgstr "" #: bookwyrm/templates/lists/list.html:92 +#: bookwyrm/templates/snippets/remove_from_group_button.html:19 #: bookwyrm/templates/snippets/shelf_selector.html:26 msgid "Remove" msgstr "" @@ -1946,7 +1948,7 @@ msgstr "" #: bookwyrm/templates/notifications/items/remove.html:23 #, python-format -msgid "You have been removed from the \"%(group_name)s group\"" +msgid "You have been removed from the \"%(group_name)s\" group" msgstr "" #: bookwyrm/templates/notifications/items/reply.html:21 @@ -3443,14 +3445,6 @@ msgstr "" msgid "Sign Up" msgstr "" -#: bookwyrm/templates/snippets/remove_from_group_button.html:16 -msgid " Confirm " -msgstr "" - -#: bookwyrm/templates/snippets/remove_from_group_button.html:19 -msgid " Remove " -msgstr "" - #: bookwyrm/templates/snippets/report_button.html:6 msgid "Report" msgstr ""