diff --git a/bookwyrm/activitystreams.py b/bookwyrm/activitystreams.py index a49a7ce4..01ca3f77 100644 --- a/bookwyrm/activitystreams.py +++ b/bookwyrm/activitystreams.py @@ -4,11 +4,12 @@ from django.db.models import signals, Q from bookwyrm import models from bookwyrm.redis_store import RedisStore, r +from bookwyrm.settings import STREAMS from bookwyrm.views.helpers import privacy_filter class ActivityStream(RedisStore): - """a category of activity stream (like home, local, federated)""" + """a category of activity stream (like home, local, books)""" def stream_id(self, user): """the redis key for this user's instance of this stream""" @@ -155,29 +156,60 @@ class LocalStream(ActivityStream): ) -class FederatedStream(ActivityStream): - """users you follow""" +class BooksStream(ActivityStream): + """books on your shelves""" - key = "federated" + key = "books" def get_audience(self, status): - # this stream wants no part in non-public statuses - if status.privacy != "public": + """anyone with the mentioned book on their shelves""" + # only show public statuses on the books feed, + # and only statuses that mention books + if status.privacy != "public" or not ( + status.mention_books.exists() or hasattr(status, "book") + ): return [] - return super().get_audience(status) + + work = ( + status.book.parent_work + if hasattr(status, "book") + else status.mention_books.first().parent_work + ) + + audience = super().get_audience(status) + if not audience: + return [] + return audience.filter(shelfbook__book__parent_work=work).distinct() def get_statuses_for_user(self, user): + """any public status that mentions the user's books""" + books = user.shelfbook_set.values_list( + "book__parent_work__id", flat=True + ).distinct() return privacy_filter( user, - models.Status.objects.select_subclasses(), + models.Status.objects.select_subclasses() + .filter( + Q(comment__book__parent_work__id__in=books) + | Q(quotation__book__parent_work__id__in=books) + | Q(review__book__parent_work__id__in=books) + | Q(mention_books__parent_work__id__in=books) + ) + .distinct(), privacy_levels=["public"], ) +# determine which streams are enabled in settings.py +available_streams = [s["key"] for s in STREAMS] streams = { - "home": HomeStream(), - "local": LocalStream(), - "federated": FederatedStream(), + k: v + for (k, v) in { + "home": HomeStream(), + "local": LocalStream(), + "books": BooksStream(), + }.items() + if k in available_streams } @@ -197,7 +229,6 @@ def add_status_on_create(sender, instance, created, *args, **kwargs): if not created: return - # iterates through Home, Local, Federated for stream in streams.values(): stream.add_status(instance) @@ -264,7 +295,7 @@ def remove_statuses_on_block(sender, instance, *args, **kwargs): # pylint: disable=unused-argument def add_statuses_on_unblock(sender, instance, *args, **kwargs): """remove statuses from all feeds on block""" - public_streams = [LocalStream(), FederatedStream()] + public_streams = [v for (k, v) in streams.items() if k != "home"] # add statuses back to streams with statuses from anyone if instance.user_subject.local: for stream in public_streams: diff --git a/bookwyrm/migrations/0080_alter_shelfbook_options.py b/bookwyrm/migrations/0080_alter_shelfbook_options.py new file mode 100644 index 00000000..b5ee7e67 --- /dev/null +++ b/bookwyrm/migrations/0080_alter_shelfbook_options.py @@ -0,0 +1,17 @@ +# Generated by Django 3.2.4 on 2021-08-05 00:00 + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ("bookwyrm", "0079_merge_20210804_1746"), + ] + + operations = [ + migrations.AlterModelOptions( + name="shelfbook", + options={"ordering": ("-shelved_date", "-created_date", "-updated_date")}, + ), + ] diff --git a/bookwyrm/settings.py b/bookwyrm/settings.py index 17fcfabe..180191d9 100644 --- a/bookwyrm/settings.py +++ b/bookwyrm/settings.py @@ -118,7 +118,11 @@ REDIS_ACTIVITY_PORT = env("REDIS_ACTIVITY_PORT", 6379) REDIS_ACTIVITY_PASSWORD = env("REDIS_ACTIVITY_PASSWORD", None) MAX_STREAM_LENGTH = int(env("MAX_STREAM_LENGTH", 200)) -STREAMS = ["home", "local", "federated"] + +STREAMS = [ + {"key": "home", "name": _("Home Timeline"), "shortname": _("Home")}, + {"key": "books", "name": _("Books Timeline"), "shortname": _("Books")}, +] # Database # https://docs.djangoproject.com/en/3.2/ref/settings/#databases diff --git a/bookwyrm/templates/feed/feed.html b/bookwyrm/templates/feed/feed.html index 65cf97e1..780f1d17 100644 --- a/bookwyrm/templates/feed/feed.html +++ b/bookwyrm/templates/feed/feed.html @@ -4,35 +4,25 @@ {% block panel %}

- {% if tab == 'home' %} - {% trans "Home Timeline" %} - {% elif tab == 'local' %} - {% trans "Local Timeline" %} - {% else %} - {% trans "Federated Timeline" %} - {% endif %} + {{ tab.name }}

