diff --git a/bookwyrm/models/fields.py b/bookwyrm/models/fields.py
index 361079906..7d14f88f9 100644
--- a/bookwyrm/models/fields.py
+++ b/bookwyrm/models/fields.py
@@ -296,7 +296,7 @@ class ManyToManyField(ActivitypubFieldMixin, models.ManyToManyField):
super().__init__(*args, **kwargs)
def set_field_from_activity(self, instance, data, overwrite=True):
- """helper function for assinging a value to the field"""
+ """helper function for assigning a value to the field"""
if not overwrite and getattr(instance, self.name).exists():
return False
@@ -398,7 +398,11 @@ class ImageField(ActivitypubFieldMixin, models.ImageField):
if formatted is None or formatted is MISSING:
return False
- if not overwrite and hasattr(instance, self.name):
+ if (
+ not overwrite
+ and hasattr(instance, self.name)
+ and getattr(instance, self.name)
+ ):
return False
getattr(instance, self.name).save(*formatted, save=save)
diff --git a/bookwyrm/static/js/bookwyrm.js b/bookwyrm/static/js/bookwyrm.js
index 2d5b88adc..e18087eeb 100644
--- a/bookwyrm/static/js/bookwyrm.js
+++ b/bookwyrm/static/js/bookwyrm.js
@@ -45,6 +45,13 @@ let BookWyrm = new class {
'change',
this.disableIfTooLarge.bind(this)
));
+
+ document.querySelectorAll('[data-duplicate]')
+ .forEach(node => node.addEventListener(
+ 'click',
+ this.duplicateInput.bind(this)
+
+ ))
}
/**
@@ -368,4 +375,24 @@ let BookWyrm = new class {
);
}
}
+
+ duplicateInput (event ) {
+ const trigger = event.currentTarget;
+ const input_id = trigger.dataset['duplicate']
+ const orig = document.getElementById(input_id);
+ const parent = orig.parentNode;
+ const new_count = parent.querySelectorAll("input").length + 1
+
+ let input = orig.cloneNode();
+
+ input.id += ("-" + (new_count))
+ input.value = ""
+
+ let label = parent.querySelector("label").cloneNode();
+
+ label.setAttribute("for", input.id)
+
+ parent.appendChild(label)
+ parent.appendChild(input)
+ }
}();
diff --git a/bookwyrm/static/js/status_cache.js b/bookwyrm/static/js/status_cache.js
index 2a50bfcbe..418b7dee2 100644
--- a/bookwyrm/static/js/status_cache.js
+++ b/bookwyrm/static/js/status_cache.js
@@ -187,6 +187,7 @@ let StatusCache = new class {
.forEach(item => BookWyrm.addRemoveClass(item, "is-hidden", false));
// Remove existing disabled states
+
button.querySelectorAll("[data-shelf-dropdown-identifier] button")
.forEach(item => item.disabled = false);
diff --git a/bookwyrm/templates/book/book.html b/bookwyrm/templates/book/book.html
index 36241ee26..713e7abee 100644
--- a/bookwyrm/templates/book/book.html
+++ b/bookwyrm/templates/book/book.html
@@ -153,12 +153,21 @@
{# user's relationship to the book #}
diff --git a/bookwyrm/templates/snippets/reading_modals/finish_reading_modal.html b/bookwyrm/templates/snippets/reading_modals/finish_reading_modal.html
index 3c1271600..a35ed9e0b 100644
--- a/bookwyrm/templates/snippets/reading_modals/finish_reading_modal.html
+++ b/bookwyrm/templates/snippets/reading_modals/finish_reading_modal.html
@@ -9,10 +9,11 @@ Finish "{{ book_title }} "
{% endblock %}
{% block modal-form-open %}
-
+
{% csrf_token %}
diff --git a/bookwyrm/templates/snippets/toggle/toggle_button.html b/bookwyrm/templates/snippets/toggle/toggle_button.html
index 34b470b4c..3537e15dc 100644
--- a/bookwyrm/templates/snippets/toggle/toggle_button.html
+++ b/bookwyrm/templates/snippets/toggle/toggle_button.html
@@ -1,6 +1,6 @@
{% load utilities %}
{% if fallback_url %}
-
+
{% endif %}
\n"
"Language-Team: English \n"
@@ -227,47 +227,51 @@ msgstr ""
msgid "Something went wrong! Sorry about that."
msgstr ""
-#: bookwyrm/templates/author/author.html:17
#: bookwyrm/templates/author/author.html:18
+#: bookwyrm/templates/author/author.html:19
msgid "Edit Author"
msgstr ""
-#: bookwyrm/templates/author/author.html:34
+#: bookwyrm/templates/author/author.html:35
#: bookwyrm/templates/author/edit_author.html:43
msgid "Aliases:"
msgstr ""
-#: bookwyrm/templates/author/author.html:45
+#: bookwyrm/templates/author/author.html:46
msgid "Born:"
msgstr ""
-#: bookwyrm/templates/author/author.html:52
+#: bookwyrm/templates/author/author.html:53
msgid "Died:"
msgstr ""
-#: bookwyrm/templates/author/author.html:61
+#: bookwyrm/templates/author/author.html:62
msgid "Wikipedia"
msgstr ""
-#: bookwyrm/templates/author/author.html:69
+#: bookwyrm/templates/author/author.html:70
+msgid "View ISNI record"
+msgstr ""
+
+#: bookwyrm/templates/author/author.html:78
#: bookwyrm/templates/book/book.html:94
msgid "View on OpenLibrary"
msgstr ""
-#: bookwyrm/templates/author/author.html:77
+#: bookwyrm/templates/author/author.html:86
#: bookwyrm/templates/book/book.html:97
msgid "View on Inventaire"
msgstr ""
-#: bookwyrm/templates/author/author.html:85
+#: bookwyrm/templates/author/author.html:94
msgid "View on LibraryThing"
msgstr ""
-#: bookwyrm/templates/author/author.html:93
+#: bookwyrm/templates/author/author.html:102
msgid "View on Goodreads"
msgstr ""
-#: bookwyrm/templates/author/author.html:108
+#: bookwyrm/templates/author/author.html:117
#, python-format
msgid "Books by %(name)s"
msgstr ""
@@ -277,17 +281,17 @@ msgid "Edit Author:"
msgstr ""
#: bookwyrm/templates/author/edit_author.html:13
-#: bookwyrm/templates/book/edit/edit_book.html:18
+#: bookwyrm/templates/book/edit/edit_book.html:19
msgid "Added:"
msgstr ""
#: bookwyrm/templates/author/edit_author.html:14
-#: bookwyrm/templates/book/edit/edit_book.html:21
+#: bookwyrm/templates/book/edit/edit_book.html:22
msgid "Updated:"
msgstr ""
#: bookwyrm/templates/author/edit_author.html:16
-#: bookwyrm/templates/book/edit/edit_book.html:25
+#: bookwyrm/templates/book/edit/edit_book.html:26
msgid "Last edited by:"
msgstr ""
@@ -347,7 +351,7 @@ msgstr ""
#: bookwyrm/templates/author/edit_author.html:118
#: bookwyrm/templates/book/book.html:140
-#: bookwyrm/templates/book/edit/edit_book.html:110
+#: bookwyrm/templates/book/edit/edit_book.html:121
#: bookwyrm/templates/book/readthrough.html:76
#: bookwyrm/templates/groups/form.html:24
#: bookwyrm/templates/lists/bookmark_button.html:15
@@ -366,8 +370,8 @@ msgstr ""
#: bookwyrm/templates/author/edit_author.html:119
#: bookwyrm/templates/book/book.html:141 bookwyrm/templates/book/book.html:190
#: bookwyrm/templates/book/cover_modal.html:32
-#: bookwyrm/templates/book/edit/edit_book.html:112
-#: bookwyrm/templates/book/edit/edit_book.html:115
+#: bookwyrm/templates/book/edit/edit_book.html:123
+#: bookwyrm/templates/book/edit/edit_book.html:126
#: bookwyrm/templates/book/readthrough.html:77
#: bookwyrm/templates/groups/delete_group_modal.html:17
#: bookwyrm/templates/lists/delete_list_modal.html:17
@@ -513,56 +517,60 @@ msgstr ""
msgid "Load cover from url:"
msgstr ""
-#: bookwyrm/templates/book/edit/edit_book.html:5
-#: bookwyrm/templates/book/edit/edit_book.html:11
+#: bookwyrm/templates/book/edit/edit_book.html:6
+#: bookwyrm/templates/book/edit/edit_book.html:12
#, python-format
msgid "Edit \"%(book_title)s\""
msgstr ""
-#: bookwyrm/templates/book/edit/edit_book.html:5
-#: bookwyrm/templates/book/edit/edit_book.html:13
+#: bookwyrm/templates/book/edit/edit_book.html:6
+#: bookwyrm/templates/book/edit/edit_book.html:14
msgid "Add Book"
msgstr ""
-#: bookwyrm/templates/book/edit/edit_book.html:47
+#: bookwyrm/templates/book/edit/edit_book.html:48
msgid "Confirm Book Info"
msgstr ""
-#: bookwyrm/templates/book/edit/edit_book.html:55
+#: bookwyrm/templates/book/edit/edit_book.html:56
#, python-format
-msgid "Is \"%(name)s\" an existing author?"
+msgid "Is \"%(name)s\" one of these authors?"
msgstr ""
-#: bookwyrm/templates/book/edit/edit_book.html:64
-#, python-format
-msgid "Author of %(book_title)s "
+#: bookwyrm/templates/book/edit/edit_book.html:67
+#: bookwyrm/templates/book/edit/edit_book.html:69
+msgid "Author of "
msgstr ""
-#: bookwyrm/templates/book/edit/edit_book.html:68
+#: bookwyrm/templates/book/edit/edit_book.html:69
+msgid "Find more information at isni.org"
+msgstr ""
+
+#: bookwyrm/templates/book/edit/edit_book.html:79
msgid "This is a new author"
msgstr ""
-#: bookwyrm/templates/book/edit/edit_book.html:75
+#: bookwyrm/templates/book/edit/edit_book.html:86
#, python-format
msgid "Creating a new author: %(name)s"
msgstr ""
-#: bookwyrm/templates/book/edit/edit_book.html:82
+#: bookwyrm/templates/book/edit/edit_book.html:93
msgid "Is this an edition of an existing work?"
msgstr ""
-#: bookwyrm/templates/book/edit/edit_book.html:90
+#: bookwyrm/templates/book/edit/edit_book.html:101
msgid "This is a new work"
msgstr ""
-#: bookwyrm/templates/book/edit/edit_book.html:97
+#: bookwyrm/templates/book/edit/edit_book.html:108
#: 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 ""
-#: bookwyrm/templates/book/edit/edit_book.html:99
+#: bookwyrm/templates/book/edit/edit_book.html:110
#: bookwyrm/templates/feed/status.html:9
msgid "Back"
msgstr ""
@@ -1016,6 +1024,22 @@ msgstr ""
msgid "Learn more about %(site_name)s:"
msgstr ""
+#: bookwyrm/templates/email/moderation_report/html_content.html:6
+#: bookwyrm/templates/email/moderation_report/text_content.html:5
+#, python-format
+msgid "@%(reporter)s has flagged behavior by @%(reportee)s for moderation. "
+msgstr ""
+
+#: bookwyrm/templates/email/moderation_report/html_content.html:9
+#: bookwyrm/templates/email/moderation_report/text_content.html:7
+msgid "View report"
+msgstr ""
+
+#: bookwyrm/templates/email/moderation_report/subject.html:2
+#, python-format
+msgid "New report for %(site_name)s"
+msgstr ""
+
#: bookwyrm/templates/email/password_reset/html_content.html:6
#: bookwyrm/templates/email/password_reset/text_content.html:4
#, python-format
@@ -3842,7 +3866,7 @@ msgstr ""
msgid "File exceeds maximum size: 10MB"
msgstr ""
-#: bookwyrm/templatetags/utilities.py:31
+#: bookwyrm/templatetags/utilities.py:34
#, python-format
msgid "%(title)s: %(subtitle)s"
msgstr ""
diff --git a/locale/fr_FR/LC_MESSAGES/django.mo b/locale/fr_FR/LC_MESSAGES/django.mo
index 4cdcbf8ea..cc69e82cf 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/lt_LT/LC_MESSAGES/django.mo b/locale/lt_LT/LC_MESSAGES/django.mo
index 728d0e905..51e78110e 100644
Binary files a/locale/lt_LT/LC_MESSAGES/django.mo and b/locale/lt_LT/LC_MESSAGES/django.mo differ
diff --git a/locale/lt_LT/LC_MESSAGES/django.po b/locale/lt_LT/LC_MESSAGES/django.po
index 16110b069..d2ec32981 100644
--- a/locale/lt_LT/LC_MESSAGES/django.po
+++ b/locale/lt_LT/LC_MESSAGES/django.po
@@ -3,7 +3,7 @@ msgstr ""
"Project-Id-Version: bookwyrm\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-11-17 18:03+0000\n"
-"PO-Revision-Date: 2021-11-22 08:50\n"
+"PO-Revision-Date: 2021-11-29 13:53\n"
"Last-Translator: Mouse Reeve \n"
"Language-Team: Lithuanian\n"
"Language: lt\n"
@@ -591,7 +591,7 @@ msgstr "Kalbos:"
#: bookwyrm/templates/book/edit/edit_book_form.html:74
msgid "Publication"
-msgstr "Paskelbimas"
+msgstr "Leidimas"
#: bookwyrm/templates/book/edit/edit_book_form.html:77
msgid "Publisher:"
@@ -930,7 +930,7 @@ msgstr "%(username)s įvertino %(username)s reviewed %(book_title)s "
-msgstr "%(username)s peržiūrėjo %(book_title)s "
+msgstr "%(username)s apžvelgė %(book_title)s "
#: bookwyrm/templates/discover/card-header.html:31
#, python-format
@@ -1114,7 +1114,7 @@ msgstr "Šiuo metu skaitoma"
#: bookwyrm/templates/snippets/shelve_button/shelve_button_options.html:12
#: bookwyrm/templates/user/books_header.html:8
msgid "Read"
-msgstr "Perskaičiau"
+msgstr "Perskaityta"
#: bookwyrm/templates/feed/suggested_users.html:5
#: bookwyrm/templates/get_started/users.html:6
@@ -1483,7 +1483,7 @@ msgstr "Lentyna"
#: bookwyrm/templates/import/manual_review.html:13
#: bookwyrm/templates/snippets/create_status.html:17
msgid "Review"
-msgstr "Peržiūra"
+msgstr "Apžvalga"
#: bookwyrm/templates/import/import_status.html:119
msgid "Book"
@@ -1513,7 +1513,7 @@ msgstr "Importuota"
#: bookwyrm/templates/import/import_status.html:182
msgid "Needs manual review"
-msgstr "Reikalingas manualus atsiliepimas"
+msgstr "Reikalinga peržvelgti"
#: bookwyrm/templates/import/import_status.html:195
msgid "Retry"
@@ -2416,7 +2416,7 @@ msgstr[3] "%(display_count)s prašymai pakviesti"
#: bookwyrm/templates/settings/dashboard/dashboard.html:65
msgid "Instance Activity"
-msgstr "Pavyzdinė veikla"
+msgstr "Serverio statistika"
#: bookwyrm/templates/settings/dashboard/dashboard.html:83
msgid "Interval:"
@@ -2436,7 +2436,7 @@ msgstr "Naudotojo prisijungimo veikla"
#: bookwyrm/templates/settings/dashboard/dashboard.html:112
msgid "Status activity"
-msgstr "Būsenos veikla"
+msgstr "Būsenos"
#: bookwyrm/templates/settings/dashboard/dashboard.html:118
msgid "Works created"
@@ -3467,7 +3467,7 @@ msgstr "%(percent)s%% baigta!"
#: bookwyrm/templates/snippets/goal_progress.html:12
#, python-format
msgid "You've read %(read_count)s of %(goal_count)s books ."
-msgstr "Perskaitėte %(read_count)s iš %(goal_count)s knygų ."
+msgstr "Perskaityta %(read_count)s iš %(goal_count)s knygų ."
#: bookwyrm/templates/snippets/goal_progress.html:14
#, python-format
@@ -3504,7 +3504,7 @@ msgstr "Viešas"
#: bookwyrm/templates/snippets/privacy_select.html:14
#: bookwyrm/templates/snippets/privacy_select_no_followers.html:14
msgid "Unlisted"
-msgstr "Nėra sąraše"
+msgstr "Slaptas"
#: bookwyrm/templates/snippets/privacy-icons.html:12
msgid "Followers-only"
@@ -3873,7 +3873,7 @@ msgstr[3] "%(mutuals_display)s sekėjai, kuriuos sekate jūs"
#: bookwyrm/templates/user/user_preview.html:38
msgid "No followers you follow"
-msgstr "Jūs nieko nesekate"
+msgstr "Jūs kartu nieko nesekate"
#: bookwyrm/templates/widgets/clearable_file_input_with_warning.html:28
msgid "File exceeds maximum size: 10MB"
diff --git a/locale/zh_Hans/LC_MESSAGES/django.mo b/locale/zh_Hans/LC_MESSAGES/django.mo
index 1d1227f80..3e5590188 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 1b86621df..e52dfc4f5 100644
--- a/locale/zh_Hans/LC_MESSAGES/django.po
+++ b/locale/zh_Hans/LC_MESSAGES/django.po
@@ -3,7 +3,7 @@ msgstr ""
"Project-Id-Version: bookwyrm\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-11-17 18:03+0000\n"
-"PO-Revision-Date: 2021-11-17 18:42\n"
+"PO-Revision-Date: 2021-11-29 09:31\n"
"Last-Translator: Mouse Reeve \n"
"Language-Team: Chinese Simplified\n"
"Language: zh\n"
@@ -184,7 +184,7 @@ msgstr "Español(西班牙语)"
#: bookwyrm/settings.py:168
msgid "Galego (Galician)"
-msgstr ""
+msgstr "Galego(加利西亚语)"
#: bookwyrm/settings.py:169
msgid "Français (French)"
@@ -192,11 +192,11 @@ msgstr "Français(法语)"
#: bookwyrm/settings.py:170
msgid "Lietuvių (Lithuanian)"
-msgstr ""
+msgstr "Lietuvių(立陶宛语)"
#: bookwyrm/settings.py:171
msgid "Português - Brasil (Brazilian Portuguese)"
-msgstr "葡萄牙语-巴西(巴西的葡语)"
+msgstr "Português - Brasil(巴西葡萄牙语)"
#: bookwyrm/settings.py:172
msgid "简体中文 (Simplified Chinese)"
@@ -906,12 +906,12 @@ msgstr "%(username)s 想要阅读 %(username)s finished reading %(book_title)s "
-msgstr ""
+msgstr "%(username)s 完成了 %(book_title)s 的阅读"
#: bookwyrm/templates/discover/card-header.html:18
#, python-format
msgid "%(username)s started reading %(book_title)s "
-msgstr ""
+msgstr "%(username)s 开始阅读 %(book_title)s "
#: bookwyrm/templates/discover/card-header.html:23
#, python-format
@@ -1395,11 +1395,11 @@ msgstr "导入状态"
#: bookwyrm/templates/import/import_status.html:13
#: bookwyrm/templates/import/import_status.html:27
msgid "Retry Status"
-msgstr ""
+msgstr "重试状态"
#: bookwyrm/templates/import/import_status.html:22
msgid "Imports"
-msgstr ""
+msgstr "导入"
#: bookwyrm/templates/import/import_status.html:39
msgid "Import started:"
@@ -1407,36 +1407,36 @@ msgstr "导入开始:"
#: bookwyrm/templates/import/import_status.html:48
msgid "In progress"
-msgstr ""
+msgstr "正在进行"
#: bookwyrm/templates/import/import_status.html:50
msgid "Refresh"
-msgstr ""
+msgstr "刷新"
#: bookwyrm/templates/import/import_status.html:71
#, python-format
msgid "%(display_counter)s item needs manual approval."
msgid_plural "%(display_counter)s items need manual approval."
-msgstr[0] ""
+msgstr[0] "%(display_counter)s 项需要手动批准。"
#: bookwyrm/templates/import/import_status.html:76
#: bookwyrm/templates/import/manual_review.html:8
msgid "Review items"
-msgstr ""
+msgstr "审阅项目"
#: bookwyrm/templates/import/import_status.html:82
#, python-format
msgid "%(display_counter)s item failed to import."
msgid_plural "%(display_counter)s items failed to import."
-msgstr[0] ""
+msgstr[0] "%(display_counter)s 项导入失败。"
#: bookwyrm/templates/import/import_status.html:88
msgid "View and troubleshoot failed items"
-msgstr ""
+msgstr "查看并排查失败项目"
#: bookwyrm/templates/import/import_status.html:100
msgid "Row"
-msgstr ""
+msgstr "行"
#: bookwyrm/templates/import/import_status.html:103
#: bookwyrm/templates/shelf/shelf.html:141
@@ -1446,7 +1446,7 @@ msgstr "标题"
#: bookwyrm/templates/import/import_status.html:106
msgid "ISBN"
-msgstr ""
+msgstr "ISBN"
#: bookwyrm/templates/import/import_status.html:109
#: bookwyrm/templates/shelf/shelf.html:142
@@ -1456,7 +1456,7 @@ msgstr "作者"
#: bookwyrm/templates/import/import_status.html:112
msgid "Shelf"
-msgstr ""
+msgstr "书架"
#: bookwyrm/templates/import/import_status.html:115
#: bookwyrm/templates/import/manual_review.html:13
@@ -1480,11 +1480,11 @@ msgstr "状态"
#: bookwyrm/templates/import/import_status.html:130
msgid "Import preview unavailable."
-msgstr ""
+msgstr "导入预览不可用。"
#: bookwyrm/templates/import/import_status.html:162
msgid "View imported review"
-msgstr ""
+msgstr "查看已导入的书评"
#: bookwyrm/templates/import/import_status.html:176
msgid "Imported"
@@ -1492,28 +1492,28 @@ msgstr "已导入"
#: bookwyrm/templates/import/import_status.html:182
msgid "Needs manual review"
-msgstr ""
+msgstr "需要手动批准"
#: bookwyrm/templates/import/import_status.html:195
msgid "Retry"
-msgstr ""
+msgstr "重试"
#: bookwyrm/templates/import/import_status.html:213
msgid "This import is in an old format that is no longer supported. If you would like to troubleshoot missing items from this import, click the button below to update the import format."
-msgstr ""
+msgstr "此导入所用格式已不再受支持。 如果您想要在此次导入中排查缺失的项目,请点击下面的按钮来更新导入格式。"
#: bookwyrm/templates/import/import_status.html:215
msgid "Update import"
-msgstr ""
+msgstr "更新导入"
#: bookwyrm/templates/import/manual_review.html:5
#: bookwyrm/templates/import/troubleshoot.html:4
msgid "Import Troubleshooting"
-msgstr ""
+msgstr "导入排查"
#: bookwyrm/templates/import/manual_review.html:21
msgid "Approving a suggestion will permanently add the suggested book to your shelves and associate your reading dates, reviews, and ratings with that book."
-msgstr ""
+msgstr "批准建议后,被提议的书将会永久添加到您的书架上并与您的阅读日期、书评、评分联系起来。"
#: bookwyrm/templates/import/manual_review.html:58
#: bookwyrm/templates/lists/curate.html:57
@@ -1522,7 +1522,7 @@ msgstr "批准"
#: bookwyrm/templates/import/manual_review.html:66
msgid "Reject"
-msgstr ""
+msgstr "驳回"
#: bookwyrm/templates/import/tooltip.html:6
msgid "You can download your Goodreads data from the Import/Export page of your Goodreads account."
@@ -1530,31 +1530,31 @@ msgstr "您可以从 open an issue if you are seeing unexpected failed items."
-msgstr ""
+msgstr "如果您看到意外失败的项目,请联系您的管理员或 发起一个 issue 。"
#: bookwyrm/templates/landing/about.html:7 bookwyrm/templates/layout.html:230
#, python-format