From fd56379518f93aa56dcb2e1a64f51fc2a400cc47 Mon Sep 17 00:00:00 2001 From: Mouse Reeve Date: Mon, 9 Aug 2021 07:38:43 -0700 Subject: [PATCH 1/5] Updates rss feed view --- bookwyrm/tests/views/test_rss_feed.py | 65 ++++++++++++--------------- bookwyrm/views/rss_feed.py | 15 ++++++- 2 files changed, 42 insertions(+), 38 deletions(-) diff --git a/bookwyrm/tests/views/test_rss_feed.py b/bookwyrm/tests/views/test_rss_feed.py index 3608b043a..715add3f2 100644 --- a/bookwyrm/tests/views/test_rss_feed.py +++ b/bookwyrm/tests/views/test_rss_feed.py @@ -1,5 +1,4 @@ """ testing import """ - from unittest.mock import patch from django.test import RequestFactory, TestCase @@ -7,57 +6,51 @@ from bookwyrm import models from bookwyrm.views import rss_feed +@patch("bookwyrm.models.activitypub_mixin.broadcast_task.delay") +@patch("bookwyrm.activitystreams.ActivityStream.get_activity_stream") +@patch("bookwyrm.activitystreams.ActivityStream.add_status") class RssFeedView(TestCase): """rss feed behaves as expected""" - def setUp(self): - """test data""" - self.site = models.SiteSettings.objects.create() + def test_rss_feed(self, *_): + """load an rss feed""" + models.SiteSettings.objects.create() - with patch("bookwyrm.suggested_users.rerank_suggestions_task.delay"): - self.user = models.User.objects.create_user( - "rss_user", "rss@test.rss", "password", local=True - ) + user = models.User.objects.create_user( + "rss_user", "rss@test.rss", "password", local=True + ) work = models.Work.objects.create(title="Test Work") - self.book = models.Edition.objects.create( + book = models.Edition.objects.create( title="Example Edition", remote_id="https://example.com/book/1", parent_work=work, ) - with patch("bookwyrm.models.activitypub_mixin.broadcast_task.delay"): - with patch("bookwyrm.activitystreams.ActivityStream.add_status"): - self.review = models.Review.objects.create( - name="Review name", - content="test content", - rating=3, - user=self.user, - book=self.book, - ) + models.Review.objects.create( + name="Review name", + content="test content", + rating=3, + user=user, + book=book, + ) - self.quote = models.Quotation.objects.create( - quote="a sickening sense", - content="test content", - user=self.user, - book=self.book, - ) + models.Quotation.objects.create( + quote="a sickening sense", + content="test content", + user=user, + book=book, + ) - self.generatednote = models.GeneratedNote.objects.create( - content="test content", user=self.user - ) + models.ReadStatus.objects.create(content="test content", user=user) - self.factory = RequestFactory() + factory = RequestFactory() - @patch("bookwyrm.activitystreams.ActivityStream.get_activity_stream") - def test_rss_feed(self, _): - """load an rss feed""" view = rss_feed.RssFeed() - request = self.factory.get("/user/rss_user/rss") - request.user = self.user - with patch("bookwyrm.models.SiteSettings.objects.get") as site: - site.return_value = self.site - result = view(request, username=self.user.username) + request = factory.get("/user/rss_user/rss") + request.user = user + + result = view(request, username=user.username) self.assertEqual(result.status_code, 200) self.assertIn(b"Status updates from rss_user", result.content) diff --git a/bookwyrm/views/rss_feed.py b/bookwyrm/views/rss_feed.py index 0d3a8902e..5faa16243 100644 --- a/bookwyrm/views/rss_feed.py +++ b/bookwyrm/views/rss_feed.py @@ -1,6 +1,9 @@ """ serialize user's posts in rss feed """ from django.contrib.syndication.views import Feed +from django.template.loader import get_template +from django.utils.translation import gettext_lazy as _ + from .helpers import get_user_from_username, privacy_filter # pylint: disable=no-self-use, unused-argument @@ -8,7 +11,15 @@ class RssFeed(Feed): """serialize user's posts in rss feed""" description_template = "rss/content.html" - title_template = "rss/title.html" + + def item_title(self, item): + """render the item title""" + if hasattr(item, "pure_name") and item.pure_name: + return item.pure_name + title_template = get_template("snippets/status/header_content.html") + title = title_template.render({"status": item}) + template = get_template("rss/title.html") + return template.render({"user": item.user, "item_title": title}).strip() def get_object(self, request, username): # pylint: disable=arguments-differ """the user who's posts get serialized""" @@ -20,7 +31,7 @@ class RssFeed(Feed): def title(self, obj): """title of the rss feed entry""" - return f"Status updates from {obj.display_name}" + return _(f"Status updates from {obj.display_name}") def items(self, obj): """the user's activity feed""" From dd54473a30023f4c6dc477f0f299530b3e7f46be Mon Sep 17 00:00:00 2001 From: GuDzpoz Date: Sun, 15 Aug 2021 22:58:36 +0800 Subject: [PATCH 2/5] Updated Simplified Chinese translation; fixed a few typos and unified several punctuation styles. --- locale/zh_Hans/LC_MESSAGES/django.mo | Bin 41731 -> 45867 bytes locale/zh_Hans/LC_MESSAGES/django.po | 183 +++++++++++---------------- 2 files changed, 72 insertions(+), 111 deletions(-) diff --git a/locale/zh_Hans/LC_MESSAGES/django.mo b/locale/zh_Hans/LC_MESSAGES/django.mo index 13ee2ab0340057533d0fb8890c6759f3701f6fc7..dbe69686f8f0510405b134346451d40a2258abcc 100644 GIT binary patch delta 17864 zcmb8#2Ygi3y7%!NLT{mk4i1DEf;2&-7ZC-i(gZ=kkPHw=fh2&SGNFea7sRB0m%^bC}P1b_xGRuMByB7+n;ywUF%tW?K1J)cls*@b_NUhJ}p;pnZvcU zfa6rhHj$1qFWhk+s;8*qWVLXdi8u#mVpvPZDUGvHO_n2FoENb;et^~R0#?L7umeW6 za-93|0c?!hF~V_t&WB_w5y(RiI;|b2JJdqOQ?Lfk!hX0FZ^fT2?rGyV6)3mE+SnIs z;RMveR$>+0gLmL-sBwSCXy$h!+d57Zf!5drhhZu%F$=U~5tP%gFP_K2*sQ(dOvc6d zAeQXl?sNod=i9Lv9zzd)kFgkem%D-XScv(Z5oF3^l9`ExDKEvMxCTq%RxE-~Tm2y` zzi8#xt^78s--pPZbk1W*%(eKpSd8+o=;IzZg*v){Nb?p{hgj6Tz7tE}J$O6zMlEnU zmchAL2-l$cZ9?_igIdT@)IwfCO?(P9@7a!=zdGa)(7;zww;<|n_uf5#ccUJzqo@VFi|Y5e)&Go|xY#{zze=bRtd2UVx~TCR`pBr^ov593!h+Zrb+iLf zuT>)IA6EK7MhD!vT0z%^Fhfm-+;ER4RF$!JG!pcZlt)!{N~ zfNNM7e?zqk@9ZwDJZcAZQ1`e#>S&vx7T6w(U{BP79zcyh%ADZFea;LrRjF8xx)u8| z7GJjV*I0ydSQmFe#ZU{1K)p2;Q3KaQ9dQfP20Ec8?rrgSi>IRcJ%+9H{%4bENZ<{; z1%E+JSoJ=4fZC{Aa0hDO_EzqWns|Vfy{Mg!HGQZBEkw0jjXL@rs0|#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fxygt)+bIbHwFV4QXbHB#t;=&h_2_v*em-ZO8F^Um2dIOmOJuU((J_Zt68_WuD9m3QC( diff --git a/locale/zh_Hans/LC_MESSAGES/django.po b/locale/zh_Hans/LC_MESSAGES/django.po index 9ece3e743..547126495 100644 --- a/locale/zh_Hans/LC_MESSAGES/django.po +++ b/locale/zh_Hans/LC_MESSAGES/django.po @@ -101,10 +101,8 @@ msgid "Home" msgstr "主页" #: bookwyrm/settings.py:124 -#, fuzzy -#| msgid "Book Title" msgid "Books Timeline" -msgstr "书名" +msgstr "书目时间线" #: bookwyrm/settings.py:124 bookwyrm/templates/search/layout.html:21 #: bookwyrm/templates/search/layout.html:42 @@ -446,7 +444,7 @@ msgstr "从网址加载封面:" #: bookwyrm/templates/book/edit_book.html:11 #, python-format msgid "Edit \"%(book_title)s\"" -msgstr "编辑 \"%(book_title)s\"" +msgstr "编辑《%(book_title)s》" #: bookwyrm/templates/book/edit_book.html:5 #: bookwyrm/templates/book/edit_book.html:13 @@ -460,7 +458,7 @@ msgstr "确认书目信息" #: bookwyrm/templates/book/edit_book.html:62 #, python-format msgid "Is \"%(name)s\" an existing author?" -msgstr "\"%(name)s\" 是已存在的作者吗?" +msgstr "“%(name)s” 是已存在的作者吗?" #: bookwyrm/templates/book/edit_book.html:71 #, python-format @@ -474,7 +472,7 @@ msgstr "这是一位新的作者" #: bookwyrm/templates/book/edit_book.html:82 #, python-format msgid "Creating a new author: %(name)s" -msgstr "正在创建新的作者: %(name)s" +msgstr "正在创建新的作者: %(name)s" #: bookwyrm/templates/book/edit_book.html:89 msgid "Is this an edition of an existing work?" @@ -591,7 +589,7 @@ msgstr "%(book_title)s 的各版本" #: bookwyrm/templates/book/editions.html:8 #, python-format msgid "Editions of \"%(work_title)s\"" -msgstr "\"%(work_title)s\" 的各版本" +msgstr "《%(work_title)s》 的各版本" #: bookwyrm/templates/book/format_filter.html:8 #: bookwyrm/templates/book/language_filter.html:8 @@ -685,30 +683,24 @@ msgid "Compose status" msgstr "撰写状态" #: bookwyrm/templates/confirm_email/confirm_email.html:4 -#, fuzzy -#| msgid "Confirm" msgid "Confirm email" -msgstr "确认" +msgstr "确认邮箱" #: bookwyrm/templates/confirm_email/confirm_email.html:7 -#, fuzzy -#| msgid "Email address:" msgid "Confirm your email address" -msgstr "邮箱地址:" +msgstr "确认你的邮箱地址:" #: bookwyrm/templates/confirm_email/confirm_email.html:13 msgid "A confirmation code has been sent to the email address you used to register your account." -msgstr "" +msgstr "确认码已经被发送到了你注册时所使用的邮箱地址。" #: bookwyrm/templates/confirm_email/confirm_email.html:15 msgid "Sorry! We couldn't find that code." -msgstr "" +msgstr "抱歉!我们无法找到该代码。" #: bookwyrm/templates/confirm_email/confirm_email.html:19 -#, fuzzy -#| msgid "Confirm password:" msgid "Confirmation code:" -msgstr "确认密码:" +msgstr "确认代码:" #: bookwyrm/templates/confirm_email/confirm_email.html:25 #: bookwyrm/templates/landing/landing_layout.html:70 @@ -718,11 +710,11 @@ msgstr "提交" #: bookwyrm/templates/confirm_email/confirm_email.html:32 msgid "Can't find your code?" -msgstr "" +msgstr "找不到你的代码?" #: bookwyrm/templates/confirm_email/resend_form.html:4 msgid "Resend confirmation link" -msgstr "" +msgstr "重新发送确认链接" #: bookwyrm/templates/confirm_email/resend_form.html:11 #: bookwyrm/templates/landing/landing_layout.html:64 @@ -733,10 +725,8 @@ msgid "Email address:" msgstr "邮箱地址:" #: bookwyrm/templates/confirm_email/resend_form.html:17 -#, fuzzy -#| msgid "Re-send invite" msgid "Resend link" -msgstr "重新发送请求" +msgstr "重新发送链接" #: bookwyrm/templates/directory/community_filter.html:5 msgid "Community" @@ -787,10 +777,8 @@ msgstr "最近活跃" #: bookwyrm/templates/directory/user_card.html:18 #: bookwyrm/templates/user/user_preview.html:16 #: bookwyrm/templates/user/user_preview.html:17 -#, fuzzy -#| msgid "Your Account" msgid "Locked account" -msgstr "你的帐号" +msgstr "帐号已上锁" #: bookwyrm/templates/directory/user_card.html:40 msgid "follower you follow" @@ -825,15 +813,13 @@ msgstr "所有已知用户" #: bookwyrm/templates/discover/discover.html:4 #: bookwyrm/templates/discover/discover.html:10 #: bookwyrm/templates/layout.html:71 -#, fuzzy -#| msgid "Discard" msgid "Discover" -msgstr "削除" +msgstr "发现" #: bookwyrm/templates/discover/discover.html:12 #, python-format msgid "See what's new in the local %(site_name)s community" -msgstr "" +msgstr "看看本地 %(site_name)s 社区的新消息" #: bookwyrm/templates/discover/large-book.html:46 #: bookwyrm/templates/discover/small-book.html:32 @@ -857,36 +843,32 @@ msgstr "引用了" #: bookwyrm/templates/discover/large-book.html:68 #: bookwyrm/templates/discover/small-book.html:52 -#, fuzzy -#| msgid "Like status" msgid "View status" -msgstr "喜欢状态" +msgstr "浏览状态" #: bookwyrm/templates/email/confirm/html_content.html:6 #: bookwyrm/templates/email/confirm/text_content.html:4 #, python-format msgid "One last step before you join %(site_name)s! Please confirm your email address by clicking the link below:" -msgstr "" +msgstr "在加入 %(site_name)s 前的最后一步!请点击以下链接以确认你的邮箱:" #: bookwyrm/templates/email/confirm/html_content.html:11 -#, fuzzy -#| msgid "Confirm" msgid "Confirm Email" -msgstr "确认" +msgstr "确认邮箱" #: bookwyrm/templates/email/confirm/html_content.html:15 #, python-format msgid "Or enter the code \"%(confirmation_code)s\" at login." -msgstr "" +msgstr "或者在登录时输入代码 “%(confirmation_code)s”。" #: bookwyrm/templates/email/confirm/subject.html:2 msgid "Please confirm your email" -msgstr "" +msgstr "请确认你的邮箱" #: bookwyrm/templates/email/confirm/text_content.html:10 #, python-format msgid "Or enter the code \"%(confirmation_code)s\" at login." -msgstr "" +msgstr "或者在登录时输入代码 “%(confirmation_code)s”。" #: bookwyrm/templates/email/html_layout.html:15 #: bookwyrm/templates/email/text_layout.html:2 @@ -969,10 +951,9 @@ msgid "You have no messages right now." msgstr "你现在没有消息。" #: bookwyrm/templates/feed/feed.html:22 -#, fuzzy, python-format -#| msgid "load 0 unread status(es)" +#, python-format msgid "load 0 unread status(es)" -msgstr "加载 0 条未读状态" +msgstr "加载 0 条未读状态" #: bookwyrm/templates/feed/feed.html:38 msgid "There aren't any activities right now! Try following a user to get started" @@ -1447,7 +1428,7 @@ msgstr "联系站点管理员" #: bookwyrm/templates/layout.html:226 msgid "Documentation" -msgstr "文档:" +msgstr "文档" #: bookwyrm/templates/layout.html:233 #, python-format @@ -1591,7 +1572,7 @@ msgstr "清除搜索" #: bookwyrm/templates/lists/list.html:151 #, python-format msgid "No books found matching the query \"%(query)s\"" -msgstr "没有符合 \"%(query)s\" 请求的书目" +msgstr "没有符合 “%(query)s” 请求的书目" #: bookwyrm/templates/lists/list.html:179 msgid "Suggest" @@ -1607,7 +1588,7 @@ msgstr "登录" #: bookwyrm/templates/login.html:16 msgid "Success! Email address confirmed." -msgstr "" +msgstr "成功!邮箱地址已确认。" #: bookwyrm/templates/login.html:28 bookwyrm/templates/password_reset.html:17 #: bookwyrm/templates/snippets/register_form.html:22 @@ -1811,13 +1792,13 @@ msgstr "转发了你的 状态" #: bookwyrm/templates/notifications.html:121 #, python-format -msgid " added %(book_title)s to your list \"%(list_name)s\"" -msgstr " 添加了 %(book_title)s 到你的列表 \"%(list_name)s\"" +msgid " added %(book_title)s to your list “%(list_name)s”" +msgstr " 添加了 %(book_title)s 到你的列表 “%(list_name)s”" #: bookwyrm/templates/notifications.html:123 #, python-format msgid " suggested adding %(book_title)s to your list \"%(list_name)s\"" -msgstr " 推荐添加 %(book_title)s 到你的列表 \"%(list_name)s\"" +msgstr " 推荐添加 %(book_title)s 到你的列表 “%(list_name)s”" #: bookwyrm/templates/notifications.html:128 #, python-format @@ -1893,10 +1874,8 @@ msgid "Show set reading goal prompt in feed:" msgstr "在消息流中显示设置阅读目标的提示:" #: bookwyrm/templates/preferences/edit_user.html:58 -#, fuzzy -#| msgid "Post privacy" msgid "Default post privacy:" -msgstr "发文隐私" +msgstr "默认发文隐私:" #: bookwyrm/templates/preferences/edit_user.html:70 #, python-format @@ -1922,17 +1901,17 @@ msgstr "关系" #: bookwyrm/templates/reading_progress/finish.html:5 #, python-format msgid "Finish \"%(book_title)s\"" -msgstr "完成 \"%(book_title)s\"" +msgstr "完成《%(book_title)s》" #: bookwyrm/templates/reading_progress/start.html:5 #, python-format msgid "Start \"%(book_title)s\"" -msgstr "开始 \"%(book_title)s\"" +msgstr "开始《%(book_title)s》" #: bookwyrm/templates/reading_progress/want.html:5 #, python-format msgid "Want to Read \"%(book_title)s\"" -msgstr "想要阅读 \"%(book_title)s\"" +msgstr "想要阅读《%(book_title)s》" #: bookwyrm/templates/search/book.html:64 msgid "Load results from other catalogues" @@ -1944,7 +1923,7 @@ msgstr "手动添加书目" #: bookwyrm/templates/search/book.html:73 msgid "Log in to import or add books." -msgstr "登陆以导入或添加书目。" +msgstr "登录以导入或添加书目。" #: bookwyrm/templates/search/layout.html:16 msgid "Search query" @@ -1965,7 +1944,7 @@ msgstr "用户" #: bookwyrm/templates/search/layout.html:58 #, python-format msgid "No results found for \"%(query)s\"" -msgstr "没有找到 \"%(query)s\" 的搜索结果" +msgstr "没有找到 “%(query)s” 的搜索结果" #: bookwyrm/templates/settings/admin_layout.html:4 msgid "Administration" @@ -2414,11 +2393,11 @@ msgstr "允许请求邀请" #: bookwyrm/templates/settings/site.html:97 msgid "Require users to confirm email address" -msgstr "" +msgstr "要求用户确认邮箱地址" #: bookwyrm/templates/settings/site.html:99 msgid "(Recommended if registration is open)" -msgstr "" +msgstr "(当开放注册时推荐)" #: bookwyrm/templates/settings/site.html:102 msgid "Registration closed text:" @@ -2433,15 +2412,14 @@ msgstr "由 %(username)s 发布" #, python-format msgid "and %(remainder_count_display)s other" msgid_plural "and %(remainder_count_display)s others" -msgstr[0] "" +msgstr[0] "与其它 %(remainder_count_display)s 位" #: bookwyrm/templates/snippets/book_cover.html:32 msgid "No cover" msgstr "没有封面" #: bookwyrm/templates/snippets/book_titleby.html:6 -#, fuzzy, python-format -#| msgid "%(title)s by " +#, python-format msgid "%(title)s by" msgstr "%(title)s 来自" @@ -2465,7 +2443,7 @@ msgstr "引用" #: bookwyrm/templates/snippets/create_status/comment.html:15 msgid "Some thoughts on the book" -msgstr "" +msgstr "对书的一些看法" #: bookwyrm/templates/snippets/create_status/comment.html:26 #: bookwyrm/templates/snippets/shelve_button/progress_update_modal.html:16 @@ -2533,16 +2511,14 @@ msgid "Quote:" msgstr "引用:" #: bookwyrm/templates/snippets/create_status/quotation.html:27 -#, fuzzy, python-format -#| msgid "Start \"%(book_title)s\"" +#, python-format msgid "An excerpt from '%(book_title)s'" -msgstr "开始 \"%(book_title)s\"" +msgstr "摘自《%(book_title)s》的节录" #: bookwyrm/templates/snippets/create_status/review.html:20 -#, fuzzy, python-format -#| msgid "Editions of %(book_title)s" +#, python-format msgid "Your review of '%(book_title)s'" -msgstr "%(book_title)s 的各版本" +msgstr "你对《%(book_title)s》的书评" #: bookwyrm/templates/snippets/create_status/review.html:32 msgid "Review:" @@ -2584,10 +2560,9 @@ msgid "Clear filters" msgstr "清除过滤器" #: bookwyrm/templates/snippets/follow_button.html:14 -#, fuzzy, python-format -#| msgid "Report @%(username)s" +#, python-format msgid "Follow @%(username)s" -msgstr "报告 %(username)s" +msgstr "关注 @%(username)s" #: bookwyrm/templates/snippets/follow_button.html:16 msgid "Follow" @@ -2598,10 +2573,9 @@ msgid "Undo follow request" msgstr "撤回关注请求" #: bookwyrm/templates/snippets/follow_button.html:30 -#, fuzzy, python-format -#| msgid "Report @%(username)s" +#, python-format msgid "Unfollow @%(username)s" -msgstr "报告 %(username)s" +msgstr "取消关注 @%(username)s" #: bookwyrm/templates/snippets/follow_button.html:32 msgid "Unfollow" @@ -2630,9 +2604,7 @@ msgid_plural "set a goal to read %(counter)s books in %(year)s" msgstr[0] "设定了在 %(year)s 内要读 %(counter)s 本书的目标" #: bookwyrm/templates/snippets/generated_status/rating.html:3 -#, fuzzy, python-format -#| msgid "Rated %(title)s: %(display_rating)s star" -#| msgid_plural "Rated %(title)s: %(display_rating)s stars" +#, python-format msgid "rated %(title)s: %(display_rating)s star" msgid_plural "rated %(title)s: %(display_rating)s stars" msgstr[0] "为 %(title)s 打了分: %(display_rating)s 星" @@ -2641,12 +2613,12 @@ msgstr[0] "为 %(title)s 打了分: %(display_ #, python-format msgid "Review of \"%(book_title)s\" (%(display_rating)s star): %(review_title)s" msgid_plural "Review of \"%(book_title)s\" (%(display_rating)s stars): %(review_title)s" -msgstr[0] "\"%(book_title)s\" 的书评(%(display_rating)s 星): %(review_title)s" +msgstr[0] "《%(book_title)s》的书评(%(display_rating)s 星): %(review_title)s" #: bookwyrm/templates/snippets/generated_status/review_pure_name.html:8 #, python-format msgid "Review of \"%(book_title)s\": %(review_title)s" -msgstr "\"%(book_title)s\" 的书评: %(review_title)s" +msgstr "《%(book_title)s》的书评: %(review_title)s" #: bookwyrm/templates/snippets/goal_card.html:23 #, python-format @@ -2777,7 +2749,7 @@ msgstr "移动书目" #: bookwyrm/templates/snippets/shelve_button/finish_reading_modal.html:5 #, python-format msgid "Finish \"%(book_title)s\"" -msgstr "完成 \"%(book_title)s\"" +msgstr "完成《%(book_title)s》" #: bookwyrm/templates/snippets/shelve_button/progress_update_modal.html:5 #: bookwyrm/templates/snippets/shelve_button/shelve_button_options.html:45 @@ -2809,12 +2781,12 @@ msgstr "从 %(name)s 移除" #: bookwyrm/templates/snippets/shelve_button/start_reading_modal.html:5 #, python-format msgid "Start \"%(book_title)s\"" -msgstr "开始 \"%(book_title)s\"" +msgstr "开始《%(book_title)s》" #: bookwyrm/templates/snippets/shelve_button/want_to_read_modal.html:5 #, python-format msgid "Want to Read \"%(book_title)s\"" -msgstr "想要阅读 \"%(book_title)s\"" +msgstr "想要阅读《%(book_title)s》" #: bookwyrm/templates/snippets/status/content_status.html:72 #: bookwyrm/templates/snippets/trimmed_text.html:17 @@ -2831,10 +2803,9 @@ msgid "Open image in new window" msgstr "在新窗口中打开图像" #: bookwyrm/templates/snippets/status/headers/comment.html:2 -#, fuzzy, python-format -#| msgid "Editions of \"%(work_title)s\"" +#, python-format msgid "commented on %(book)s" -msgstr "\"%(work_title)s\" 的各版本" +msgstr "评论了 %(book)s" #: bookwyrm/templates/snippets/status/headers/note.html:15 #, python-format @@ -2842,40 +2813,35 @@ msgid "replied to %(username)s's %(username)s状态" #: bookwyrm/templates/snippets/status/headers/quotation.html:2 -#, fuzzy, python-format +#, python-format #| msgid "Reported by %(username)s" msgid "quoted %(book)s" -msgstr "由 %(username)s 报告" +msgstr "引用了 %(book)s" #: bookwyrm/templates/snippets/status/headers/rating.html:3 -#, fuzzy, python-format -#| msgid "Created by %(username)s" +#, python-format msgid "rated %(book)s:" -msgstr "由 %(username)s 创建" +msgstr "为 %(book)s 打了分:" #: bookwyrm/templates/snippets/status/headers/read.html:5 -#, fuzzy, python-format -#| msgid "Editions of \"%(work_title)s\"" +#, python-format msgid "finished reading %(book)s" -msgstr "\"%(work_title)s\" 的各版本" +msgstr "完成阅读 %(book)s" #: bookwyrm/templates/snippets/status/headers/reading.html:6 -#, fuzzy, python-format -#| msgid "Created by %(username)s" +#, python-format msgid "started reading %(book)s" -msgstr "由 %(username)s 创建" +msgstr "开始阅读 %(book)s" #: bookwyrm/templates/snippets/status/headers/review.html:3 -#, fuzzy, python-format -#| msgid "Created by %(username)s" +#, python-format msgid "reviewed %(book)s" -msgstr "由 %(username)s 创建" +msgstr "为 %(book)s 撰写了书评" #: bookwyrm/templates/snippets/status/headers/to_read.html:6 -#, fuzzy, python-format -#| msgid "replied to %(username)s's status" +#, python-format msgid "%(username)s wants to read %(book)s" -msgstr "回复了 %(username)s状态" +msgstr "%(username)s 想要阅读 %(book)s" #: bookwyrm/templates/snippets/status/layout.html:21 #: bookwyrm/templates/snippets/status/status_options.html:17 @@ -2925,10 +2891,8 @@ msgstr[0] "%(shared_books)s 本在你书架上也有的书" #: bookwyrm/templates/snippets/suggested_users.html:31 #: bookwyrm/templates/user/user_preview.html:36 -#, fuzzy -#| msgid "followed you" msgid "Follows you" -msgstr "关注了你" +msgstr "正在关注着你" #: bookwyrm/templates/snippets/switch_edition_button.html:5 msgid "Switch to this edition" @@ -3079,11 +3043,8 @@ msgid_plural "%(mutuals_display)s followers you follow" msgstr[0] "%(mutuals_display)s 个你也关注的关注者" #: bookwyrm/templates/user/user_preview.html:38 -#, fuzzy -#| msgid "follower you follow" -#| msgid_plural "followers you follow" msgid "No followers you follow" -msgstr "你关注的关注者" +msgstr "没有你关注的关注者" #: bookwyrm/templates/user_admin/user.html:9 msgid "Back to users" @@ -3167,7 +3128,7 @@ msgstr "%(title)s:%(subtitle)s" #: bookwyrm/views/authentication.py:69 msgid "Username or password are incorrect" -msgstr "" +msgstr "用户名或密码不正确" #: bookwyrm/views/import_data.py:67 msgid "Not a valid csv file" From 71404fae0683f77a5001b30896e055e46f98a8ae Mon Sep 17 00:00:00 2001 From: Mouse Reeve Date: Mon, 16 Aug 2021 08:51:23 -0700 Subject: [PATCH 3/5] Adds local only filter to user admin view --- bookwyrm/templates/user_admin/user_admin_filters.html | 1 + bookwyrm/views/user_admin.py | 3 +++ 2 files changed, 4 insertions(+) diff --git a/bookwyrm/templates/user_admin/user_admin_filters.html b/bookwyrm/templates/user_admin/user_admin_filters.html index 57e017e5f..5283b4e9c 100644 --- a/bookwyrm/templates/user_admin/user_admin_filters.html +++ b/bookwyrm/templates/user_admin/user_admin_filters.html @@ -3,4 +3,5 @@ {% block filter_fields %} {% include 'user_admin/server_filter.html' %} {% include 'user_admin/username_filter.html' %} +{% include 'directory/community_filter.html' %} {% endblock %} diff --git a/bookwyrm/views/user_admin.py b/bookwyrm/views/user_admin.py index 9d08e9309..7cfefb0f4 100644 --- a/bookwyrm/views/user_admin.py +++ b/bookwyrm/views/user_admin.py @@ -30,6 +30,9 @@ class UserAdminList(View): username = request.GET.get("username") if username: filters["username__icontains"] = username + scope = request.GET.get("scope") + if scope: + filters["local"] = scope == "local" users = models.User.objects.filter(**filters) From 7345b85ebde8f18c3c65e150aec0b6e4f360345c Mon Sep 17 00:00:00 2001 From: Mouse Reeve Date: Mon, 16 Aug 2021 10:25:21 -0700 Subject: [PATCH 4/5] Granular RSS tests --- bookwyrm/tests/views/test_rss_feed.py | 77 ++++++++++++++++++--------- 1 file changed, 53 insertions(+), 24 deletions(-) diff --git a/bookwyrm/tests/views/test_rss_feed.py b/bookwyrm/tests/views/test_rss_feed.py index 715add3f2..69a9ef02f 100644 --- a/bookwyrm/tests/views/test_rss_feed.py +++ b/bookwyrm/tests/views/test_rss_feed.py @@ -12,47 +12,76 @@ from bookwyrm.views import rss_feed class RssFeedView(TestCase): """rss feed behaves as expected""" - def test_rss_feed(self, *_): - """load an rss feed""" - models.SiteSettings.objects.create() - - user = models.User.objects.create_user( - "rss_user", "rss@test.rss", "password", local=True - ) - + def setUp(self): + with patch("bookwyrm.suggested_users.rerank_suggestions_task.delay"): + self.local_user = models.User.objects.create_user( + "rss_user", "rss@test.rss", "password", local=True + ) work = models.Work.objects.create(title="Test Work") - book = models.Edition.objects.create( + self.book = models.Edition.objects.create( title="Example Edition", remote_id="https://example.com/book/1", parent_work=work, ) + self.factory = RequestFactory() + models.SiteSettings.objects.create() + + + def test_rss_empty(self, *_): + """load an rss feed""" + view = rss_feed.RssFeed() + request = self.factory.get("/user/rss_user/rss") + request.user = self.local_user + result = view(request, username=self.local_user.username) + self.assertEqual(result.status_code, 200) + self.assertIn(b"Status updates from rss_user", result.content) + result.render() + + def test_rss_comment(self, *_): + """load an rss feed""" + models.Comment.objects.create( + content="comment test content", + user=self.local_user, + book=self.book, + ) + view = rss_feed.RssFeed() + request = self.factory.get("/user/rss_user/rss") + request.user = self.local_user + result = view(request, username=self.local_user.username) + self.assertEqual(result.status_code, 200) + self.assertIn(b"Example Edition", result.content) + result.render() + + def test_rss_review(self, *_): + """load an rss feed""" models.Review.objects.create( name="Review name", content="test content", rating=3, - user=user, - book=book, + user=self.local_user, + book=self.book, ) + view = rss_feed.RssFeed() + request = self.factory.get("/user/rss_user/rss") + request.user = self.local_user + result = view(request, username=self.local_user.username) + self.assertEqual(result.status_code, 200) + result.render() + def test_rss_quotation(self, *_): + """load an rss feed""" models.Quotation.objects.create( quote="a sickening sense", content="test content", - user=user, - book=book, + user=self.local_user, + book=self.book, ) - - models.ReadStatus.objects.create(content="test content", user=user) - - factory = RequestFactory() - view = rss_feed.RssFeed() - request = factory.get("/user/rss_user/rss") - request.user = user - - result = view(request, username=user.username) + request = self.factory.get("/user/rss_user/rss") + request.user = self.local_user + result = view(request, username=self.local_user.username) self.assertEqual(result.status_code, 200) + result.render() - self.assertIn(b"Status updates from rss_user", result.content) self.assertIn(b"a sickening sense", result.content) - self.assertIn(b"Example Edition", result.content) From 5de3c75de36351f0b63f29e1bad7226b0ed22e5c Mon Sep 17 00:00:00 2001 From: Mouse Reeve Date: Mon, 16 Aug 2021 10:28:32 -0700 Subject: [PATCH 5/5] Remove render from tests --- bookwyrm/tests/views/test_rss_feed.py | 5 ----- 1 file changed, 5 deletions(-) diff --git a/bookwyrm/tests/views/test_rss_feed.py b/bookwyrm/tests/views/test_rss_feed.py index 69a9ef02f..f2d3baf2d 100644 --- a/bookwyrm/tests/views/test_rss_feed.py +++ b/bookwyrm/tests/views/test_rss_feed.py @@ -27,7 +27,6 @@ class RssFeedView(TestCase): models.SiteSettings.objects.create() - def test_rss_empty(self, *_): """load an rss feed""" view = rss_feed.RssFeed() @@ -36,7 +35,6 @@ class RssFeedView(TestCase): result = view(request, username=self.local_user.username) self.assertEqual(result.status_code, 200) self.assertIn(b"Status updates from rss_user", result.content) - result.render() def test_rss_comment(self, *_): """load an rss feed""" @@ -51,7 +49,6 @@ class RssFeedView(TestCase): result = view(request, username=self.local_user.username) self.assertEqual(result.status_code, 200) self.assertIn(b"Example Edition", result.content) - result.render() def test_rss_review(self, *_): """load an rss feed""" @@ -67,7 +64,6 @@ class RssFeedView(TestCase): request.user = self.local_user result = view(request, username=self.local_user.username) self.assertEqual(result.status_code, 200) - result.render() def test_rss_quotation(self, *_): """load an rss feed""" @@ -82,6 +78,5 @@ class RssFeedView(TestCase): request.user = self.local_user result = view(request, username=self.local_user.username) self.assertEqual(result.status_code, 200) - result.render() self.assertIn(b"a sickening sense", result.content)