{# announcements and system messages #} {% if not activities.number > 1 %} -{% if request.user.show_goal and not goal and tab == 'home' %} +{% if request.user.show_goal and not goal and tab.key == streams.first.key %} {% now 'Y' as year %}
{% include 'snippets/goal_card.html' with year=year %} diff --git a/bookwyrm/tests/management/test_populate_streams.py b/bookwyrm/tests/management/test_populate_streams.py index ee7a96d7..c080e3fe 100644 --- a/bookwyrm/tests/management/test_populate_streams.py +++ b/bookwyrm/tests/management/test_populate_streams.py @@ -46,4 +46,4 @@ class Activitystreams(TestCase): "bookwyrm.activitystreams.ActivityStream.populate_store" ) as redis_mock: populate_streams() - self.assertEqual(redis_mock.call_count, 6) # 2 users x 3 streams + self.assertEqual(redis_mock.call_count, 4) # 2 users x 2 streams diff --git a/bookwyrm/tests/test_activitystreams.py b/bookwyrm/tests/test_activitystreams.py index f4747971..ba495089 100644 --- a/bookwyrm/tests/test_activitystreams.py +++ b/bookwyrm/tests/test_activitystreams.py @@ -6,6 +6,7 @@ from bookwyrm import activitystreams, models @patch("bookwyrm.models.activitypub_mixin.broadcast_task.delay") @patch("bookwyrm.activitystreams.ActivityStream.add_status") +@patch("bookwyrm.suggested_users.rerank_suggestions_task.delay") class Activitystreams(TestCase): """using redis to build activity streams""" @@ -32,7 +33,8 @@ class Activitystreams(TestCase): inbox="https://example.com/users/rat/inbox", outbox="https://example.com/users/rat/outbox", ) - self.book = models.Edition.objects.create(title="test book") + work = models.Work.objects.create(title="test work") + self.book = models.Edition.objects.create(title="test book", parent_work=work) class TestStream(activitystreams.ActivityStream): """test stream, don't have to do anything here""" @@ -191,19 +193,95 @@ class Activitystreams(TestCase): users = activitystreams.LocalStream().get_audience(status) self.assertEqual(users, []) - def test_federatedstream_get_audience(self, *_): + def test_localstream_get_audience_books_no_book(self, *_): """get a list of users that should see a status""" status = models.Status.objects.create( - user=self.remote_user, content="hi", privacy="public" + user=self.local_user, content="hi", privacy="public" ) - users = activitystreams.FederatedStream().get_audience(status) - self.assertTrue(self.local_user in users) - self.assertTrue(self.another_user in users) + audience = activitystreams.BooksStream().get_audience(status) + # no books, no audience + self.assertEqual(audience, []) - def test_federatedstream_get_audience_unlisted(self, *_): + def test_localstream_get_audience_books_mention_books(self, *_): """get a list of users that should see a status""" status = models.Status.objects.create( - user=self.remote_user, content="hi", privacy="unlisted" + user=self.local_user, content="hi", privacy="public" ) - users = activitystreams.FederatedStream().get_audience(status) - self.assertEqual(users, []) + status.mention_books.add(self.book) + status.save(broadcast=False) + models.ShelfBook.objects.create( + user=self.local_user, + shelf=self.local_user.shelf_set.first(), + book=self.book, + ) + # yes book, yes audience + audience = activitystreams.BooksStream().get_audience(status) + self.assertTrue(self.local_user in audience) + + def test_localstream_get_audience_books_book_field(self, *_): + """get a list of users that should see a status""" + status = models.Comment.objects.create( + user=self.local_user, content="hi", privacy="public", book=self.book + ) + models.ShelfBook.objects.create( + user=self.local_user, + shelf=self.local_user.shelf_set.first(), + book=self.book, + ) + # yes book, yes audience + audience = activitystreams.BooksStream().get_audience(status) + self.assertTrue(self.local_user in audience) + + def test_localstream_get_audience_books_alternate_edition(self, *_): + """get a list of users that should see a status""" + alt_book = models.Edition.objects.create( + title="hi", parent_work=self.book.parent_work + ) + status = models.Comment.objects.create( + user=self.remote_user, content="hi", privacy="public", book=alt_book + ) + models.ShelfBook.objects.create( + user=self.local_user, + shelf=self.local_user.shelf_set.first(), + book=self.book, + ) + # yes book, yes audience + audience = activitystreams.BooksStream().get_audience(status) + self.assertTrue(self.local_user in audience) + + def test_localstream_get_audience_books_non_public(self, *_): + """get a list of users that should see a status""" + alt_book = models.Edition.objects.create( + title="hi", parent_work=self.book.parent_work + ) + status = models.Comment.objects.create( + user=self.remote_user, content="hi", privacy="unlisted", book=alt_book + ) + models.ShelfBook.objects.create( + user=self.local_user, + shelf=self.local_user.shelf_set.first(), + book=self.book, + ) + # yes book, yes audience + audience = activitystreams.BooksStream().get_audience(status) + self.assertEqual(audience, []) + + def test_get_statuses_for_user_books(self, *_): + """create a stream for a user""" + alt_book = models.Edition.objects.create( + title="hi", parent_work=self.book.parent_work + ) + status = models.Status.objects.create( + user=self.local_user, content="hi", privacy="public" + ) + status = models.Comment.objects.create( + user=self.remote_user, content="hi", privacy="public", book=alt_book + ) + models.ShelfBook.objects.create( + user=self.local_user, + shelf=self.local_user.shelf_set.first(), + book=self.book, + ) + # yes book, yes audience + result = activitystreams.BooksStream().get_statuses_for_user(self.local_user) + self.assertEqual(list(result), [status]) diff --git a/bookwyrm/tests/views/test_feed.py b/bookwyrm/tests/views/test_feed.py index 8a38b808..666c3e02 100644 --- a/bookwyrm/tests/views/test_feed.py +++ b/bookwyrm/tests/views/test_feed.py @@ -45,7 +45,7 @@ class FeedViews(TestCase): view = views.Feed.as_view() request = self.factory.get("") request.user = self.local_user - result = view(request, "local") + result = view(request, "home") self.assertIsInstance(result, TemplateResponse) result.render() self.assertEqual(result.status_code, 200) diff --git a/bookwyrm/urls.py b/bookwyrm/urls.py index 7eccfd65..d3e2dad1 100644 --- a/bookwyrm/urls.py +++ b/bookwyrm/urls.py @@ -23,6 +23,8 @@ STATUS_PATH = r"%s/(%s)/(?P\d+)" % (USER_PATH, "|".join(status_types) BOOK_PATH = r"^book/(?P\d+)" +STREAMS = "|".join(s["key"] for s in settings.STREAMS) + urlpatterns = [ path("admin/", admin.site.urls), path( @@ -177,7 +179,7 @@ urlpatterns = [ name="get-started-users", ), # feeds - re_path(r"^(?Phome|local|federated)/?$", views.Feed.as_view()), + re_path(r"^(?P{:s})/?$".format(STREAMS), views.Feed.as_view()), re_path( r"^direct-messages/?$", views.DirectMessage.as_view(), name="direct-messages" ), diff --git a/bookwyrm/views/feed.py b/bookwyrm/views/feed.py index 3001c86e..7a46ca57 100644 --- a/bookwyrm/views/feed.py +++ b/bookwyrm/views/feed.py @@ -23,10 +23,12 @@ class Feed(View): def get(self, request, tab): """user's homepage with activity feed""" - if not tab in STREAMS: - tab = "home" + tab = [s for s in STREAMS if s["key"] == tab] + tab = tab[0] if tab else STREAMS[0] - activities = activitystreams.streams[tab].get_activity_stream(request.user) + activities = activitystreams.streams[tab["key"]].get_activity_stream( + request.user + ) paginated = Paginator(activities, PAGE_LENGTH) suggestions = suggested_users.get_suggestions(request.user) @@ -38,8 +40,9 @@ class Feed(View): "activities": paginated.get_page(request.GET.get("page")), "suggested_users": suggestions, "tab": tab, + "streams": STREAMS, "goal_form": forms.GoalForm(), - "path": "/%s" % tab, + "path": "/%s" % tab["key"], }, } return TemplateResponse(request, "feed/feed.html", data) diff --git a/locale/de_DE/LC_MESSAGES/django.mo b/locale/de_DE/LC_MESSAGES/django.mo index fb151841..543d5355 100644 Binary files a/locale/de_DE/LC_MESSAGES/django.mo and b/locale/de_DE/LC_MESSAGES/django.mo differ diff --git a/locale/de_DE/LC_MESSAGES/django.po b/locale/de_DE/LC_MESSAGES/django.po index 5edf43d6..b047f031 100644 --- a/locale/de_DE/LC_MESSAGES/django.po +++ b/locale/de_DE/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-08-04 20:40+0000\n" +"POT-Creation-Date: 2021-08-05 01:33+0000\n" "PO-Revision-Date: 2021-03-02 17:19-0800\n" "Last-Translator: Mouse Reeve \n" "Language-Team: English \n" @@ -101,27 +101,49 @@ msgstr "Username" msgid "A user with that username already exists." msgstr "Dieser Benutzename ist bereits vergeben." -#: bookwyrm/settings.py:166 +#: bookwyrm/settings.py:123 +msgid "Home Timeline" +msgstr "" + +#: bookwyrm/settings.py:123 +msgid "Home" +msgstr "" + +#: bookwyrm/settings.py:124 +#, fuzzy +#| msgid "Title" +msgid "Books Timeline" +msgstr "Titel" + +#: bookwyrm/settings.py:124 bookwyrm/templates/search/layout.html:21 +#: bookwyrm/templates/search/layout.html:42 +#: bookwyrm/templates/user/layout.html:81 +#, fuzzy +#| msgid "Book" +msgid "Books" +msgstr "Buch" + +#: bookwyrm/settings.py:170 msgid "English" msgstr "Englisch" -#: bookwyrm/settings.py:167 +#: bookwyrm/settings.py:171 msgid "German" msgstr "Deutsch" -#: bookwyrm/settings.py:168 +#: bookwyrm/settings.py:172 msgid "Spanish" msgstr "Spanisch" -#: bookwyrm/settings.py:169 +#: bookwyrm/settings.py:173 msgid "French" msgstr "Französisch" -#: bookwyrm/settings.py:170 +#: bookwyrm/settings.py:174 msgid "Simplified Chinese" msgstr "Vereinfachtes Chinesisch" -#: bookwyrm/settings.py:171 +#: bookwyrm/settings.py:175 msgid "Traditional Chinese" msgstr "" @@ -972,39 +994,12 @@ msgstr "Alle Nachrichten" msgid "You have no messages right now." msgstr "Du hast momentan keine Nachrichten." -#: bookwyrm/templates/feed/feed.html:8 -msgid "Home Timeline" -msgstr "" - -#: bookwyrm/templates/feed/feed.html:10 -msgid "Local Timeline" -msgstr "" - -#: bookwyrm/templates/feed/feed.html:12 -#, fuzzy -#| msgid "Federated Servers" -msgid "Federated Timeline" -msgstr "Föderierende Server" - -#: bookwyrm/templates/feed/feed.html:18 -msgid "Home" -msgstr "" - -#: bookwyrm/templates/feed/feed.html:21 -msgid "Local" -msgstr "Lokal" - -#: bookwyrm/templates/feed/feed.html:24 -#: bookwyrm/templates/settings/edit_server.html:40 -msgid "Federated" -msgstr "Föderiert" - -#: bookwyrm/templates/feed/feed.html:32 +#: bookwyrm/templates/feed/feed.html:22 #, python-format -msgid "load 0 unread status(es)" +msgid "load 0 unread status(es)" msgstr "" -#: bookwyrm/templates/feed/feed.html:48 +#: bookwyrm/templates/feed/feed.html:38 msgid "There aren't any activities right now! Try following a user to get started" msgstr "Hier sind noch keine Aktivitäten! Folge anderen, um loszulegen" @@ -2020,14 +2015,6 @@ msgstr "Suche nach Buch oder Benutzer*in" msgid "Search type" msgstr "Suche" -#: bookwyrm/templates/search/layout.html:21 -#: bookwyrm/templates/search/layout.html:42 -#: bookwyrm/templates/user/layout.html:81 -#, fuzzy -#| msgid "Book" -msgid "Books" -msgstr "Buch" - #: bookwyrm/templates/search/layout.html:23 #: bookwyrm/templates/search/layout.html:46 #: bookwyrm/templates/settings/admin_layout.html:26 @@ -2242,6 +2229,10 @@ msgstr "Instanzname" msgid "Status:" msgstr "Importstatus" +#: bookwyrm/templates/settings/edit_server.html:40 +msgid "Federated" +msgstr "Föderiert" + #: bookwyrm/templates/settings/edit_server.html:41 #: bookwyrm/templates/settings/federated_server.html:10 #, fuzzy @@ -2573,15 +2564,23 @@ msgstr "Registrierungen geschlossen text" msgid "Posted by %(username)s" msgstr "Direktnachrichten mit %(username)s" +#: bookwyrm/templates/snippets/authors.html:22 +#, python-format +msgid "and %(remainder_count_display)s other" +msgid_plural "and %(remainder_count_display)s others" +msgstr[0] "" +msgstr[1] "" + #: bookwyrm/templates/snippets/book_cover.html:32 #, fuzzy #| msgid "Add cover" msgid "No cover" msgstr "Cover hinzufügen" -#: bookwyrm/templates/snippets/book_titleby.html:4 -#, python-format -msgid "%(title)s by " +#: bookwyrm/templates/snippets/book_titleby.html:6 +#, fuzzy, python-format +#| msgid "%(title)s by " +msgid "%(title)s by" msgstr "%(title)s von " #: bookwyrm/templates/snippets/boost_button.html:20 @@ -3313,6 +3312,14 @@ msgstr "Dieser Benutzename ist bereits vergeben." msgid "A password reset link sent to %s" msgstr "" +#, fuzzy +#~| msgid "Federated Servers" +#~ msgid "Federated Timeline" +#~ msgstr "Föderierende Server" + +#~ msgid "Local" +#~ msgstr "Lokal" + #, fuzzy #~| msgid "Direct Messages with %(username)s" #~ msgid "Remove %(name)s" diff --git a/locale/en_US/LC_MESSAGES/django.po b/locale/en_US/LC_MESSAGES/django.po index ce06013f..153d8b9a 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-08-04 20:40+0000\n" +"POT-Creation-Date: 2021-08-05 01:33+0000\n" "PO-Revision-Date: 2021-02-28 17:19-0800\n" "Last-Translator: Mouse Reeve \n" "Language-Team: English \n" @@ -91,27 +91,45 @@ msgstr "" msgid "A user with that username already exists." msgstr "" -#: bookwyrm/settings.py:166 -msgid "English" +#: bookwyrm/settings.py:123 +msgid "Home Timeline" msgstr "" -#: bookwyrm/settings.py:167 -msgid "German" +#: bookwyrm/settings.py:123 +msgid "Home" msgstr "" -#: bookwyrm/settings.py:168 -msgid "Spanish" +#: bookwyrm/settings.py:124 +msgid "Books Timeline" msgstr "" -#: bookwyrm/settings.py:169 -msgid "French" +#: bookwyrm/settings.py:124 bookwyrm/templates/search/layout.html:21 +#: bookwyrm/templates/search/layout.html:42 +#: bookwyrm/templates/user/layout.html:81 +msgid "Books" msgstr "" #: bookwyrm/settings.py:170 -msgid "Simplified Chinese" +msgid "English" msgstr "" #: bookwyrm/settings.py:171 +msgid "German" +msgstr "" + +#: bookwyrm/settings.py:172 +msgid "Spanish" +msgstr "" + +#: bookwyrm/settings.py:173 +msgid "French" +msgstr "" + +#: bookwyrm/settings.py:174 +msgid "Simplified Chinese" +msgstr "" + +#: bookwyrm/settings.py:175 msgid "Traditional Chinese" msgstr "" @@ -896,37 +914,12 @@ msgstr "" msgid "You have no messages right now." msgstr "" -#: bookwyrm/templates/feed/feed.html:8 -msgid "Home Timeline" -msgstr "" - -#: bookwyrm/templates/feed/feed.html:10 -msgid "Local Timeline" -msgstr "" - -#: bookwyrm/templates/feed/feed.html:12 -msgid "Federated Timeline" -msgstr "" - -#: bookwyrm/templates/feed/feed.html:18 -msgid "Home" -msgstr "" - -#: bookwyrm/templates/feed/feed.html:21 -msgid "Local" -msgstr "" - -#: bookwyrm/templates/feed/feed.html:24 -#: bookwyrm/templates/settings/edit_server.html:40 -msgid "Federated" -msgstr "" - -#: bookwyrm/templates/feed/feed.html:32 +#: bookwyrm/templates/feed/feed.html:22 #, python-format -msgid "load 0 unread status(es)" +msgid "load 0 unread status(es)" msgstr "" -#: bookwyrm/templates/feed/feed.html:48 +#: bookwyrm/templates/feed/feed.html:38 msgid "There aren't any activities right now! Try following a user to get started" msgstr "" @@ -1864,12 +1857,6 @@ msgstr "" msgid "Search type" msgstr "" -#: bookwyrm/templates/search/layout.html:21 -#: bookwyrm/templates/search/layout.html:42 -#: bookwyrm/templates/user/layout.html:81 -msgid "Books" -msgstr "" - #: bookwyrm/templates/search/layout.html:23 #: bookwyrm/templates/search/layout.html:46 #: bookwyrm/templates/settings/admin_layout.html:26 @@ -2045,6 +2032,10 @@ msgstr "" msgid "Status:" msgstr "" +#: bookwyrm/templates/settings/edit_server.html:40 +msgid "Federated" +msgstr "" + #: bookwyrm/templates/settings/edit_server.html:41 #: bookwyrm/templates/settings/federated_server.html:10 msgid "Blocked" @@ -2333,13 +2324,20 @@ msgstr "" msgid "Posted by %(username)s" msgstr "" +#: bookwyrm/templates/snippets/authors.html:22 +#, python-format +msgid "and %(remainder_count_display)s other" +msgid_plural "and %(remainder_count_display)s others" +msgstr[0] "" +msgstr[1] "" + #: bookwyrm/templates/snippets/book_cover.html:32 msgid "No cover" msgstr "" -#: bookwyrm/templates/snippets/book_titleby.html:4 +#: bookwyrm/templates/snippets/book_titleby.html:6 #, python-format -msgid "%(title)s by " +msgid "%(title)s by" msgstr "" #: bookwyrm/templates/snippets/boost_button.html:20 diff --git a/locale/es/LC_MESSAGES/django.mo b/locale/es/LC_MESSAGES/django.mo index 69c734d4..23869cf4 100644 Binary files a/locale/es/LC_MESSAGES/django.mo and b/locale/es/LC_MESSAGES/django.mo differ diff --git a/locale/es/LC_MESSAGES/django.po b/locale/es/LC_MESSAGES/django.po index fd76f60d..5bae4d7e 100644 --- a/locale/es/LC_MESSAGES/django.po +++ b/locale/es/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-08-04 20:40+0000\n" +"POT-Creation-Date: 2021-08-05 01:33+0000\n" "PO-Revision-Date: 2021-03-19 11:49+0800\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -91,27 +91,47 @@ msgstr "nombre de usuario" msgid "A user with that username already exists." msgstr "Ya existe un usuario con ese nombre." -#: bookwyrm/settings.py:166 +#: bookwyrm/settings.py:123 +msgid "Home Timeline" +msgstr "Línea temporal de hogar" + +#: bookwyrm/settings.py:123 +msgid "Home" +msgstr "Hogar" + +#: bookwyrm/settings.py:124 +#, fuzzy +#| msgid "Book Title" +msgid "Books Timeline" +msgstr "Título" + +#: bookwyrm/settings.py:124 bookwyrm/templates/search/layout.html:21 +#: bookwyrm/templates/search/layout.html:42 +#: bookwyrm/templates/user/layout.html:81 +msgid "Books" +msgstr "Libros" + +#: bookwyrm/settings.py:170 msgid "English" msgstr "Inglés" -#: bookwyrm/settings.py:167 +#: bookwyrm/settings.py:171 msgid "German" msgstr "Aléman" -#: bookwyrm/settings.py:168 +#: bookwyrm/settings.py:172 msgid "Spanish" msgstr "Español" -#: bookwyrm/settings.py:169 +#: bookwyrm/settings.py:173 msgid "French" msgstr "Francés" -#: bookwyrm/settings.py:170 +#: bookwyrm/settings.py:174 msgid "Simplified Chinese" msgstr "Chino simplificado" -#: bookwyrm/settings.py:171 +#: bookwyrm/settings.py:175 #, fuzzy #| msgid "Additional info:" msgid "Traditional Chinese" @@ -904,37 +924,13 @@ msgstr "Todos los mensajes" msgid "You have no messages right now." msgstr "No tienes ningún mensaje en este momento." -#: bookwyrm/templates/feed/feed.html:8 -msgid "Home Timeline" -msgstr "Línea temporal de hogar" - -#: bookwyrm/templates/feed/feed.html:10 -msgid "Local Timeline" -msgstr "Línea temporal local" - -#: bookwyrm/templates/feed/feed.html:12 -msgid "Federated Timeline" -msgstr "Línea temporal federalizado" - -#: bookwyrm/templates/feed/feed.html:18 -msgid "Home" -msgstr "Hogar" - -#: bookwyrm/templates/feed/feed.html:21 -msgid "Local" -msgstr "Local" - -#: bookwyrm/templates/feed/feed.html:24 -#: bookwyrm/templates/settings/edit_server.html:40 -msgid "Federated" -msgstr "Federalizado" - -#: bookwyrm/templates/feed/feed.html:32 -#, python-format -msgid "load 0 unread status(es)" +#: bookwyrm/templates/feed/feed.html:22 +#, fuzzy, python-format +#| msgid "load 0 unread status(es)" +msgid "load 0 unread status(es)" msgstr "cargar 0 status(es) no leídos" -#: bookwyrm/templates/feed/feed.html:48 +#: bookwyrm/templates/feed/feed.html:38 msgid "There aren't any activities right now! Try following a user to get started" msgstr "¡No hay actividad ahora mismo! Sigue a otro usuario para empezar" @@ -1885,12 +1881,6 @@ msgstr "Búsqueda" msgid "Search type" msgstr "Tipo de búsqueda" -#: bookwyrm/templates/search/layout.html:21 -#: bookwyrm/templates/search/layout.html:42 -#: bookwyrm/templates/user/layout.html:81 -msgid "Books" -msgstr "Libros" - #: bookwyrm/templates/search/layout.html:23 #: bookwyrm/templates/search/layout.html:46 #: bookwyrm/templates/settings/admin_layout.html:26 @@ -2072,6 +2062,10 @@ msgstr "Instancia:" msgid "Status:" msgstr "Status:" +#: bookwyrm/templates/settings/edit_server.html:40 +msgid "Federated" +msgstr "Federalizado" + #: bookwyrm/templates/settings/edit_server.html:41 #: bookwyrm/templates/settings/federated_server.html:10 msgid "Blocked" @@ -2366,13 +2360,21 @@ msgstr "Texto de registración cerrada:" msgid "Posted by %(username)s" msgstr "Publicado por %(username)s" +#: bookwyrm/templates/snippets/authors.html:22 +#, python-format +msgid "and %(remainder_count_display)s other" +msgid_plural "and %(remainder_count_display)s others" +msgstr[0] "" +msgstr[1] "" + #: bookwyrm/templates/snippets/book_cover.html:32 msgid "No cover" msgstr "Sin portada" -#: bookwyrm/templates/snippets/book_titleby.html:4 -#, python-format -msgid "%(title)s by " +#: bookwyrm/templates/snippets/book_titleby.html:6 +#, fuzzy, python-format +#| msgid "%(title)s by " +msgid "%(title)s by" msgstr "%(title)s por " #: bookwyrm/templates/snippets/boost_button.html:20 @@ -3047,6 +3049,15 @@ msgstr "No se pudo encontrar un usuario con esa dirección de correo electrónic msgid "A password reset link sent to %s" msgstr "Un enlace para reestablecer tu contraseña se enviará a %s" +#~ msgid "Local Timeline" +#~ msgstr "Línea temporal local" + +#~ msgid "Federated Timeline" +#~ msgstr "Línea temporal federalizado" + +#~ msgid "Local" +#~ msgstr "Local" + #~ msgid "Remove %(name)s" #~ msgstr "Eliminar %(name)s" diff --git a/locale/fr_FR/LC_MESSAGES/django.mo b/locale/fr_FR/LC_MESSAGES/django.mo index 3d622ac6..f8ade2a3 100644 Binary files a/locale/fr_FR/LC_MESSAGES/django.mo and b/locale/fr_FR/LC_MESSAGES/django.mo differ diff --git a/locale/fr_FR/LC_MESSAGES/django.po b/locale/fr_FR/LC_MESSAGES/django.po index c4ca623c..399e4056 100644 --- a/locale/fr_FR/LC_MESSAGES/django.po +++ b/locale/fr_FR/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: 0.1.1\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-08-04 20:40+0000\n" +"POT-Creation-Date: 2021-08-05 01:33+0000\n" "PO-Revision-Date: 2021-04-05 12:44+0100\n" "Last-Translator: Fabien Basmaison \n" "Language-Team: Mouse Reeve \n" @@ -91,27 +91,47 @@ msgstr "nom du compte :" msgid "A user with that username already exists." msgstr "Ce nom est déjà associé à un compte." -#: bookwyrm/settings.py:166 +#: bookwyrm/settings.py:123 +msgid "Home Timeline" +msgstr "Mon fil d’actualité" + +#: bookwyrm/settings.py:123 +msgid "Home" +msgstr "Accueil" + +#: bookwyrm/settings.py:124 +#, fuzzy +#| msgid "Book Title" +msgid "Books Timeline" +msgstr "Titre du livre" + +#: bookwyrm/settings.py:124 bookwyrm/templates/search/layout.html:21 +#: bookwyrm/templates/search/layout.html:42 +#: bookwyrm/templates/user/layout.html:81 +msgid "Books" +msgstr "Livres" + +#: bookwyrm/settings.py:170 msgid "English" msgstr "English" -#: bookwyrm/settings.py:167 +#: bookwyrm/settings.py:171 msgid "German" msgstr "Deutsch" -#: bookwyrm/settings.py:168 +#: bookwyrm/settings.py:172 msgid "Spanish" msgstr "Español" -#: bookwyrm/settings.py:169 +#: bookwyrm/settings.py:173 msgid "French" msgstr "Français" -#: bookwyrm/settings.py:170 +#: bookwyrm/settings.py:174 msgid "Simplified Chinese" msgstr "简化字" -#: bookwyrm/settings.py:171 +#: bookwyrm/settings.py:175 #, fuzzy #| msgid "Additional info:" msgid "Traditional Chinese" @@ -900,37 +920,13 @@ msgstr "Tous les messages" msgid "You have no messages right now." msgstr "Vous n’avez aucun message pour l’instant." -#: bookwyrm/templates/feed/feed.html:8 -msgid "Home Timeline" -msgstr "Mon fil d’actualité" - -#: bookwyrm/templates/feed/feed.html:10 -msgid "Local Timeline" -msgstr "Fil d’actualité local" - -#: bookwyrm/templates/feed/feed.html:12 -msgid "Federated Timeline" -msgstr "Fil d’actualité des instances fédérées" - -#: bookwyrm/templates/feed/feed.html:18 -msgid "Home" -msgstr "Accueil" - -#: bookwyrm/templates/feed/feed.html:21 -msgid "Local" -msgstr "Local" - -#: bookwyrm/templates/feed/feed.html:24 -#: bookwyrm/templates/settings/edit_server.html:40 -msgid "Federated" -msgstr "Fédéré" - -#: bookwyrm/templates/feed/feed.html:32 -#, python-format -msgid "load 0 unread status(es)" +#: bookwyrm/templates/feed/feed.html:22 +#, fuzzy, python-format +#| msgid "load 0 unread status(es)" +msgid "load 0 unread status(es)" msgstr "charger le(s) 0 statut(s) non lu(s)" -#: bookwyrm/templates/feed/feed.html:48 +#: bookwyrm/templates/feed/feed.html:38 msgid "There aren't any activities right now! Try following a user to get started" msgstr "Aucune activité pour l’instant ! Abonnez‑vous à quelqu’un pour commencer" @@ -1879,12 +1875,6 @@ msgstr "Requête" msgid "Search type" msgstr "Type de recherche" -#: bookwyrm/templates/search/layout.html:21 -#: bookwyrm/templates/search/layout.html:42 -#: bookwyrm/templates/user/layout.html:81 -msgid "Books" -msgstr "Livres" - #: bookwyrm/templates/search/layout.html:23 #: bookwyrm/templates/search/layout.html:46 #: bookwyrm/templates/settings/admin_layout.html:26 @@ -2060,6 +2050,10 @@ msgstr "Instance :" msgid "Status:" msgstr "Statut :" +#: bookwyrm/templates/settings/edit_server.html:40 +msgid "Federated" +msgstr "Fédéré" + #: bookwyrm/templates/settings/edit_server.html:41 #: bookwyrm/templates/settings/federated_server.html:10 msgid "Blocked" @@ -2348,13 +2342,21 @@ msgstr "Texte affiché lorsque les inscriptions sont closes :" msgid "Posted by %(username)s" msgstr "Publiée par %(username)s" +#: bookwyrm/templates/snippets/authors.html:22 +#, python-format +msgid "and %(remainder_count_display)s other" +msgid_plural "and %(remainder_count_display)s others" +msgstr[0] "" +msgstr[1] "" + #: bookwyrm/templates/snippets/book_cover.html:32 msgid "No cover" msgstr "Pas de couverture" -#: bookwyrm/templates/snippets/book_titleby.html:4 -#, python-format -msgid "%(title)s by " +#: bookwyrm/templates/snippets/book_titleby.html:6 +#, fuzzy, python-format +#| msgid "%(title)s by " +msgid "%(title)s by" msgstr "%(title)s par " #: bookwyrm/templates/snippets/boost_button.html:20 @@ -3026,6 +3028,15 @@ msgstr "Aucun compte avec cette adresse email n’a été trouvé." msgid "A password reset link sent to %s" msgstr "Un lien de réinitialisation a été envoyé à %s." +#~ msgid "Local Timeline" +#~ msgstr "Fil d’actualité local" + +#~ msgid "Federated Timeline" +#~ msgstr "Fil d’actualité des instances fédérées" + +#~ msgid "Local" +#~ msgstr "Local" + #, fuzzy #~| msgid "BookWyrm users" #~ msgid "BookWyrm\\" diff --git a/locale/zh_Hans/LC_MESSAGES/django.mo b/locale/zh_Hans/LC_MESSAGES/django.mo index 3450c353..66450333 100644 Binary files a/locale/zh_Hans/LC_MESSAGES/django.mo and b/locale/zh_Hans/LC_MESSAGES/django.mo differ diff --git a/locale/zh_Hans/LC_MESSAGES/django.po b/locale/zh_Hans/LC_MESSAGES/django.po index f74dfd4a..d9921655 100644 --- a/locale/zh_Hans/LC_MESSAGES/django.po +++ b/locale/zh_Hans/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: 0.1.1\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-08-04 20:40+0000\n" +"POT-Creation-Date: 2021-08-05 01:33+0000\n" "PO-Revision-Date: 2021-03-20 00:56+0000\n" "Last-Translator: Kana \n" "Language-Team: Mouse Reeve \n" @@ -91,27 +91,47 @@ msgstr "用户名" msgid "A user with that username already exists." msgstr "已经存在使用该用户名的用户。" -#: bookwyrm/settings.py:166 +#: bookwyrm/settings.py:123 +msgid "Home Timeline" +msgstr "主页时间线" + +#: bookwyrm/settings.py:123 +msgid "Home" +msgstr "主页" + +#: bookwyrm/settings.py:124 +#, fuzzy +#| msgid "Book Title" +msgid "Books Timeline" +msgstr "书名" + +#: bookwyrm/settings.py:124 bookwyrm/templates/search/layout.html:21 +#: bookwyrm/templates/search/layout.html:42 +#: bookwyrm/templates/user/layout.html:81 +msgid "Books" +msgstr "书目" + +#: bookwyrm/settings.py:170 msgid "English" msgstr "English(英语)" -#: bookwyrm/settings.py:167 +#: bookwyrm/settings.py:171 msgid "German" msgstr "Deutsch(德语)" -#: bookwyrm/settings.py:168 +#: bookwyrm/settings.py:172 msgid "Spanish" msgstr "Español(西班牙语)" -#: bookwyrm/settings.py:169 +#: bookwyrm/settings.py:173 msgid "French" msgstr "Français(法语)" -#: bookwyrm/settings.py:170 +#: bookwyrm/settings.py:174 msgid "Simplified Chinese" msgstr "简体中文" -#: bookwyrm/settings.py:171 +#: bookwyrm/settings.py:175 msgid "Traditional Chinese" msgstr "繁體中文(繁体中文)" @@ -895,37 +915,13 @@ msgstr "所有消息" msgid "You have no messages right now." msgstr "你现在没有消息。" -#: bookwyrm/templates/feed/feed.html:8 -msgid "Home Timeline" -msgstr "主页时间线" - -#: bookwyrm/templates/feed/feed.html:10 -msgid "Local Timeline" -msgstr "本地时间线" - -#: bookwyrm/templates/feed/feed.html:12 -msgid "Federated Timeline" -msgstr "跨站时间线" - -#: bookwyrm/templates/feed/feed.html:18 -msgid "Home" -msgstr "主页" - -#: bookwyrm/templates/feed/feed.html:21 -msgid "Local" -msgstr "本站" - -#: bookwyrm/templates/feed/feed.html:24 -#: bookwyrm/templates/settings/edit_server.html:40 -msgid "Federated" -msgstr "跨站" - -#: bookwyrm/templates/feed/feed.html:32 -#, python-format -msgid "load 0 unread status(es)" +#: bookwyrm/templates/feed/feed.html:22 +#, fuzzy, python-format +#| msgid "load 0 unread status(es)" +msgid "load 0 unread status(es)" msgstr "加载 0 条未读状态" -#: bookwyrm/templates/feed/feed.html:48 +#: bookwyrm/templates/feed/feed.html:38 msgid "There aren't any activities right now! Try following a user to get started" msgstr "现在还没有任何活动!尝试从关注一个用户开始吧" @@ -1865,12 +1861,6 @@ msgstr "搜索请求" msgid "Search type" msgstr "搜索类型" -#: bookwyrm/templates/search/layout.html:21 -#: bookwyrm/templates/search/layout.html:42 -#: bookwyrm/templates/user/layout.html:81 -msgid "Books" -msgstr "书目" - #: bookwyrm/templates/search/layout.html:23 #: bookwyrm/templates/search/layout.html:46 #: bookwyrm/templates/settings/admin_layout.html:26 @@ -2046,6 +2036,10 @@ msgstr "实例:" msgid "Status:" msgstr "状态:" +#: bookwyrm/templates/settings/edit_server.html:40 +msgid "Federated" +msgstr "跨站" + #: bookwyrm/templates/settings/edit_server.html:41 #: bookwyrm/templates/settings/federated_server.html:10 msgid "Blocked" @@ -2334,13 +2328,20 @@ msgstr "注册关闭文字:" msgid "Posted by %(username)s" msgstr "由 %(username)s 发布" +#: bookwyrm/templates/snippets/authors.html:22 +#, python-format +msgid "and %(remainder_count_display)s other" +msgid_plural "and %(remainder_count_display)s others" +msgstr[0] "" + #: bookwyrm/templates/snippets/book_cover.html:32 msgid "No cover" msgstr "没有封面" -#: bookwyrm/templates/snippets/book_titleby.html:4 -#, python-format -msgid "%(title)s by " +#: bookwyrm/templates/snippets/book_titleby.html:6 +#, fuzzy, python-format +#| msgid "%(title)s by " +msgid "%(title)s by" msgstr "%(title)s 来自" #: bookwyrm/templates/snippets/boost_button.html:20 @@ -3003,3 +3004,12 @@ msgstr "没有找到使用该邮箱的用户。" #, python-format msgid "A password reset link sent to %s" msgstr "密码重置连接已发送给 %s" + +#~ msgid "Local Timeline" +#~ msgstr "本地时间线" + +#~ msgid "Federated Timeline" +#~ msgstr "跨站时间线" + +#~ msgid "Local" +#~ msgstr "本站" diff --git a/locale/zh_Hant/LC_MESSAGES/django.mo b/locale/zh_Hant/LC_MESSAGES/django.mo index 8c8b5af8..552fea2a 100644 Binary files a/locale/zh_Hant/LC_MESSAGES/django.mo and b/locale/zh_Hant/LC_MESSAGES/django.mo differ diff --git a/locale/zh_Hant/LC_MESSAGES/django.po b/locale/zh_Hant/LC_MESSAGES/django.po index b7736822..5ce42251 100644 --- a/locale/zh_Hant/LC_MESSAGES/django.po +++ b/locale/zh_Hant/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-08-04 20:40+0000\n" +"POT-Creation-Date: 2021-08-05 01:33+0000\n" "PO-Revision-Date: 2021-06-30 10:36+0000\n" "Last-Translator: Grace Cheng \n" "Language-Team: LANGUAGE \n" @@ -91,27 +91,47 @@ msgstr "使用者名稱" msgid "A user with that username already exists." msgstr "已經存在使用該名稱的使用者。" -#: bookwyrm/settings.py:166 +#: bookwyrm/settings.py:123 +msgid "Home Timeline" +msgstr "主頁時間線" + +#: bookwyrm/settings.py:123 +msgid "Home" +msgstr "主頁" + +#: bookwyrm/settings.py:124 +#, fuzzy +#| msgid "Book Title" +msgid "Books Timeline" +msgstr "書名" + +#: bookwyrm/settings.py:124 bookwyrm/templates/search/layout.html:21 +#: bookwyrm/templates/search/layout.html:42 +#: bookwyrm/templates/user/layout.html:81 +msgid "Books" +msgstr "書目" + +#: bookwyrm/settings.py:170 msgid "English" msgstr "English(英語)" -#: bookwyrm/settings.py:167 +#: bookwyrm/settings.py:171 msgid "German" msgstr "Deutsch(德語)" -#: bookwyrm/settings.py:168 +#: bookwyrm/settings.py:172 msgid "Spanish" msgstr "Español(西班牙語)" -#: bookwyrm/settings.py:169 +#: bookwyrm/settings.py:173 msgid "French" msgstr "Français(法語)" -#: bookwyrm/settings.py:170 +#: bookwyrm/settings.py:174 msgid "Simplified Chinese" msgstr "簡體中文" -#: bookwyrm/settings.py:171 +#: bookwyrm/settings.py:175 #, fuzzy #| msgid "Tranditional Chinese" msgid "Traditional Chinese" @@ -901,37 +921,13 @@ msgstr "所有訊息" msgid "You have no messages right now." msgstr "你現在沒有訊息。" -#: bookwyrm/templates/feed/feed.html:8 -msgid "Home Timeline" -msgstr "主頁時間線" - -#: bookwyrm/templates/feed/feed.html:10 -msgid "Local Timeline" -msgstr "本地時間線" - -#: bookwyrm/templates/feed/feed.html:12 -msgid "Federated Timeline" -msgstr "跨站時間線" - -#: bookwyrm/templates/feed/feed.html:18 -msgid "Home" -msgstr "主頁" - -#: bookwyrm/templates/feed/feed.html:21 -msgid "Local" -msgstr "本站" - -#: bookwyrm/templates/feed/feed.html:24 -#: bookwyrm/templates/settings/edit_server.html:40 -msgid "Federated" -msgstr "跨站" - -#: bookwyrm/templates/feed/feed.html:32 -#, python-format -msgid "load 0 unread status(es)" +#: bookwyrm/templates/feed/feed.html:22 +#, fuzzy, python-format +#| msgid "load 0 unread status(es)" +msgid "load 0 unread status(es)" msgstr "載入 0 條未讀狀態" -#: bookwyrm/templates/feed/feed.html:48 +#: bookwyrm/templates/feed/feed.html:38 msgid "There aren't any activities right now! Try following a user to get started" msgstr "現在還沒有任何活動!嘗試著從關注一個使用者開始吧" @@ -1880,12 +1876,6 @@ msgstr "搜尋請求" msgid "Search type" msgstr "搜尋類別" -#: bookwyrm/templates/search/layout.html:21 -#: bookwyrm/templates/search/layout.html:42 -#: bookwyrm/templates/user/layout.html:81 -msgid "Books" -msgstr "書目" - #: bookwyrm/templates/search/layout.html:23 #: bookwyrm/templates/search/layout.html:46 #: bookwyrm/templates/settings/admin_layout.html:26 @@ -2061,6 +2051,10 @@ msgstr "實例:" msgid "Status:" msgstr "狀態:" +#: bookwyrm/templates/settings/edit_server.html:40 +msgid "Federated" +msgstr "跨站" + #: bookwyrm/templates/settings/edit_server.html:41 #: bookwyrm/templates/settings/federated_server.html:10 msgid "Blocked" @@ -2353,13 +2347,20 @@ msgstr "註冊關閉文字:" msgid "Posted by %(username)s" msgstr "由 %(username)s 釋出" +#: bookwyrm/templates/snippets/authors.html:22 +#, python-format +msgid "and %(remainder_count_display)s other" +msgid_plural "and %(remainder_count_display)s others" +msgstr[0] "" + #: bookwyrm/templates/snippets/book_cover.html:32 msgid "No cover" msgstr "沒有封面" -#: bookwyrm/templates/snippets/book_titleby.html:4 -#, python-format -msgid "%(title)s by " +#: bookwyrm/templates/snippets/book_titleby.html:6 +#, fuzzy, python-format +#| msgid "%(title)s by " +msgid "%(title)s by" msgstr "%(title)s 來自" #: bookwyrm/templates/snippets/boost_button.html:20 @@ -3023,5 +3024,14 @@ msgstr "沒有找到使用該郵箱的使用者。" msgid "A password reset link sent to %s" msgstr "密碼重置連結已傳送給 %s" +#~ msgid "Local Timeline" +#~ msgstr "本地時間線" + +#~ msgid "Federated Timeline" +#~ msgstr "跨站時間線" + +#~ msgid "Local" +#~ msgstr "本站" + #~ msgid "Remove %(name)s" #~ msgstr "移除 %(name)s"