diff --git a/bookwyrm/activitypub/base_activity.py b/bookwyrm/activitypub/base_activity.py index ddd45426..d20e7e94 100644 --- a/bookwyrm/activitypub/base_activity.py +++ b/bookwyrm/activitypub/base_activity.py @@ -106,8 +106,10 @@ class ActivityObject: value = field.default setattr(self, field.name, value) - # pylint: disable=too-many-locals,too-many-branches - def to_model(self, model=None, instance=None, allow_create=True, save=True): + # pylint: disable=too-many-locals,too-many-branches,too-many-arguments + def to_model( + self, model=None, instance=None, allow_create=True, save=True, overwrite=True + ): """convert from an activity to a model instance""" model = model or get_model_from_type(self.type) @@ -129,9 +131,12 @@ class ActivityObject: # keep track of what we've changed update_fields = [] + # sets field on the model using the activity value for field in instance.simple_fields: try: - changed = field.set_field_from_activity(instance, self) + changed = field.set_field_from_activity( + instance, self, overwrite=overwrite + ) if changed: update_fields.append(field.name) except AttributeError as e: @@ -140,7 +145,9 @@ class ActivityObject: # image fields have to be set after other fields because they can save # too early and jank up users for field in instance.image_fields: - changed = field.set_field_from_activity(instance, self, save=save) + changed = field.set_field_from_activity( + instance, self, save=save, overwrite=overwrite + ) if changed: update_fields.append(field.name) diff --git a/bookwyrm/activitypub/note.py b/bookwyrm/activitypub/note.py index 916da2d0..556ef185 100644 --- a/bookwyrm/activitypub/note.py +++ b/bookwyrm/activitypub/note.py @@ -59,6 +59,9 @@ class Comment(Note): """like a note but with a book""" inReplyToBook: str + readingStatus: str = None + progress: int = None + progressMode: str = None type: str = "Comment" diff --git a/bookwyrm/connectors/abstract_connector.py b/bookwyrm/connectors/abstract_connector.py index fb102ea4..ffacffdf 100644 --- a/bookwyrm/connectors/abstract_connector.py +++ b/bookwyrm/connectors/abstract_connector.py @@ -139,7 +139,7 @@ class AbstractConnector(AbstractMinimalConnector): **dict_from_mappings(work_data, self.book_mappings) ) # this will dedupe automatically - work = work_activity.to_model(model=models.Work) + work = work_activity.to_model(model=models.Work, overwrite=False) for author in self.get_authors_from_data(work_data): work.authors.add(author) @@ -156,7 +156,7 @@ class AbstractConnector(AbstractMinimalConnector): mapped_data = dict_from_mappings(edition_data, self.book_mappings) mapped_data["work"] = work.remote_id edition_activity = activitypub.Edition(**mapped_data) - edition = edition_activity.to_model(model=models.Edition) + edition = edition_activity.to_model(model=models.Edition, overwrite=False) edition.connector = self.connector edition.save() @@ -182,7 +182,7 @@ class AbstractConnector(AbstractMinimalConnector): return None # this will dedupe - return activity.to_model(model=models.Author) + return activity.to_model(model=models.Author, overwrite=False) @abstractmethod def is_work_data(self, data): diff --git a/bookwyrm/forms.py b/bookwyrm/forms.py index c9e795c3..e8812470 100644 --- a/bookwyrm/forms.py +++ b/bookwyrm/forms.py @@ -86,6 +86,7 @@ class CommentForm(CustomForm): "privacy", "progress", "progress_mode", + "reading_status", ] diff --git a/bookwyrm/migrations/0083_auto_20210816_2022.py b/bookwyrm/migrations/0083_auto_20210816_2022.py new file mode 100644 index 00000000..ecf2778b --- /dev/null +++ b/bookwyrm/migrations/0083_auto_20210816_2022.py @@ -0,0 +1,56 @@ +# Generated by Django 3.2.4 on 2021-08-16 20:22 + +import bookwyrm.models.fields +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ("bookwyrm", "0082_auto_20210806_2324"), + ] + + operations = [ + migrations.AddField( + model_name="comment", + name="reading_status", + field=bookwyrm.models.fields.CharField( + blank=True, + choices=[ + ("to-read", "Toread"), + ("reading", "Reading"), + ("read", "Read"), + ], + max_length=255, + null=True, + ), + ), + migrations.AddField( + model_name="quotation", + name="reading_status", + field=bookwyrm.models.fields.CharField( + blank=True, + choices=[ + ("to-read", "Toread"), + ("reading", "Reading"), + ("read", "Read"), + ], + max_length=255, + null=True, + ), + ), + migrations.AddField( + model_name="review", + name="reading_status", + field=bookwyrm.models.fields.CharField( + blank=True, + choices=[ + ("to-read", "Toread"), + ("reading", "Reading"), + ("read", "Read"), + ], + max_length=255, + null=True, + ), + ), + ] diff --git a/bookwyrm/migrations/0084_auto_20210817_1916.py b/bookwyrm/migrations/0084_auto_20210817_1916.py new file mode 100644 index 00000000..6e826f99 --- /dev/null +++ b/bookwyrm/migrations/0084_auto_20210817_1916.py @@ -0,0 +1,56 @@ +# Generated by Django 3.2.4 on 2021-08-17 19:16 + +import bookwyrm.models.fields +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ("bookwyrm", "0083_auto_20210816_2022"), + ] + + operations = [ + migrations.AlterField( + model_name="comment", + name="reading_status", + field=bookwyrm.models.fields.CharField( + blank=True, + choices=[ + ("to-read", "To-Read"), + ("reading", "Reading"), + ("read", "Read"), + ], + max_length=255, + null=True, + ), + ), + migrations.AlterField( + model_name="quotation", + name="reading_status", + field=bookwyrm.models.fields.CharField( + blank=True, + choices=[ + ("to-read", "To-Read"), + ("reading", "Reading"), + ("read", "Read"), + ], + max_length=255, + null=True, + ), + ), + migrations.AlterField( + model_name="review", + name="reading_status", + field=bookwyrm.models.fields.CharField( + blank=True, + choices=[ + ("to-read", "To-Read"), + ("reading", "Reading"), + ("read", "Read"), + ], + max_length=255, + null=True, + ), + ), + ] diff --git a/bookwyrm/models/fields.py b/bookwyrm/models/fields.py index b58f8174..6ed5aa5e 100644 --- a/bookwyrm/models/fields.py +++ b/bookwyrm/models/fields.py @@ -66,7 +66,7 @@ class ActivitypubFieldMixin: self.activitypub_field = activitypub_field super().__init__(*args, **kwargs) - def set_field_from_activity(self, instance, data): + def set_field_from_activity(self, instance, data, overwrite=True): """helper function for assinging a value to the field. Returns if changed""" try: value = getattr(data, self.get_activitypub_field()) @@ -79,8 +79,15 @@ class ActivitypubFieldMixin: if formatted is None or formatted is MISSING or formatted == {}: return False + current_value = ( + getattr(instance, self.name) if hasattr(instance, self.name) else None + ) + # if we're not in overwrite mode, only continue updating the field if its unset + if current_value and not overwrite: + return False + # the field is unchanged - if hasattr(instance, self.name) and getattr(instance, self.name) == formatted: + if current_value == formatted: return False setattr(instance, self.name, formatted) @@ -210,7 +217,10 @@ class PrivacyField(ActivitypubFieldMixin, models.CharField): ) # pylint: disable=invalid-name - def set_field_from_activity(self, instance, data): + def set_field_from_activity(self, instance, data, overwrite=True): + if not overwrite: + return False + original = getattr(instance, self.name) to = data.to cc = data.cc @@ -273,8 +283,11 @@ class ManyToManyField(ActivitypubFieldMixin, models.ManyToManyField): self.link_only = link_only super().__init__(*args, **kwargs) - def set_field_from_activity(self, instance, data): + def set_field_from_activity(self, instance, data, overwrite=True): """helper function for assinging a value to the field""" + if not overwrite and getattr(instance, self.name).exists(): + return False + value = getattr(data, self.get_activitypub_field()) formatted = self.field_from_activity(value) if formatted is None or formatted is MISSING: @@ -377,13 +390,16 @@ class ImageField(ActivitypubFieldMixin, models.ImageField): super().__init__(*args, **kwargs) # pylint: disable=arguments-differ - def set_field_from_activity(self, instance, data, save=True): + def set_field_from_activity(self, instance, data, save=True, overwrite=True): """helper function for assinging a value to the field""" value = getattr(data, self.get_activitypub_field()) formatted = self.field_from_activity(value) if formatted is None or formatted is MISSING: return False + if not overwrite and hasattr(instance, self.name): + return False + getattr(instance, self.name).save(*formatted, save=save) return True diff --git a/bookwyrm/models/status.py b/bookwyrm/models/status.py index 3c25f1af..9274a581 100644 --- a/bookwyrm/models/status.py +++ b/bookwyrm/models/status.py @@ -235,12 +235,31 @@ class GeneratedNote(Status): pure_type = "Note" -class Comment(Status): - """like a review but without a rating and transient""" +ReadingStatusChoices = models.TextChoices( + "ReadingStatusChoices", ["to-read", "reading", "read"] +) + + +class BookStatus(Status): + """Shared fields for comments, quotes, reviews""" book = fields.ForeignKey( "Edition", on_delete=models.PROTECT, activitypub_field="inReplyToBook" ) + pure_type = "Note" + + reading_status = fields.CharField( + max_length=255, choices=ReadingStatusChoices.choices, null=True, blank=True + ) + + class Meta: + """not a real model, sorry""" + + abstract = True + + +class Comment(BookStatus): + """like a review but without a rating and transient""" # this is it's own field instead of a foreign key to the progress update # so that the update can be deleted without impacting the status @@ -265,16 +284,12 @@ class Comment(Status): ) activity_serializer = activitypub.Comment - pure_type = "Note" -class Quotation(Status): +class Quotation(BookStatus): """like a review but without a rating and transient""" quote = fields.HtmlField() - book = fields.ForeignKey( - "Edition", on_delete=models.PROTECT, activitypub_field="inReplyToBook" - ) @property def pure_content(self): @@ -289,16 +304,12 @@ class Quotation(Status): ) activity_serializer = activitypub.Quotation - pure_type = "Note" -class Review(Status): +class Review(BookStatus): """a book review""" name = fields.CharField(max_length=255, null=True) - book = fields.ForeignKey( - "Edition", on_delete=models.PROTECT, activitypub_field="inReplyToBook" - ) rating = fields.DecimalField( default=None, null=True, diff --git a/bookwyrm/static/js/bookwyrm.js b/bookwyrm/static/js/bookwyrm.js index a4002c2d..894b1fb6 100644 --- a/bookwyrm/static/js/bookwyrm.js +++ b/bookwyrm/static/js/bookwyrm.js @@ -138,8 +138,11 @@ let BookWyrm = new class { * @return {undefined} */ toggleAction(event) { - event.preventDefault(); let trigger = event.currentTarget; + + if (!trigger.dataset.allowDefault || event.currentTarget == event.target) { + event.preventDefault(); + } let pressed = trigger.getAttribute('aria-pressed') === 'false'; let targetId = trigger.dataset.controls; @@ -177,6 +180,13 @@ let BookWyrm = new class { this.toggleCheckbox(checkbox, pressed); } + // Toggle form disabled, if appropriate + let disable = trigger.dataset.disables; + + if (disable) { + this.toggleDisabled(disable, !pressed); + } + // Set focus, if appropriate. let focus = trigger.dataset.focusTarget; @@ -227,6 +237,17 @@ let BookWyrm = new class { document.getElementById(checkbox).checked = !!pressed; } + /** + * Enable or disable a form element or fieldset + * + * @param {string} form_element - id of the element + * @param {boolean} pressed - Is the trigger pressed? + * @return {undefined} + */ + toggleDisabled(form_element, pressed) { + document.getElementById(form_element).disabled = !!pressed; + } + /** * Give the focus to an element. * Only move the focus based on user interactions. diff --git a/bookwyrm/templates/book/edition_filters.html b/bookwyrm/templates/book/edition_filters.html index a55b72af..c41ab0c0 100644 --- a/bookwyrm/templates/book/edition_filters.html +++ b/bookwyrm/templates/book/edition_filters.html @@ -1,6 +1,7 @@ {% extends 'snippets/filters_panel/filters_panel.html' %} {% block filter_fields %} +{% include 'book/search_filter.html' %} {% include 'book/language_filter.html' %} {% include 'book/format_filter.html' %} {% endblock %} diff --git a/bookwyrm/templates/book/search_filter.html b/bookwyrm/templates/book/search_filter.html new file mode 100644 index 00000000..f2345a68 --- /dev/null +++ b/bookwyrm/templates/book/search_filter.html @@ -0,0 +1,8 @@ +{% extends 'snippets/filters_panel/filter_field.html' %} +{% load i18n %} + +{% block filter %} + + +{% endblock %} + diff --git a/bookwyrm/templates/reading_progress/finish.html b/bookwyrm/templates/reading_progress/finish.html index a9f60f04..ca69128e 100644 --- a/bookwyrm/templates/reading_progress/finish.html +++ b/bookwyrm/templates/reading_progress/finish.html @@ -9,6 +9,6 @@ Finish "{{ book_title }}" {% block content %} -{% include "snippets/shelve_button/finish_reading_modal.html" with book=book active=True %} +{% include "snippets/reading_modals/finish_reading_modal.html" with book=book active=True %} {% endblock %} diff --git a/bookwyrm/templates/reading_progress/start.html b/bookwyrm/templates/reading_progress/start.html index 9c457947..e24a0e05 100644 --- a/bookwyrm/templates/reading_progress/start.html +++ b/bookwyrm/templates/reading_progress/start.html @@ -9,6 +9,6 @@ Start "{{ book_title }}" {% block content %} -{% include "snippets/shelve_button/start_reading_modal.html" with book=book active=True %} +{% include "snippets/reading_modals/start_reading_modal.html" with book=book active=True %} {% endblock %} diff --git a/bookwyrm/templates/reading_progress/want.html b/bookwyrm/templates/reading_progress/want.html index e0353193..6122ade3 100644 --- a/bookwyrm/templates/reading_progress/want.html +++ b/bookwyrm/templates/reading_progress/want.html @@ -9,6 +9,6 @@ Want to Read "{{ book_title }}" {% block content %} -{% include "snippets/shelve_button/want_to_read_modal.html" with book=book active=True %} +{% include "snippets/reading_modals/want_to_read_modal.html" with book=book active=True %} {% endblock %} diff --git a/bookwyrm/templates/snippets/create_status/content_field.html b/bookwyrm/templates/snippets/create_status/content_field.html index 0a42a832..90337200 100644 --- a/bookwyrm/templates/snippets/create_status/content_field.html +++ b/bookwyrm/templates/snippets/create_status/content_field.html @@ -14,6 +14,6 @@ draft: an existing Status object that is providing default values for input fiel id="id_content_{{ type }}_{{ book.id }}{{ reply_parent.id }}" placeholder="{{ placeholder }}" aria-label="{% if reply_parent %}{% trans 'Reply' %}{% else %}{% trans 'Content' %}{% endif %}" - {% if type != "quotation" %}required{% endif %} + {% if not optional and type != "quotation" %}required{% endif %} >{% if reply_parent %}{{ reply_parent|mentions:request.user }}{% endif %}{% if mention %}@{{ mention|username }} {% endif %}{{ draft.content|default:'' }} diff --git a/bookwyrm/templates/snippets/reading_modals/finish_reading_modal.html b/bookwyrm/templates/snippets/reading_modals/finish_reading_modal.html new file mode 100644 index 00000000..3a034693 --- /dev/null +++ b/bookwyrm/templates/snippets/reading_modals/finish_reading_modal.html @@ -0,0 +1,36 @@ +{% extends 'snippets/reading_modals/layout.html' %} +{% load i18n %} +{% load utilities %} + +{% block modal-title %} +{% blocktrans trimmed with book_title=book|book_title %} +Finish "{{ book_title }}" +{% endblocktrans %} +{% endblock %} + +{% block modal-form-open %} +
+{% csrf_token %} + +{% endblock %} + +{% block reading-dates %} +
+
+
+ + +
+
+
+
+ + +
+
+
+{% endblock %} diff --git a/bookwyrm/templates/snippets/reading_modals/form.html b/bookwyrm/templates/snippets/reading_modals/form.html new file mode 100644 index 00000000..d1ba916f --- /dev/null +++ b/bookwyrm/templates/snippets/reading_modals/form.html @@ -0,0 +1,15 @@ +{% extends "snippets/create_status/layout.html" %} +{% load i18n %} + +{% block form_open %}{% endblock %} + +{% block content_label %} +{% trans "Comment:" %} +{% trans "(Optional)" %} +{% endblock %} + +{% block initial_fields %} + + + +{% endblock %} diff --git a/bookwyrm/templates/snippets/reading_modals/layout.html b/bookwyrm/templates/snippets/reading_modals/layout.html new file mode 100644 index 00000000..0f5dedb0 --- /dev/null +++ b/bookwyrm/templates/snippets/reading_modals/layout.html @@ -0,0 +1,28 @@ +{% extends 'components/modal.html' %} +{% load i18n %} +{% load utilities %} + +{% block modal-body %} + +{% block reading-dates %}{% endblock %} + +{% with 0|uuid as local_uuid %} +
+ + +
+ +
+ +
+ {% include "snippets/reading_modals/form.html" with optional=True %} +
+
+{% endwith %} + +{% endblock %} diff --git a/bookwyrm/templates/snippets/shelve_button/progress_update_modal.html b/bookwyrm/templates/snippets/reading_modals/progress_update_modal.html similarity index 100% rename from bookwyrm/templates/snippets/shelve_button/progress_update_modal.html rename to bookwyrm/templates/snippets/reading_modals/progress_update_modal.html diff --git a/bookwyrm/templates/snippets/reading_modals/start_reading_modal.html b/bookwyrm/templates/snippets/reading_modals/start_reading_modal.html new file mode 100644 index 00000000..099fd915 --- /dev/null +++ b/bookwyrm/templates/snippets/reading_modals/start_reading_modal.html @@ -0,0 +1,24 @@ +{% extends 'snippets/reading_modals/layout.html' %} +{% load i18n %} +{% load utilities %} + +{% block modal-title %} +{% blocktrans trimmed with book_title=book|book_title %} +Start "{{ book_title }}" +{% endblocktrans %} +{% endblock %} + +{% block modal-form-open %} + + +{% csrf_token %} +{% endblock %} + +{% block reading-dates %} +
+ + +
+{% endblock %} diff --git a/bookwyrm/templates/snippets/reading_modals/want_to_read_modal.html b/bookwyrm/templates/snippets/reading_modals/want_to_read_modal.html new file mode 100644 index 00000000..1213b18e --- /dev/null +++ b/bookwyrm/templates/snippets/reading_modals/want_to_read_modal.html @@ -0,0 +1,15 @@ +{% extends 'snippets/reading_modals/layout.html' %} +{% load i18n %} +{% load utilities %} + +{% block modal-title %} +{% blocktrans trimmed with book_title=book|book_title %} +Want to Read "{{ book_title }}" +{% endblocktrans %} +{% endblock %} + +{% block modal-form-open %} + + +{% csrf_token %} +{% endblock %} diff --git a/bookwyrm/templates/snippets/shelve_button/finish_reading_modal.html b/bookwyrm/templates/snippets/shelve_button/finish_reading_modal.html deleted file mode 100644 index 36addc7b..00000000 --- a/bookwyrm/templates/snippets/shelve_button/finish_reading_modal.html +++ /dev/null @@ -1,48 +0,0 @@ -{% extends 'components/modal.html' %} -{% load i18n %} - -{% block modal-title %} -{% blocktrans with book_title=book.title %}Finish "{{ book_title }}"{% endblocktrans %} -{% endblock %} - - -{% block modal-form-open %} - -{% endblock %} - -{% block modal-body %} - -{% endblock %} - -{% block modal-footer %} -
-
- - {% include 'snippets/privacy_select.html' %} -
-
- - {% trans "Cancel" as button_text %} - {% include 'snippets/toggle/close_button.html' with text=button_text controls_text="finish-reading" controls_uid=uuid %} -
-
-{% endblock %} -{% block modal-form-close %}
{% endblock %} diff --git a/bookwyrm/templates/snippets/shelve_button/shelve_button.html b/bookwyrm/templates/snippets/shelve_button/shelve_button.html index 40a9f6e7..18941812 100644 --- a/bookwyrm/templates/snippets/shelve_button/shelve_button.html +++ b/bookwyrm/templates/snippets/shelve_button/shelve_button.html @@ -19,13 +19,13 @@ {% endif %} -{% include 'snippets/shelve_button/want_to_read_modal.html' with book=active_shelf.book controls_text="want_to_read" controls_uid=uuid %} +{% include 'snippets/reading_modals/want_to_read_modal.html' with book=active_shelf.book controls_text="want_to_read" controls_uid=uuid %} -{% include 'snippets/shelve_button/start_reading_modal.html' with book=active_shelf.book controls_text="start_reading" controls_uid=uuid %} +{% include 'snippets/reading_modals/start_reading_modal.html' with book=active_shelf.book controls_text="start_reading" controls_uid=uuid %} -{% include 'snippets/shelve_button/finish_reading_modal.html' with book=active_shelf.book controls_text="finish_reading" controls_uid=uuid readthrough=readthrough %} +{% include 'snippets/reading_modals/finish_reading_modal.html' with book=active_shelf.book controls_text="finish_reading" controls_uid=uuid readthrough=readthrough %} -{% include 'snippets/shelve_button/progress_update_modal.html' with book=active_shelf_book.book controls_text="progress_update" controls_uid=uuid readthrough=readthrough %} +{% include 'snippets/reading_modals/progress_update_modal.html' with book=active_shelf_book.book controls_text="progress_update" controls_uid=uuid readthrough=readthrough %} {% endwith %} {% endif %} diff --git a/bookwyrm/templates/snippets/shelve_button/start_reading_modal.html b/bookwyrm/templates/snippets/shelve_button/start_reading_modal.html deleted file mode 100644 index 1858313b..00000000 --- a/bookwyrm/templates/snippets/shelve_button/start_reading_modal.html +++ /dev/null @@ -1,42 +0,0 @@ -{% extends 'components/modal.html' %} -{% load i18n %} - -{% block modal-title %} -{% blocktrans trimmed with book_title=book.title %} -Start "{{ book_title }}" -{% endblocktrans %} -{% endblock %} - -{% block modal-form-open %} -
-{% endblock %} - -{% block modal-body %} - -{% endblock %} - -{% block modal-footer %} -
-
- - {% include 'snippets/privacy_select.html' %} -
-
- - {% trans "Cancel" as button_text %} - {% include 'snippets/toggle/toggle_button.html' with text=button_text controls_text="start-reading" controls_uid=uuid %} -
-
-{% endblock %} -{% block modal-form-close %}
{% endblock %} diff --git a/bookwyrm/templates/snippets/shelve_button/want_to_read_modal.html b/bookwyrm/templates/snippets/shelve_button/want_to_read_modal.html deleted file mode 100644 index 643e4a20..00000000 --- a/bookwyrm/templates/snippets/shelve_button/want_to_read_modal.html +++ /dev/null @@ -1,33 +0,0 @@ -{% extends 'components/modal.html' %} -{% load i18n %} - -{% block modal-title %} -{% blocktrans with book_title=book.title %}Want to Read "{{ book_title }}"{% endblocktrans %} -{% endblock %} - -{% block modal-form-open %} -
- {% csrf_token %} - - -{% endblock %} - -{% block modal-footer %} -
-
- - {% include 'snippets/privacy_select.html' %} -
-
- - {% trans "Cancel" as button_text %} - {% include 'snippets/toggle/toggle_button.html' with text=button_text controls_text="want-to-read" controls_uid=uuid %} -
-
-{% endblock %} -{% block modal-form-close %}
{% endblock %} diff --git a/bookwyrm/templates/snippets/status/headers/comment.html b/bookwyrm/templates/snippets/status/headers/comment.html index 6886cfed..88ba30ca 100644 --- a/bookwyrm/templates/snippets/status/headers/comment.html +++ b/bookwyrm/templates/snippets/status/headers/comment.html @@ -1,2 +1,2 @@ {% load i18n %}{% load utilities %} -{% blocktrans with book_path=book.local_path book=status.book|book_title %}commented on {{ book }}{% endblocktrans %} +{% blocktrans with book_path=status.book.local_path book=status.book|book_title %}commented on {{ book }}{% endblocktrans %} diff --git a/bookwyrm/templates/snippets/status/headers/read.html b/bookwyrm/templates/snippets/status/headers/read.html index f942c0f0..bc6147df 100644 --- a/bookwyrm/templates/snippets/status/headers/read.html +++ b/bookwyrm/templates/snippets/status/headers/read.html @@ -1,7 +1,8 @@ {% spaceless %} -{% load i18n %}{% load utilities %} +{% load i18n %} +{% load utilities %} +{% load status_display %} -{% with book=status.mention_books.first %} +{% load_book status as book %} {% blocktrans with book_path=book.remote_id book=book|book_title %}finished reading {{ book }}{% endblocktrans %} -{% endwith %} {% endspaceless %} diff --git a/bookwyrm/templates/snippets/status/headers/reading.html b/bookwyrm/templates/snippets/status/headers/reading.html index 460c4cae..e8b51f7b 100644 --- a/bookwyrm/templates/snippets/status/headers/reading.html +++ b/bookwyrm/templates/snippets/status/headers/reading.html @@ -1,9 +1,8 @@ {% spaceless %} {% load i18n %} {% load utilities %} +{% load status_display %} -{% with book=status.mention_books.first %} +{% load_book status as book %} {% blocktrans with book_path=book.remote_id book=book|book_title %}started reading {{ book }}{% endblocktrans %} -{% endwith %} - {% endspaceless %} diff --git a/bookwyrm/templates/snippets/status/headers/to_read.html b/bookwyrm/templates/snippets/status/headers/to_read.html index 7b89a775..c252e71d 100644 --- a/bookwyrm/templates/snippets/status/headers/to_read.html +++ b/bookwyrm/templates/snippets/status/headers/to_read.html @@ -1,8 +1,8 @@ {% spaceless %} {% load i18n %} {% load utilities %} +{% load status_display %} -{% with book=status.mention_books.first %} +{% load_book status as book %} {% blocktrans with book_path=book.remote_id book=book|book_title %}{{ username }} wants to read {{ book }}{% endblocktrans %} -{% endwith %} {% endspaceless %} diff --git a/bookwyrm/templates/user/layout.html b/bookwyrm/templates/user/layout.html old mode 100644 new mode 100755 diff --git a/bookwyrm/templates/user/lists.html b/bookwyrm/templates/user/lists.html old mode 100644 new mode 100755 diff --git a/bookwyrm/templates/user/shelf/shelf.html b/bookwyrm/templates/user/shelf/shelf.html index 32cad25d..c48ec19a 100644 --- a/bookwyrm/templates/user/shelf/shelf.html +++ b/bookwyrm/templates/user/shelf/shelf.html @@ -1,4 +1,4 @@ -{% extends 'user/layout.html' %} +{% extends 'layout.html' %} {% load bookwyrm_tags %} {% load utilities %} {% load humanize %} @@ -8,15 +8,17 @@ {% include 'user/shelf/books_header.html' %} {% endblock %} -{% block header %} -
+{% block opengraph_images %} + {% include 'snippets/opengraph_images.html' with image=user.preview_image %} +{% endblock %} + +{% block content %} +

{% include 'user/shelf/books_header.html' %}

-{% endblock %} -{% block tabs %}
@@ -41,9 +43,7 @@
{% endif %}
-{% endblock %} -{% block panel %}
{% include 'user/shelf/create_shelf_form.html' with controls_text='create_shelf_form' %}
diff --git a/bookwyrm/templates/user/user.html b/bookwyrm/templates/user/user.html old mode 100644 new mode 100755 diff --git a/bookwyrm/templates/user/user_preview.html b/bookwyrm/templates/user/user_preview.html old mode 100644 new mode 100755 diff --git a/bookwyrm/templatetags/status_display.py b/bookwyrm/templatetags/status_display.py index 0d013775..e43c0f94 100644 --- a/bookwyrm/templatetags/status_display.py +++ b/bookwyrm/templatetags/status_display.py @@ -70,7 +70,13 @@ def get_header_template(status): """get the path for the status template""" if isinstance(status, models.Boost): status = status.boosted_status - filename = "snippets/status/headers/{:s}.html".format(status.status_type.lower()) + try: + header_type = status.reading_status + if not header_type: + raise AttributeError() + except AttributeError: + header_type = status.status_type.lower() + filename = f"snippets/status/headers/{header_type}.html" header_template = select_template([filename, "snippets/status/headers/note.html"]) return header_template.render({"status": status}) diff --git a/bookwyrm/tests/views/inbox/test_inbox_create.py b/bookwyrm/tests/views/inbox/test_inbox_create.py index 6e891723..059d0522 100644 --- a/bookwyrm/tests/views/inbox/test_inbox_create.py +++ b/bookwyrm/tests/views/inbox/test_inbox_create.py @@ -77,6 +77,33 @@ class InboxCreate(TestCase): views.inbox.activity_task(activity) self.assertEqual(models.Status.objects.count(), 1) + @patch("bookwyrm.activitystreams.ActivityStream.add_status") + def test_create_comment_with_reading_status(self, *_): + """the "it justs works" mode""" + datafile = pathlib.Path(__file__).parent.joinpath("../../data/ap_comment.json") + status_data = json.loads(datafile.read_bytes()) + status_data["readingStatus"] = "to-read" + + models.Edition.objects.create( + title="Test Book", remote_id="https://example.com/book/1" + ) + activity = self.create_json + activity["object"] = status_data + + with patch("bookwyrm.activitystreams.ActivityStream.add_status") as redis_mock: + views.inbox.activity_task(activity) + self.assertTrue(redis_mock.called) + + status = models.Comment.objects.get() + self.assertEqual(status.remote_id, "https://example.com/user/mouse/comment/6") + self.assertEqual(status.content, "commentary") + self.assertEqual(status.reading_status, "to-read") + self.assertEqual(status.user, self.local_user) + + # while we're here, lets ensure we avoid dupes + views.inbox.activity_task(activity) + self.assertEqual(models.Status.objects.count(), 1) + def test_create_status_remote_note_with_mention(self, _): """should only create it under the right circumstances""" self.assertFalse( diff --git a/bookwyrm/tests/views/test_book.py b/bookwyrm/tests/views/test_book.py index c5d86a12..2cd50302 100644 --- a/bookwyrm/tests/views/test_book.py +++ b/bookwyrm/tests/views/test_book.py @@ -280,49 +280,6 @@ class BookViews(TestCase): self.assertEqual(book.authors.first().name, "Sappho") self.assertEqual(book.authors.first(), book.parent_work.authors.first()) - @patch("bookwyrm.suggested_users.rerank_suggestions_task.delay") - def test_switch_edition(self, _): - """updates user's relationships to a book""" - work = models.Work.objects.create(title="test work") - edition1 = models.Edition.objects.create(title="first ed", parent_work=work) - edition2 = models.Edition.objects.create(title="second ed", parent_work=work) - with patch("bookwyrm.models.activitypub_mixin.broadcast_task.delay"): - shelf = models.Shelf.objects.create(name="Test Shelf", user=self.local_user) - models.ShelfBook.objects.create( - book=edition1, - user=self.local_user, - shelf=shelf, - ) - models.ReadThrough.objects.create(user=self.local_user, book=edition1) - - self.assertEqual(models.ShelfBook.objects.get().book, edition1) - self.assertEqual(models.ReadThrough.objects.get().book, edition1) - request = self.factory.post("", {"edition": edition2.id}) - request.user = self.local_user - with patch("bookwyrm.models.activitypub_mixin.broadcast_task.delay"): - views.switch_edition(request) - - self.assertEqual(models.ShelfBook.objects.get().book, edition2) - self.assertEqual(models.ReadThrough.objects.get().book, edition2) - - def test_editions_page(self): - """there are so many views, this just makes sure it LOADS""" - view = views.Editions.as_view() - request = self.factory.get("") - with patch("bookwyrm.views.books.is_api_request") as is_api: - is_api.return_value = False - result = view(request, self.work.id) - self.assertIsInstance(result, TemplateResponse) - result.render() - self.assertEqual(result.status_code, 200) - - request = self.factory.get("") - with patch("bookwyrm.views.books.is_api_request") as is_api: - is_api.return_value = True - result = view(request, self.work.id) - self.assertIsInstance(result, ActivitypubResponse) - self.assertEqual(result.status_code, 200) - def test_upload_cover_file(self): """add a cover via file upload""" self.assertFalse(self.book.cover) diff --git a/bookwyrm/tests/views/test_editions.py b/bookwyrm/tests/views/test_editions.py new file mode 100644 index 00000000..1bd23ae1 --- /dev/null +++ b/bookwyrm/tests/views/test_editions.py @@ -0,0 +1,126 @@ +""" test for app action functionality """ +from unittest.mock import patch + +from django.template.response import TemplateResponse +from django.test import TestCase +from django.test.client import RequestFactory + +from bookwyrm import models, views +from bookwyrm.activitypub import ActivitypubResponse + + +class BookViews(TestCase): + """books books books""" + + def setUp(self): + """we need basic test data and mocks""" + self.factory = RequestFactory() + with patch("bookwyrm.suggested_users.rerank_suggestions_task.delay"): + self.local_user = models.User.objects.create_user( + "mouse@local.com", + "mouse@mouse.com", + "mouseword", + local=True, + localname="mouse", + remote_id="https://example.com/users/mouse", + ) + self.work = models.Work.objects.create(title="Test Work") + self.book = models.Edition.objects.create( + title="Example Edition", + remote_id="https://example.com/book/1", + parent_work=self.work, + physical_format="paperback", + ) + + models.SiteSettings.objects.create() + + def test_editions_page(self): + """there are so many views, this just makes sure it LOADS""" + view = views.Editions.as_view() + request = self.factory.get("") + with patch("bookwyrm.views.editions.is_api_request") as is_api: + is_api.return_value = False + result = view(request, self.work.id) + self.assertIsInstance(result, TemplateResponse) + result.render() + self.assertEqual(result.status_code, 200) + self.assertTrue("paperback" in result.context_data["formats"]) + + def test_editions_page_filtered(self): + """editions view with filters""" + models.Edition.objects.create( + title="Fish", + physical_format="okay", + parent_work=self.work, + ) + view = views.Editions.as_view() + request = self.factory.get("") + with patch("bookwyrm.views.editions.is_api_request") as is_api: + is_api.return_value = False + result = view(request, self.work.id) + self.assertIsInstance(result, TemplateResponse) + result.render() + self.assertEqual(result.status_code, 200) + self.assertEqual(len(result.context_data["editions"].object_list), 2) + self.assertEqual(len(result.context_data["formats"]), 2) + self.assertTrue("paperback" in result.context_data["formats"]) + self.assertTrue("okay" in result.context_data["formats"]) + + request = self.factory.get("", {"q": "fish"}) + with patch("bookwyrm.views.editions.is_api_request") as is_api: + is_api.return_value = False + result = view(request, self.work.id) + result.render() + self.assertEqual(result.status_code, 200) + self.assertEqual(len(result.context_data["editions"].object_list), 1) + + request = self.factory.get("", {"q": "okay"}) + with patch("bookwyrm.views.editions.is_api_request") as is_api: + is_api.return_value = False + result = view(request, self.work.id) + result.render() + self.assertEqual(result.status_code, 200) + self.assertEqual(len(result.context_data["editions"].object_list), 1) + + request = self.factory.get("", {"format": "okay"}) + with patch("bookwyrm.views.editions.is_api_request") as is_api: + is_api.return_value = False + result = view(request, self.work.id) + result.render() + self.assertEqual(result.status_code, 200) + self.assertEqual(len(result.context_data["editions"].object_list), 1) + + def test_editions_page_api(self): + """there are so many views, this just makes sure it LOADS""" + view = views.Editions.as_view() + request = self.factory.get("") + with patch("bookwyrm.views.editions.is_api_request") as is_api: + is_api.return_value = True + result = view(request, self.work.id) + self.assertIsInstance(result, ActivitypubResponse) + self.assertEqual(result.status_code, 200) + + @patch("bookwyrm.suggested_users.rerank_suggestions_task.delay") + def test_switch_edition(self, _): + """updates user's relationships to a book""" + work = models.Work.objects.create(title="test work") + edition1 = models.Edition.objects.create(title="first ed", parent_work=work) + edition2 = models.Edition.objects.create(title="second ed", parent_work=work) + with patch("bookwyrm.models.activitypub_mixin.broadcast_task.delay"): + shelf = models.Shelf.objects.create(name="Test Shelf", user=self.local_user) + models.ShelfBook.objects.create( + book=edition1, + user=self.local_user, + shelf=shelf, + ) + models.ReadThrough.objects.create(user=self.local_user, book=edition1) + + self.assertEqual(models.ShelfBook.objects.get().book, edition1) + self.assertEqual(models.ReadThrough.objects.get().book, edition1) + request = self.factory.post("", {"edition": edition2.id}) + request.user = self.local_user + with patch("bookwyrm.models.activitypub_mixin.broadcast_task.delay"): + views.switch_edition(request) + + self.assertEqual(models.ShelfBook.objects.get().book, edition2) + self.assertEqual(models.ReadThrough.objects.get().book, edition2) diff --git a/bookwyrm/views/__init__.py b/bookwyrm/views/__init__.py index 15b55acc..303dad62 100644 --- a/bookwyrm/views/__init__.py +++ b/bookwyrm/views/__init__.py @@ -4,11 +4,12 @@ from .authentication import Login, Register, Logout from .authentication import ConfirmEmail, ConfirmEmailCode, resend_link from .author import Author, EditAuthor from .block import Block, unblock -from .books import Book, EditBook, ConfirmEditBook, Editions -from .books import upload_cover, add_description, switch_edition, resolve_book +from .books import Book, EditBook, ConfirmEditBook +from .books import upload_cover, add_description, resolve_book from .directory import Directory from .discover import Discover from .edit_user import EditUser, DeleteUser +from .editions import Editions, switch_edition from .federation import Federation, FederatedServer from .federation import AddFederatedServer, ImportServerBlocklist from .federation import block_server, unblock_server diff --git a/bookwyrm/views/books.py b/bookwyrm/views/books.py index 6cd0427c..97c23def 100644 --- a/bookwyrm/views/books.py +++ b/bookwyrm/views/books.py @@ -24,7 +24,7 @@ from bookwyrm.settings import PAGE_LENGTH from .helpers import is_api_request, get_edition, privacy_filter -# pylint: disable= no-self-use +# pylint: disable=no-self-use class Book(View): """a book! this is the stuff""" @@ -270,37 +270,6 @@ class ConfirmEditBook(View): return redirect("/book/%s" % book.id) -class Editions(View): - """list of editions""" - - def get(self, request, book_id): - """list of editions of a book""" - work = get_object_or_404(models.Work, id=book_id) - - if is_api_request(request): - return ActivitypubResponse(work.to_edition_list(**request.GET)) - filters = {} - - if request.GET.get("language"): - filters["languages__contains"] = [request.GET.get("language")] - if request.GET.get("format"): - filters["physical_format__iexact"] = request.GET.get("format") - - editions = work.editions.order_by("-edition_rank") - languages = set(sum([e.languages for e in editions], [])) - - paginated = Paginator(editions.filter(**filters), PAGE_LENGTH) - data = { - "editions": paginated.get_page(request.GET.get("page")), - "work": work, - "languages": languages, - "formats": set( - e.physical_format.lower() for e in editions if e.physical_format - ), - } - return TemplateResponse(request, "book/editions.html", data) - - @login_required @require_POST def upload_cover(request, book_id): @@ -363,33 +332,3 @@ def resolve_book(request): book = connector.get_or_create_book(remote_id) return redirect("book", book.id) - - -@login_required -@require_POST -@transaction.atomic -def switch_edition(request): - """switch your copy of a book to a different edition""" - edition_id = request.POST.get("edition") - new_edition = get_object_or_404(models.Edition, id=edition_id) - shelfbooks = models.ShelfBook.objects.filter( - book__parent_work=new_edition.parent_work, shelf__user=request.user - ) - for shelfbook in shelfbooks.all(): - with transaction.atomic(): - models.ShelfBook.objects.create( - created_date=shelfbook.created_date, - user=shelfbook.user, - shelf=shelfbook.shelf, - book=new_edition, - ) - shelfbook.delete() - - readthroughs = models.ReadThrough.objects.filter( - book__parent_work=new_edition.parent_work, user=request.user - ) - for readthrough in readthroughs.all(): - readthrough.book = new_edition - readthrough.save() - - return redirect("/book/%d" % new_edition.id) diff --git a/bookwyrm/views/editions.py b/bookwyrm/views/editions.py new file mode 100644 index 00000000..7615c497 --- /dev/null +++ b/bookwyrm/views/editions.py @@ -0,0 +1,99 @@ +""" the good stuff! the books! """ +from functools import reduce +import operator + +from django.contrib.auth.decorators import login_required +from django.core.paginator import Paginator +from django.db import transaction +from django.db.models import Q +from django.shortcuts import get_object_or_404, redirect +from django.template.response import TemplateResponse +from django.views import View +from django.views.decorators.http import require_POST + +from bookwyrm import models +from bookwyrm.activitypub import ActivitypubResponse +from bookwyrm.settings import PAGE_LENGTH +from .helpers import is_api_request + + +# pylint: disable=no-self-use +class Editions(View): + """list of editions""" + + def get(self, request, book_id): + """list of editions of a book""" + work = get_object_or_404(models.Work, id=book_id) + + if is_api_request(request): + return ActivitypubResponse(work.to_edition_list(**request.GET)) + filters = {} + + if request.GET.get("language"): + filters["languages__contains"] = [request.GET.get("language")] + if request.GET.get("format"): + filters["physical_format__iexact"] = request.GET.get("format") + + editions = work.editions.order_by("-edition_rank") + languages = set(sum(editions.values_list("languages", flat=True), [])) + + editions = editions.filter(**filters) + + query = request.GET.get("q") + if query: + searchable_array_fields = ["languages", "publishers"] + searchable_fields = [ + "title", + "physical_format", + "isbn_10", + "isbn_13", + "oclc_number", + "asin", + ] + search_filter_entries = [ + {f"{f}__icontains": query} for f in searchable_fields + ] + [{f"{f}__iexact": query} for f in searchable_array_fields] + editions = editions.filter( + reduce(operator.or_, (Q(**f) for f in search_filter_entries)) + ) + + paginated = Paginator(editions, PAGE_LENGTH) + data = { + "editions": paginated.get_page(request.GET.get("page")), + "work": work, + "languages": languages, + "formats": set( + e.physical_format.lower() for e in editions if e.physical_format + ), + } + return TemplateResponse(request, "book/editions.html", data) + + +@login_required +@require_POST +@transaction.atomic +def switch_edition(request): + """switch your copy of a book to a different edition""" + edition_id = request.POST.get("edition") + new_edition = get_object_or_404(models.Edition, id=edition_id) + shelfbooks = models.ShelfBook.objects.filter( + book__parent_work=new_edition.parent_work, shelf__user=request.user + ) + for shelfbook in shelfbooks.all(): + with transaction.atomic(): + models.ShelfBook.objects.create( + created_date=shelfbook.created_date, + user=shelfbook.user, + shelf=shelfbook.shelf, + book=new_edition, + ) + shelfbook.delete() + + readthroughs = models.ReadThrough.objects.filter( + book__parent_work=new_edition.parent_work, user=request.user + ) + for readthrough in readthroughs.all(): + readthrough.book = new_edition + readthrough.save() + + return redirect("/book/%d" % new_edition.id) diff --git a/bookwyrm/views/password.py b/bookwyrm/views/password.py index 18fcb02c..6d202ce2 100644 --- a/bookwyrm/views/password.py +++ b/bookwyrm/views/password.py @@ -5,7 +5,7 @@ from django.core.exceptions import PermissionDenied from django.shortcuts import redirect from django.template.response import TemplateResponse from django.utils.decorators import method_decorator -from django.utils.translation import gettext as _ +from django.utils.translation import gettext_lazy as _ from django.views import View from bookwyrm import models diff --git a/bookwyrm/views/reading.py b/bookwyrm/views/reading.py index 1c897ab3..9100e1d4 100644 --- a/bookwyrm/views/reading.py +++ b/bookwyrm/views/reading.py @@ -12,7 +12,7 @@ from django.utils.decorators import method_decorator from django.views import View from django.views.decorators.http import require_POST -from bookwyrm import models +from bookwyrm import forms, models from .helpers import get_edition, handle_reading_status @@ -76,8 +76,17 @@ class ReadingStatus(View): # post about it (if you want) if request.POST.get("post-status"): - privacy = request.POST.get("privacy") - handle_reading_status(request.user, desired_shelf, book, privacy) + # is it a comment? + if request.POST.get("content"): + form = forms.CommentForm(request.POST) + if form.is_valid(): + form.save() + else: + # uh oh + raise Exception(form.errors) + else: + privacy = request.POST.get("privacy") + handle_reading_status(request.user, desired_shelf, book, privacy) return redirect(request.headers.get("Referer", "/")) diff --git a/bookwyrm/views/shelf.py b/bookwyrm/views/shelf.py index e9ad074d..ba9f6a3c 100644 --- a/bookwyrm/views/shelf.py +++ b/bookwyrm/views/shelf.py @@ -9,7 +9,7 @@ from django.http import HttpResponseBadRequest, HttpResponseNotFound from django.shortcuts import get_object_or_404, redirect from django.template.response import TemplateResponse from django.utils.decorators import method_decorator -from django.utils.translation import gettext as _ +from django.utils.translation import gettext_lazy as _ from django.views import View from django.views.decorators.http import require_POST diff --git a/locale/de_DE/LC_MESSAGES/django.po b/locale/de_DE/LC_MESSAGES/django.po index 6d658884..00fbd0e8 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-13 02:21+0000\n" +"POT-Creation-Date: 2021-08-16 21:26+0000\n" "PO-Revision-Date: 2021-03-02 17:19-0800\n" "Last-Translator: Mouse Reeve \n" "Language-Team: English \n" @@ -18,67 +18,67 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -#: bookwyrm/forms.py:232 +#: bookwyrm/forms.py:233 #, fuzzy #| msgid "A user with that username already exists." msgid "A user with this email already exists." msgstr "Dieser Benutzename ist bereits vergeben." -#: bookwyrm/forms.py:246 +#: bookwyrm/forms.py:247 msgid "One Day" msgstr "Ein Tag" -#: bookwyrm/forms.py:247 +#: bookwyrm/forms.py:248 msgid "One Week" msgstr "Eine Woche" -#: bookwyrm/forms.py:248 +#: bookwyrm/forms.py:249 msgid "One Month" msgstr "Ein Monat" -#: bookwyrm/forms.py:249 +#: bookwyrm/forms.py:250 msgid "Does Not Expire" msgstr "Läuft nicht aus" -#: bookwyrm/forms.py:254 +#: bookwyrm/forms.py:255 #, python-format msgid "%(count)d uses" msgstr "%(count)d Benutzungen" -#: bookwyrm/forms.py:257 +#: bookwyrm/forms.py:258 #, fuzzy #| msgid "Unlisted" msgid "Unlimited" msgstr "Ungelistet" -#: bookwyrm/forms.py:307 +#: bookwyrm/forms.py:308 msgid "List Order" msgstr "" -#: bookwyrm/forms.py:308 +#: bookwyrm/forms.py:309 #, fuzzy #| msgid "Title" msgid "Book Title" msgstr "Titel" -#: bookwyrm/forms.py:309 +#: bookwyrm/forms.py:310 #: bookwyrm/templates/snippets/create_status/review.html:25 #: bookwyrm/templates/user/shelf/shelf.html:85 #: bookwyrm/templates/user/shelf/shelf.html:116 msgid "Rating" msgstr "" -#: bookwyrm/forms.py:311 bookwyrm/templates/lists/list.html:107 +#: bookwyrm/forms.py:312 bookwyrm/templates/lists/list.html:107 msgid "Sort By" msgstr "" -#: bookwyrm/forms.py:315 +#: bookwyrm/forms.py:316 #, fuzzy #| msgid "Started reading" msgid "Ascending" msgstr "Zu lesen angefangen" -#: bookwyrm/forms.py:316 +#: bookwyrm/forms.py:317 #, fuzzy #| msgid "Started reading" msgid "Descending" @@ -308,9 +308,8 @@ msgstr "" #: bookwyrm/templates/settings/edit_server.html:68 #: bookwyrm/templates/settings/federated_server.html:98 #: bookwyrm/templates/settings/site.html:108 -#: bookwyrm/templates/snippets/shelve_button/finish_reading_modal.html:42 -#: bookwyrm/templates/snippets/shelve_button/progress_update_modal.html:42 -#: bookwyrm/templates/snippets/shelve_button/start_reading_modal.html:36 +#: bookwyrm/templates/snippets/reading_modals/layout.html:16 +#: bookwyrm/templates/snippets/reading_modals/progress_update_modal.html:42 #: bookwyrm/templates/user_admin/user_moderation_actions.html:45 msgid "Save" msgstr "Speichern" @@ -324,10 +323,7 @@ msgstr "Speichern" #: bookwyrm/templates/settings/federated_server.html:99 #: bookwyrm/templates/snippets/delete_readthrough_modal.html:17 #: bookwyrm/templates/snippets/goal_form.html:32 -#: bookwyrm/templates/snippets/shelve_button/finish_reading_modal.html:43 -#: bookwyrm/templates/snippets/shelve_button/progress_update_modal.html:43 -#: bookwyrm/templates/snippets/shelve_button/start_reading_modal.html:37 -#: bookwyrm/templates/snippets/shelve_button/want_to_read_modal.html:28 +#: bookwyrm/templates/snippets/reading_modals/progress_update_modal.html:43 msgid "Cancel" msgstr "Abbrechen" @@ -2709,24 +2705,24 @@ msgid "Some thoughts on the book" msgstr "" #: bookwyrm/templates/snippets/create_status/comment.html:26 -#: bookwyrm/templates/snippets/shelve_button/progress_update_modal.html:16 +#: bookwyrm/templates/snippets/reading_modals/progress_update_modal.html:16 msgid "Progress:" msgstr "Fortschritt:" #: bookwyrm/templates/snippets/create_status/comment.html:34 +#: bookwyrm/templates/snippets/reading_modals/progress_update_modal.html:30 #: bookwyrm/templates/snippets/readthrough_form.html:22 -#: bookwyrm/templates/snippets/shelve_button/progress_update_modal.html:30 msgid "pages" msgstr "Seiten" #: bookwyrm/templates/snippets/create_status/comment.html:35 +#: bookwyrm/templates/snippets/reading_modals/progress_update_modal.html:31 #: bookwyrm/templates/snippets/readthrough_form.html:23 -#: bookwyrm/templates/snippets/shelve_button/progress_update_modal.html:31 msgid "percent" msgstr "Prozent" #: bookwyrm/templates/snippets/create_status/comment.html:41 -#: bookwyrm/templates/snippets/shelve_button/progress_update_modal.html:36 +#: bookwyrm/templates/snippets/reading_modals/progress_update_modal.html:36 #, python-format msgid "of %(pages)s pages" msgstr "von %(pages)s Seiten" @@ -2757,6 +2753,7 @@ msgid "Include spoiler alert" msgstr "Spoileralarm aktivieren" #: bookwyrm/templates/snippets/create_status/layout.html:38 +#: bookwyrm/templates/snippets/reading_modals/form.html:7 #, fuzzy #| msgid "Comment" msgid "Comment:" @@ -2926,9 +2923,7 @@ msgid "Goal privacy:" msgstr "Sichtbarkeit des Ziels" #: bookwyrm/templates/snippets/goal_form.html:26 -#: bookwyrm/templates/snippets/shelve_button/finish_reading_modal.html:37 -#: bookwyrm/templates/snippets/shelve_button/start_reading_modal.html:31 -#: bookwyrm/templates/snippets/shelve_button/want_to_read_modal.html:20 +#: bookwyrm/templates/snippets/reading_modals/layout.html:13 msgid "Post to feed" msgstr "Posten" @@ -3005,21 +3000,47 @@ msgstr "Raten" msgid "Rate" msgstr "" +#: bookwyrm/templates/snippets/reading_modals/finish_reading_modal.html:6 +#, python-format +msgid "Finish \"%(book_title)s\"" +msgstr "\"%(book_title)s\" abschließen" + +#: bookwyrm/templates/snippets/reading_modals/finish_reading_modal.html:22 +#: bookwyrm/templates/snippets/reading_modals/start_reading_modal.html:20 #: bookwyrm/templates/snippets/readthrough_form.html:7 -#: bookwyrm/templates/snippets/shelve_button/finish_reading_modal.html:19 -#: bookwyrm/templates/snippets/shelve_button/start_reading_modal.html:19 msgid "Started reading" msgstr "Zu lesen angefangen" +#: bookwyrm/templates/snippets/reading_modals/finish_reading_modal.html:30 +#: bookwyrm/templates/snippets/readthrough_form.html:30 +msgid "Finished reading" +msgstr "Lesen abgeschlossen" + +#: bookwyrm/templates/snippets/reading_modals/form.html:8 +msgid "(Optional)" +msgstr "" + +#: bookwyrm/templates/snippets/reading_modals/progress_update_modal.html:5 +#: bookwyrm/templates/snippets/shelve_button/shelve_button_options.html:45 +#, fuzzy +#| msgid "Progress" +msgid "Update progress" +msgstr "Fortschritt" + +#: bookwyrm/templates/snippets/reading_modals/start_reading_modal.html:6 +#, python-format +msgid "Start \"%(book_title)s\"" +msgstr "\"%(book_title)s\" beginnen" + +#: bookwyrm/templates/snippets/reading_modals/want_to_read_modal.html:6 +#, python-format +msgid "Want to Read \"%(book_title)s\"" +msgstr "\"%(book_title)s\" auf Leseliste setzen" + #: bookwyrm/templates/snippets/readthrough_form.html:14 msgid "Progress" msgstr "Fortschritt" -#: bookwyrm/templates/snippets/readthrough_form.html:30 -#: bookwyrm/templates/snippets/shelve_button/finish_reading_modal.html:25 -msgid "Finished reading" -msgstr "Lesen abgeschlossen" - #: bookwyrm/templates/snippets/register_form.html:32 msgid "Sign Up" msgstr "Registrieren" @@ -3040,18 +3061,6 @@ msgstr "Buch importieren" msgid "Move book" msgstr "Deine Bücher" -#: bookwyrm/templates/snippets/shelve_button/finish_reading_modal.html:5 -#, python-format -msgid "Finish \"%(book_title)s\"" -msgstr "\"%(book_title)s\" abschließen" - -#: bookwyrm/templates/snippets/shelve_button/progress_update_modal.html:5 -#: bookwyrm/templates/snippets/shelve_button/shelve_button_options.html:45 -#, fuzzy -#| msgid "Progress" -msgid "Update progress" -msgstr "Fortschritt" - #: bookwyrm/templates/snippets/shelve_button/shelve_button_dropdown.html:5 msgid "More shelves" msgstr "Mehr Regale" @@ -3065,7 +3074,6 @@ msgid "Finish reading" msgstr "Lesen abschließen" #: bookwyrm/templates/snippets/shelve_button/shelve_button_options.html:25 -#: bookwyrm/templates/snippets/shelve_button/want_to_read_modal.html:26 msgid "Want to read" msgstr "Auf Leseliste setzen" @@ -3075,16 +3083,6 @@ msgstr "Auf Leseliste setzen" msgid "Remove from %(name)s" msgstr "Listen: %(username)s" -#: bookwyrm/templates/snippets/shelve_button/start_reading_modal.html:5 -#, python-format -msgid "Start \"%(book_title)s\"" -msgstr "\"%(book_title)s\" beginnen" - -#: bookwyrm/templates/snippets/shelve_button/want_to_read_modal.html:5 -#, python-format -msgid "Want to Read \"%(book_title)s\"" -msgstr "\"%(book_title)s\" auf Leseliste setzen" - #: bookwyrm/templates/snippets/status/content_status.html:72 #: bookwyrm/templates/snippets/trimmed_text.html:17 msgid "Show more" @@ -3123,13 +3121,13 @@ msgstr "Direktnachrichten mit %(username)s" msgid "rated %(book)s:" msgstr "Direktnachrichten mit %(username)s" -#: bookwyrm/templates/snippets/status/headers/read.html:5 +#: bookwyrm/templates/snippets/status/headers/read.html:7 #, fuzzy, python-format #| msgid "Editions of \"%(work_title)s\"" msgid "finished reading %(book)s" msgstr "Editionen von \"%(work_title)s\"" -#: bookwyrm/templates/snippets/status/headers/reading.html:6 +#: bookwyrm/templates/snippets/status/headers/reading.html:7 #, fuzzy, python-format #| msgid "Direct Messages with %(username)s" msgid "started reading %(book)s" @@ -3141,7 +3139,7 @@ msgstr "Direktnachrichten mit %(username)s" msgid "reviewed %(book)s" msgstr "Direktnachrichten mit %(username)s" -#: bookwyrm/templates/snippets/status/headers/to_read.html:6 +#: bookwyrm/templates/snippets/status/headers/to_read.html:7 #, fuzzy, python-format #| msgid "replied to your status" msgid "%(username)s wants to read %(book)s" @@ -3485,6 +3483,11 @@ msgstr "Dieser Benutzename ist bereits vergeben." msgid "A password reset link sent to %s" msgstr "" +#: bookwyrm/views/rss_feed.py:34 +#, python-brace-format +msgid "Status updates from {obj.display_name}" +msgstr "" + #, fuzzy #~| msgid "Federated Servers" #~ msgid "Federated Timeline" diff --git a/locale/en_US/LC_MESSAGES/django.po b/locale/en_US/LC_MESSAGES/django.po index ba475e53..ac2acf35 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-13 02:21+0000\n" +"POT-Creation-Date: 2021-08-16 21:26+0000\n" "PO-Revision-Date: 2021-02-28 17:19-0800\n" "Last-Translator: Mouse Reeve \n" "Language-Team: English \n" @@ -18,59 +18,59 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -#: bookwyrm/forms.py:232 +#: bookwyrm/forms.py:233 msgid "A user with this email already exists." msgstr "" -#: bookwyrm/forms.py:246 +#: bookwyrm/forms.py:247 msgid "One Day" msgstr "" -#: bookwyrm/forms.py:247 +#: bookwyrm/forms.py:248 msgid "One Week" msgstr "" -#: bookwyrm/forms.py:248 +#: bookwyrm/forms.py:249 msgid "One Month" msgstr "" -#: bookwyrm/forms.py:249 +#: bookwyrm/forms.py:250 msgid "Does Not Expire" msgstr "" -#: bookwyrm/forms.py:254 +#: bookwyrm/forms.py:255 #, python-format msgid "%(count)d uses" msgstr "" -#: bookwyrm/forms.py:257 +#: bookwyrm/forms.py:258 msgid "Unlimited" msgstr "" -#: bookwyrm/forms.py:307 +#: bookwyrm/forms.py:308 msgid "List Order" msgstr "" -#: bookwyrm/forms.py:308 +#: bookwyrm/forms.py:309 msgid "Book Title" msgstr "" -#: bookwyrm/forms.py:309 +#: bookwyrm/forms.py:310 #: bookwyrm/templates/snippets/create_status/review.html:25 #: bookwyrm/templates/user/shelf/shelf.html:85 #: bookwyrm/templates/user/shelf/shelf.html:116 msgid "Rating" msgstr "" -#: bookwyrm/forms.py:311 bookwyrm/templates/lists/list.html:107 +#: bookwyrm/forms.py:312 bookwyrm/templates/lists/list.html:107 msgid "Sort By" msgstr "" -#: bookwyrm/forms.py:315 +#: bookwyrm/forms.py:316 msgid "Ascending" msgstr "" -#: bookwyrm/forms.py:316 +#: bookwyrm/forms.py:317 msgid "Descending" msgstr "" @@ -284,9 +284,8 @@ msgstr "" #: bookwyrm/templates/settings/edit_server.html:68 #: bookwyrm/templates/settings/federated_server.html:98 #: bookwyrm/templates/settings/site.html:108 -#: bookwyrm/templates/snippets/shelve_button/finish_reading_modal.html:42 -#: bookwyrm/templates/snippets/shelve_button/progress_update_modal.html:42 -#: bookwyrm/templates/snippets/shelve_button/start_reading_modal.html:36 +#: bookwyrm/templates/snippets/reading_modals/layout.html:16 +#: bookwyrm/templates/snippets/reading_modals/progress_update_modal.html:42 #: bookwyrm/templates/user_admin/user_moderation_actions.html:45 msgid "Save" msgstr "" @@ -300,10 +299,7 @@ msgstr "" #: bookwyrm/templates/settings/federated_server.html:99 #: bookwyrm/templates/snippets/delete_readthrough_modal.html:17 #: bookwyrm/templates/snippets/goal_form.html:32 -#: bookwyrm/templates/snippets/shelve_button/finish_reading_modal.html:43 -#: bookwyrm/templates/snippets/shelve_button/progress_update_modal.html:43 -#: bookwyrm/templates/snippets/shelve_button/start_reading_modal.html:37 -#: bookwyrm/templates/snippets/shelve_button/want_to_read_modal.html:28 +#: bookwyrm/templates/snippets/reading_modals/progress_update_modal.html:43 msgid "Cancel" msgstr "" @@ -2450,24 +2446,24 @@ msgid "Some thoughts on the book" msgstr "" #: bookwyrm/templates/snippets/create_status/comment.html:26 -#: bookwyrm/templates/snippets/shelve_button/progress_update_modal.html:16 +#: bookwyrm/templates/snippets/reading_modals/progress_update_modal.html:16 msgid "Progress:" msgstr "" #: bookwyrm/templates/snippets/create_status/comment.html:34 +#: bookwyrm/templates/snippets/reading_modals/progress_update_modal.html:30 #: bookwyrm/templates/snippets/readthrough_form.html:22 -#: bookwyrm/templates/snippets/shelve_button/progress_update_modal.html:30 msgid "pages" msgstr "" #: bookwyrm/templates/snippets/create_status/comment.html:35 +#: bookwyrm/templates/snippets/reading_modals/progress_update_modal.html:31 #: bookwyrm/templates/snippets/readthrough_form.html:23 -#: bookwyrm/templates/snippets/shelve_button/progress_update_modal.html:31 msgid "percent" msgstr "" #: bookwyrm/templates/snippets/create_status/comment.html:41 -#: bookwyrm/templates/snippets/shelve_button/progress_update_modal.html:36 +#: bookwyrm/templates/snippets/reading_modals/progress_update_modal.html:36 #, python-format msgid "of %(pages)s pages" msgstr "" @@ -2496,6 +2492,7 @@ msgid "Include spoiler alert" msgstr "" #: bookwyrm/templates/snippets/create_status/layout.html:38 +#: bookwyrm/templates/snippets/reading_modals/form.html:7 msgid "Comment:" msgstr "" @@ -2646,9 +2643,7 @@ msgid "Goal privacy:" msgstr "" #: bookwyrm/templates/snippets/goal_form.html:26 -#: bookwyrm/templates/snippets/shelve_button/finish_reading_modal.html:37 -#: bookwyrm/templates/snippets/shelve_button/start_reading_modal.html:31 -#: bookwyrm/templates/snippets/shelve_button/want_to_read_modal.html:20 +#: bookwyrm/templates/snippets/reading_modals/layout.html:13 msgid "Post to feed" msgstr "" @@ -2723,21 +2718,45 @@ msgstr "" msgid "Rate" msgstr "" +#: bookwyrm/templates/snippets/reading_modals/finish_reading_modal.html:6 +#, python-format +msgid "Finish \"%(book_title)s\"" +msgstr "" + +#: bookwyrm/templates/snippets/reading_modals/finish_reading_modal.html:22 +#: bookwyrm/templates/snippets/reading_modals/start_reading_modal.html:20 #: bookwyrm/templates/snippets/readthrough_form.html:7 -#: bookwyrm/templates/snippets/shelve_button/finish_reading_modal.html:19 -#: bookwyrm/templates/snippets/shelve_button/start_reading_modal.html:19 msgid "Started reading" msgstr "" +#: bookwyrm/templates/snippets/reading_modals/finish_reading_modal.html:30 +#: bookwyrm/templates/snippets/readthrough_form.html:30 +msgid "Finished reading" +msgstr "" + +#: bookwyrm/templates/snippets/reading_modals/form.html:8 +msgid "(Optional)" +msgstr "" + +#: bookwyrm/templates/snippets/reading_modals/progress_update_modal.html:5 +#: bookwyrm/templates/snippets/shelve_button/shelve_button_options.html:45 +msgid "Update progress" +msgstr "" + +#: bookwyrm/templates/snippets/reading_modals/start_reading_modal.html:6 +#, python-format +msgid "Start \"%(book_title)s\"" +msgstr "" + +#: bookwyrm/templates/snippets/reading_modals/want_to_read_modal.html:6 +#, python-format +msgid "Want to Read \"%(book_title)s\"" +msgstr "" + #: bookwyrm/templates/snippets/readthrough_form.html:14 msgid "Progress" msgstr "" -#: bookwyrm/templates/snippets/readthrough_form.html:30 -#: bookwyrm/templates/snippets/shelve_button/finish_reading_modal.html:25 -msgid "Finished reading" -msgstr "" - #: bookwyrm/templates/snippets/register_form.html:32 msgid "Sign Up" msgstr "" @@ -2754,16 +2773,6 @@ msgstr "" msgid "Move book" msgstr "" -#: bookwyrm/templates/snippets/shelve_button/finish_reading_modal.html:5 -#, python-format -msgid "Finish \"%(book_title)s\"" -msgstr "" - -#: bookwyrm/templates/snippets/shelve_button/progress_update_modal.html:5 -#: bookwyrm/templates/snippets/shelve_button/shelve_button_options.html:45 -msgid "Update progress" -msgstr "" - #: bookwyrm/templates/snippets/shelve_button/shelve_button_dropdown.html:5 msgid "More shelves" msgstr "" @@ -2777,7 +2786,6 @@ msgid "Finish reading" msgstr "" #: bookwyrm/templates/snippets/shelve_button/shelve_button_options.html:25 -#: bookwyrm/templates/snippets/shelve_button/want_to_read_modal.html:26 msgid "Want to read" msgstr "" @@ -2786,16 +2794,6 @@ msgstr "" msgid "Remove from %(name)s" msgstr "" -#: bookwyrm/templates/snippets/shelve_button/start_reading_modal.html:5 -#, python-format -msgid "Start \"%(book_title)s\"" -msgstr "" - -#: bookwyrm/templates/snippets/shelve_button/want_to_read_modal.html:5 -#, python-format -msgid "Want to Read \"%(book_title)s\"" -msgstr "" - #: bookwyrm/templates/snippets/status/content_status.html:72 #: bookwyrm/templates/snippets/trimmed_text.html:17 msgid "Show more" @@ -2830,12 +2828,12 @@ msgstr "" msgid "rated %(book)s:" msgstr "" -#: bookwyrm/templates/snippets/status/headers/read.html:5 +#: bookwyrm/templates/snippets/status/headers/read.html:7 #, python-format msgid "finished reading %(book)s" msgstr "" -#: bookwyrm/templates/snippets/status/headers/reading.html:6 +#: bookwyrm/templates/snippets/status/headers/reading.html:7 #, python-format msgid "started reading %(book)s" msgstr "" @@ -2845,7 +2843,7 @@ msgstr "" msgid "reviewed %(book)s" msgstr "" -#: bookwyrm/templates/snippets/status/headers/to_read.html:6 +#: bookwyrm/templates/snippets/status/headers/to_read.html:7 #, python-format msgid "%(username)s wants to read %(book)s" msgstr "" @@ -3153,3 +3151,8 @@ msgstr "" #, python-format msgid "A password reset link sent to %s" msgstr "" + +#: bookwyrm/views/rss_feed.py:34 +#, python-brace-format +msgid "Status updates from {obj.display_name}" +msgstr "" diff --git a/locale/es/LC_MESSAGES/django.po b/locale/es/LC_MESSAGES/django.po index d073a36c..04497a2a 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-13 02:21+0000\n" +"POT-Creation-Date: 2021-08-16 21:26+0000\n" "PO-Revision-Date: 2021-03-19 11:49+0800\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -18,59 +18,59 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -#: bookwyrm/forms.py:232 +#: bookwyrm/forms.py:233 msgid "A user with this email already exists." msgstr "Ya existe un usuario con ese correo electrónico." -#: bookwyrm/forms.py:246 +#: bookwyrm/forms.py:247 msgid "One Day" msgstr "Un día" -#: bookwyrm/forms.py:247 +#: bookwyrm/forms.py:248 msgid "One Week" msgstr "Una semana" -#: bookwyrm/forms.py:248 +#: bookwyrm/forms.py:249 msgid "One Month" msgstr "Un mes" -#: bookwyrm/forms.py:249 +#: bookwyrm/forms.py:250 msgid "Does Not Expire" msgstr "Nunca se vence" -#: bookwyrm/forms.py:254 +#: bookwyrm/forms.py:255 #, python-format msgid "%(count)d uses" msgstr "%(count)d usos" -#: bookwyrm/forms.py:257 +#: bookwyrm/forms.py:258 msgid "Unlimited" msgstr "Sin límite" -#: bookwyrm/forms.py:307 +#: bookwyrm/forms.py:308 msgid "List Order" msgstr "Orden de la lista" -#: bookwyrm/forms.py:308 +#: bookwyrm/forms.py:309 msgid "Book Title" msgstr "Título" -#: bookwyrm/forms.py:309 +#: bookwyrm/forms.py:310 #: bookwyrm/templates/snippets/create_status/review.html:25 #: bookwyrm/templates/user/shelf/shelf.html:85 #: bookwyrm/templates/user/shelf/shelf.html:116 msgid "Rating" msgstr "Calificación" -#: bookwyrm/forms.py:311 bookwyrm/templates/lists/list.html:107 +#: bookwyrm/forms.py:312 bookwyrm/templates/lists/list.html:107 msgid "Sort By" msgstr "Ordenar por" -#: bookwyrm/forms.py:315 +#: bookwyrm/forms.py:316 msgid "Ascending" msgstr "Ascendente" -#: bookwyrm/forms.py:316 +#: bookwyrm/forms.py:317 msgid "Descending" msgstr "Descendente" @@ -284,9 +284,8 @@ msgstr "Clave Goodreads:" #: bookwyrm/templates/settings/edit_server.html:68 #: bookwyrm/templates/settings/federated_server.html:98 #: bookwyrm/templates/settings/site.html:108 -#: bookwyrm/templates/snippets/shelve_button/finish_reading_modal.html:42 -#: bookwyrm/templates/snippets/shelve_button/progress_update_modal.html:42 -#: bookwyrm/templates/snippets/shelve_button/start_reading_modal.html:36 +#: bookwyrm/templates/snippets/reading_modals/layout.html:16 +#: bookwyrm/templates/snippets/reading_modals/progress_update_modal.html:42 #: bookwyrm/templates/user_admin/user_moderation_actions.html:45 msgid "Save" msgstr "Guardar" @@ -300,10 +299,7 @@ msgstr "Guardar" #: bookwyrm/templates/settings/federated_server.html:99 #: bookwyrm/templates/snippets/delete_readthrough_modal.html:17 #: bookwyrm/templates/snippets/goal_form.html:32 -#: bookwyrm/templates/snippets/shelve_button/finish_reading_modal.html:43 -#: bookwyrm/templates/snippets/shelve_button/progress_update_modal.html:43 -#: bookwyrm/templates/snippets/shelve_button/start_reading_modal.html:37 -#: bookwyrm/templates/snippets/shelve_button/want_to_read_modal.html:28 +#: bookwyrm/templates/snippets/reading_modals/progress_update_modal.html:43 msgid "Cancel" msgstr "Cancelar" @@ -2451,24 +2447,24 @@ msgid "Some thoughts on the book" msgstr "Algunos pensamientos sobre el libro" #: bookwyrm/templates/snippets/create_status/comment.html:26 -#: bookwyrm/templates/snippets/shelve_button/progress_update_modal.html:16 +#: bookwyrm/templates/snippets/reading_modals/progress_update_modal.html:16 msgid "Progress:" msgstr "Progreso:" #: bookwyrm/templates/snippets/create_status/comment.html:34 +#: bookwyrm/templates/snippets/reading_modals/progress_update_modal.html:30 #: bookwyrm/templates/snippets/readthrough_form.html:22 -#: bookwyrm/templates/snippets/shelve_button/progress_update_modal.html:30 msgid "pages" msgstr "páginas" #: bookwyrm/templates/snippets/create_status/comment.html:35 +#: bookwyrm/templates/snippets/reading_modals/progress_update_modal.html:31 #: bookwyrm/templates/snippets/readthrough_form.html:23 -#: bookwyrm/templates/snippets/shelve_button/progress_update_modal.html:31 msgid "percent" msgstr "por ciento" #: bookwyrm/templates/snippets/create_status/comment.html:41 -#: bookwyrm/templates/snippets/shelve_button/progress_update_modal.html:36 +#: bookwyrm/templates/snippets/reading_modals/progress_update_modal.html:36 #, python-format msgid "of %(pages)s pages" msgstr "de %(pages)s páginas" @@ -2497,6 +2493,7 @@ msgid "Include spoiler alert" msgstr "Incluir alerta de spoiler" #: bookwyrm/templates/snippets/create_status/layout.html:38 +#: bookwyrm/templates/snippets/reading_modals/form.html:7 msgid "Comment:" msgstr "Comentario:" @@ -2647,9 +2644,7 @@ msgid "Goal privacy:" msgstr "Privacidad de meta:" #: bookwyrm/templates/snippets/goal_form.html:26 -#: bookwyrm/templates/snippets/shelve_button/finish_reading_modal.html:37 -#: bookwyrm/templates/snippets/shelve_button/start_reading_modal.html:31 -#: bookwyrm/templates/snippets/shelve_button/want_to_read_modal.html:20 +#: bookwyrm/templates/snippets/reading_modals/layout.html:13 msgid "Post to feed" msgstr "Compartir con tu feed" @@ -2725,21 +2720,45 @@ msgstr "Da una calificación" msgid "Rate" msgstr "Calificar" +#: bookwyrm/templates/snippets/reading_modals/finish_reading_modal.html:6 +#, python-format +msgid "Finish \"%(book_title)s\"" +msgstr "Terminar \"%(book_title)s\"" + +#: bookwyrm/templates/snippets/reading_modals/finish_reading_modal.html:22 +#: bookwyrm/templates/snippets/reading_modals/start_reading_modal.html:20 #: bookwyrm/templates/snippets/readthrough_form.html:7 -#: bookwyrm/templates/snippets/shelve_button/finish_reading_modal.html:19 -#: bookwyrm/templates/snippets/shelve_button/start_reading_modal.html:19 msgid "Started reading" msgstr "Lectura se empezó" +#: bookwyrm/templates/snippets/reading_modals/finish_reading_modal.html:30 +#: bookwyrm/templates/snippets/readthrough_form.html:30 +msgid "Finished reading" +msgstr "Lectura se terminó" + +#: bookwyrm/templates/snippets/reading_modals/form.html:8 +msgid "(Optional)" +msgstr "" + +#: bookwyrm/templates/snippets/reading_modals/progress_update_modal.html:5 +#: bookwyrm/templates/snippets/shelve_button/shelve_button_options.html:45 +msgid "Update progress" +msgstr "Progreso de actualización" + +#: bookwyrm/templates/snippets/reading_modals/start_reading_modal.html:6 +#, python-format +msgid "Start \"%(book_title)s\"" +msgstr "Empezar \"%(book_title)s\"" + +#: bookwyrm/templates/snippets/reading_modals/want_to_read_modal.html:6 +#, python-format +msgid "Want to Read \"%(book_title)s\"" +msgstr "Quiero leer \"%(book_title)s\"" + #: bookwyrm/templates/snippets/readthrough_form.html:14 msgid "Progress" msgstr "Progreso" -#: bookwyrm/templates/snippets/readthrough_form.html:30 -#: bookwyrm/templates/snippets/shelve_button/finish_reading_modal.html:25 -msgid "Finished reading" -msgstr "Lectura se terminó" - #: bookwyrm/templates/snippets/register_form.html:32 msgid "Sign Up" msgstr "Inscribirse" @@ -2756,16 +2775,6 @@ msgstr "Importar libro" msgid "Move book" msgstr "Mover libro" -#: bookwyrm/templates/snippets/shelve_button/finish_reading_modal.html:5 -#, python-format -msgid "Finish \"%(book_title)s\"" -msgstr "Terminar \"%(book_title)s\"" - -#: bookwyrm/templates/snippets/shelve_button/progress_update_modal.html:5 -#: bookwyrm/templates/snippets/shelve_button/shelve_button_options.html:45 -msgid "Update progress" -msgstr "Progreso de actualización" - #: bookwyrm/templates/snippets/shelve_button/shelve_button_dropdown.html:5 msgid "More shelves" msgstr "Más estantes" @@ -2779,7 +2788,6 @@ msgid "Finish reading" msgstr "Terminar de leer" #: bookwyrm/templates/snippets/shelve_button/shelve_button_options.html:25 -#: bookwyrm/templates/snippets/shelve_button/want_to_read_modal.html:26 msgid "Want to read" msgstr "Quiero leer" @@ -2788,16 +2796,6 @@ msgstr "Quiero leer" msgid "Remove from %(name)s" msgstr "Quitar de %(name)s" -#: bookwyrm/templates/snippets/shelve_button/start_reading_modal.html:5 -#, python-format -msgid "Start \"%(book_title)s\"" -msgstr "Empezar \"%(book_title)s\"" - -#: bookwyrm/templates/snippets/shelve_button/want_to_read_modal.html:5 -#, python-format -msgid "Want to Read \"%(book_title)s\"" -msgstr "Quiero leer \"%(book_title)s\"" - #: bookwyrm/templates/snippets/status/content_status.html:72 #: bookwyrm/templates/snippets/trimmed_text.html:17 msgid "Show more" @@ -2832,12 +2830,12 @@ msgstr "citó a %(book)s" msgid "rated %(book)s:" msgstr "calificó %(book)s:" -#: bookwyrm/templates/snippets/status/headers/read.html:5 +#: bookwyrm/templates/snippets/status/headers/read.html:7 #, python-format msgid "finished reading %(book)s" msgstr "terminó de leer %(book)s" -#: bookwyrm/templates/snippets/status/headers/reading.html:6 +#: bookwyrm/templates/snippets/status/headers/reading.html:7 #, python-format msgid "started reading %(book)s" msgstr "empezó a leer %(book)s" @@ -2847,7 +2845,7 @@ msgstr "empezó a leer %(book)s" msgid "reviewed %(book)s" msgstr "reseñó a %(book)s" -#: bookwyrm/templates/snippets/status/headers/to_read.html:6 +#: bookwyrm/templates/snippets/status/headers/to_read.html:7 #, python-format msgid "%(username)s wants to read %(book)s" msgstr "%(username)s quiere leer %(book)s" @@ -3156,6 +3154,11 @@ 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" +#: bookwyrm/views/rss_feed.py:34 +#, python-brace-format +msgid "Status updates from {obj.display_name}" +msgstr "" + #~ msgid "Local Timeline" #~ msgstr "Línea temporal local" diff --git a/locale/fr_FR/LC_MESSAGES/django.po b/locale/fr_FR/LC_MESSAGES/django.po index 1ab9157b..46416931 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-13 02:21+0000\n" +"POT-Creation-Date: 2021-08-16 21:26+0000\n" "PO-Revision-Date: 2021-04-05 12:44+0100\n" "Last-Translator: Fabien Basmaison \n" "Language-Team: Mouse Reeve \n" @@ -18,59 +18,59 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -#: bookwyrm/forms.py:232 +#: bookwyrm/forms.py:233 msgid "A user with this email already exists." msgstr "Cet email est déjà associé à un compte." -#: bookwyrm/forms.py:246 +#: bookwyrm/forms.py:247 msgid "One Day" msgstr "Un jour" -#: bookwyrm/forms.py:247 +#: bookwyrm/forms.py:248 msgid "One Week" msgstr "Une semaine" -#: bookwyrm/forms.py:248 +#: bookwyrm/forms.py:249 msgid "One Month" msgstr "Un mois" -#: bookwyrm/forms.py:249 +#: bookwyrm/forms.py:250 msgid "Does Not Expire" msgstr "Sans expiration" -#: bookwyrm/forms.py:254 +#: bookwyrm/forms.py:255 #, python-format msgid "%(count)d uses" msgstr "%(count)d utilisations" -#: bookwyrm/forms.py:257 +#: bookwyrm/forms.py:258 msgid "Unlimited" msgstr "Sans limite" -#: bookwyrm/forms.py:307 +#: bookwyrm/forms.py:308 msgid "List Order" msgstr "Ordre de la liste" -#: bookwyrm/forms.py:308 +#: bookwyrm/forms.py:309 msgid "Book Title" msgstr "Titre du livre" -#: bookwyrm/forms.py:309 +#: bookwyrm/forms.py:310 #: bookwyrm/templates/snippets/create_status/review.html:25 #: bookwyrm/templates/user/shelf/shelf.html:85 #: bookwyrm/templates/user/shelf/shelf.html:116 msgid "Rating" msgstr "Note" -#: bookwyrm/forms.py:311 bookwyrm/templates/lists/list.html:107 +#: bookwyrm/forms.py:312 bookwyrm/templates/lists/list.html:107 msgid "Sort By" msgstr "Trier par" -#: bookwyrm/forms.py:315 +#: bookwyrm/forms.py:316 msgid "Ascending" msgstr "Ordre croissant" -#: bookwyrm/forms.py:316 +#: bookwyrm/forms.py:317 msgid "Descending" msgstr "Ordre décroissant" @@ -288,9 +288,8 @@ msgstr "Clé Goodreads :" #: bookwyrm/templates/settings/edit_server.html:68 #: bookwyrm/templates/settings/federated_server.html:98 #: bookwyrm/templates/settings/site.html:108 -#: bookwyrm/templates/snippets/shelve_button/finish_reading_modal.html:42 -#: bookwyrm/templates/snippets/shelve_button/progress_update_modal.html:42 -#: bookwyrm/templates/snippets/shelve_button/start_reading_modal.html:36 +#: bookwyrm/templates/snippets/reading_modals/layout.html:16 +#: bookwyrm/templates/snippets/reading_modals/progress_update_modal.html:42 #: bookwyrm/templates/user_admin/user_moderation_actions.html:45 msgid "Save" msgstr "Enregistrer" @@ -304,10 +303,7 @@ msgstr "Enregistrer" #: bookwyrm/templates/settings/federated_server.html:99 #: bookwyrm/templates/snippets/delete_readthrough_modal.html:17 #: bookwyrm/templates/snippets/goal_form.html:32 -#: bookwyrm/templates/snippets/shelve_button/finish_reading_modal.html:43 -#: bookwyrm/templates/snippets/shelve_button/progress_update_modal.html:43 -#: bookwyrm/templates/snippets/shelve_button/start_reading_modal.html:37 -#: bookwyrm/templates/snippets/shelve_button/want_to_read_modal.html:28 +#: bookwyrm/templates/snippets/reading_modals/progress_update_modal.html:43 msgid "Cancel" msgstr "Annuler" @@ -2473,24 +2469,24 @@ msgid "Some thoughts on the book" msgstr "" #: bookwyrm/templates/snippets/create_status/comment.html:26 -#: bookwyrm/templates/snippets/shelve_button/progress_update_modal.html:16 +#: bookwyrm/templates/snippets/reading_modals/progress_update_modal.html:16 msgid "Progress:" msgstr "Progression :" #: bookwyrm/templates/snippets/create_status/comment.html:34 +#: bookwyrm/templates/snippets/reading_modals/progress_update_modal.html:30 #: bookwyrm/templates/snippets/readthrough_form.html:22 -#: bookwyrm/templates/snippets/shelve_button/progress_update_modal.html:30 msgid "pages" msgstr "pages" #: bookwyrm/templates/snippets/create_status/comment.html:35 +#: bookwyrm/templates/snippets/reading_modals/progress_update_modal.html:31 #: bookwyrm/templates/snippets/readthrough_form.html:23 -#: bookwyrm/templates/snippets/shelve_button/progress_update_modal.html:31 msgid "percent" msgstr "pourcent" #: bookwyrm/templates/snippets/create_status/comment.html:41 -#: bookwyrm/templates/snippets/shelve_button/progress_update_modal.html:36 +#: bookwyrm/templates/snippets/reading_modals/progress_update_modal.html:36 #, python-format msgid "of %(pages)s pages" msgstr "sur %(pages)s pages" @@ -2519,6 +2515,7 @@ msgid "Include spoiler alert" msgstr "Afficher une alerte spoiler" #: bookwyrm/templates/snippets/create_status/layout.html:38 +#: bookwyrm/templates/snippets/reading_modals/form.html:7 msgid "Comment:" msgstr "Commentaire :" @@ -2675,9 +2672,7 @@ msgid "Goal privacy:" msgstr "Confidentialité du défi :" #: bookwyrm/templates/snippets/goal_form.html:26 -#: bookwyrm/templates/snippets/shelve_button/finish_reading_modal.html:37 -#: bookwyrm/templates/snippets/shelve_button/start_reading_modal.html:31 -#: bookwyrm/templates/snippets/shelve_button/want_to_read_modal.html:20 +#: bookwyrm/templates/snippets/reading_modals/layout.html:13 msgid "Post to feed" msgstr "Publier sur le fil d’actualité" @@ -2752,21 +2747,45 @@ msgstr "Laisser une note" msgid "Rate" msgstr "Noter" +#: bookwyrm/templates/snippets/reading_modals/finish_reading_modal.html:6 +#, python-format +msgid "Finish \"%(book_title)s\"" +msgstr "Terminer « %(book_title)s »" + +#: bookwyrm/templates/snippets/reading_modals/finish_reading_modal.html:22 +#: bookwyrm/templates/snippets/reading_modals/start_reading_modal.html:20 #: bookwyrm/templates/snippets/readthrough_form.html:7 -#: bookwyrm/templates/snippets/shelve_button/finish_reading_modal.html:19 -#: bookwyrm/templates/snippets/shelve_button/start_reading_modal.html:19 msgid "Started reading" msgstr "Lecture commencée le" +#: bookwyrm/templates/snippets/reading_modals/finish_reading_modal.html:30 +#: bookwyrm/templates/snippets/readthrough_form.html:30 +msgid "Finished reading" +msgstr "Lecture terminée le" + +#: bookwyrm/templates/snippets/reading_modals/form.html:8 +msgid "(Optional)" +msgstr "" + +#: bookwyrm/templates/snippets/reading_modals/progress_update_modal.html:5 +#: bookwyrm/templates/snippets/shelve_button/shelve_button_options.html:45 +msgid "Update progress" +msgstr "Progression de la mise à jour" + +#: bookwyrm/templates/snippets/reading_modals/start_reading_modal.html:6 +#, python-format +msgid "Start \"%(book_title)s\"" +msgstr "Commencer « %(book_title)s »" + +#: bookwyrm/templates/snippets/reading_modals/want_to_read_modal.html:6 +#, python-format +msgid "Want to Read \"%(book_title)s\"" +msgstr "Ajouter « %(book_title)s » aux envies de lecture" + #: bookwyrm/templates/snippets/readthrough_form.html:14 msgid "Progress" msgstr "Progression" -#: bookwyrm/templates/snippets/readthrough_form.html:30 -#: bookwyrm/templates/snippets/shelve_button/finish_reading_modal.html:25 -msgid "Finished reading" -msgstr "Lecture terminée le" - #: bookwyrm/templates/snippets/register_form.html:32 msgid "Sign Up" msgstr "S’enregistrer" @@ -2783,16 +2802,6 @@ msgstr "Importer le livre" msgid "Move book" msgstr "Déplacer le livre" -#: bookwyrm/templates/snippets/shelve_button/finish_reading_modal.html:5 -#, python-format -msgid "Finish \"%(book_title)s\"" -msgstr "Terminer « %(book_title)s »" - -#: bookwyrm/templates/snippets/shelve_button/progress_update_modal.html:5 -#: bookwyrm/templates/snippets/shelve_button/shelve_button_options.html:45 -msgid "Update progress" -msgstr "Progression de la mise à jour" - #: bookwyrm/templates/snippets/shelve_button/shelve_button_dropdown.html:5 msgid "More shelves" msgstr "Plus d’étagères" @@ -2806,7 +2815,6 @@ msgid "Finish reading" msgstr "Terminer la lecture" #: bookwyrm/templates/snippets/shelve_button/shelve_button_options.html:25 -#: bookwyrm/templates/snippets/shelve_button/want_to_read_modal.html:26 msgid "Want to read" msgstr "Je veux le lire" @@ -2815,16 +2823,6 @@ msgstr "Je veux le lire" msgid "Remove from %(name)s" msgstr "Retirer de %(name)s" -#: bookwyrm/templates/snippets/shelve_button/start_reading_modal.html:5 -#, python-format -msgid "Start \"%(book_title)s\"" -msgstr "Commencer « %(book_title)s »" - -#: bookwyrm/templates/snippets/shelve_button/want_to_read_modal.html:5 -#, python-format -msgid "Want to Read \"%(book_title)s\"" -msgstr "Ajouter « %(book_title)s » aux envies de lecture" - #: bookwyrm/templates/snippets/status/content_status.html:72 #: bookwyrm/templates/snippets/trimmed_text.html:17 msgid "Show more" @@ -2862,13 +2860,13 @@ msgstr "Signalé par %(username)s" msgid "rated %(book)s:" msgstr "Créée par %(username)s" -#: bookwyrm/templates/snippets/status/headers/read.html:5 +#: bookwyrm/templates/snippets/status/headers/read.html:7 #, fuzzy, python-format #| msgid "Editions of \"%(work_title)s\"" msgid "finished reading %(book)s" msgstr "Éditions de « %(work_title)s »" -#: bookwyrm/templates/snippets/status/headers/reading.html:6 +#: bookwyrm/templates/snippets/status/headers/reading.html:7 #, fuzzy, python-format #| msgid "Created by %(username)s" msgid "started reading %(book)s" @@ -2880,7 +2878,7 @@ msgstr "Créée par %(username)s" msgid "reviewed %(book)s" msgstr "Créée par %(username)s" -#: bookwyrm/templates/snippets/status/headers/to_read.html:6 +#: bookwyrm/templates/snippets/status/headers/to_read.html:7 #, fuzzy, python-format #| msgid "replied to %(username)s's quote" msgid "%(username)s wants to read %(book)s" @@ -3195,6 +3193,11 @@ 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." +#: bookwyrm/views/rss_feed.py:34 +#, python-brace-format +msgid "Status updates from {obj.display_name}" +msgstr "" + #~ msgid "Local Timeline" #~ msgstr "Fil d’actualité local" diff --git a/locale/zh_Hans/LC_MESSAGES/django.mo b/locale/zh_Hans/LC_MESSAGES/django.mo index dbe69686..67393992 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 54712649..75def373 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-13 02:21+0000\n" +"POT-Creation-Date: 2021-08-16 21:26+0000\n" "PO-Revision-Date: 2021-03-20 00:56+0000\n" "Last-Translator: Kana \n" "Language-Team: Mouse Reeve \n" @@ -18,59 +18,59 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" -#: bookwyrm/forms.py:232 +#: bookwyrm/forms.py:233 msgid "A user with this email already exists." msgstr "已经存在使用该邮箱的用户。" -#: bookwyrm/forms.py:246 +#: bookwyrm/forms.py:247 msgid "One Day" msgstr "一天" -#: bookwyrm/forms.py:247 +#: bookwyrm/forms.py:248 msgid "One Week" msgstr "一周" -#: bookwyrm/forms.py:248 +#: bookwyrm/forms.py:249 msgid "One Month" msgstr "一个月" -#: bookwyrm/forms.py:249 +#: bookwyrm/forms.py:250 msgid "Does Not Expire" msgstr "永不失效" -#: bookwyrm/forms.py:254 +#: bookwyrm/forms.py:255 #, python-format msgid "%(count)d uses" msgstr "%(count)d 次使用" -#: bookwyrm/forms.py:257 +#: bookwyrm/forms.py:258 msgid "Unlimited" msgstr "不受限" -#: bookwyrm/forms.py:307 +#: bookwyrm/forms.py:308 msgid "List Order" msgstr "列表顺序" -#: bookwyrm/forms.py:308 +#: bookwyrm/forms.py:309 msgid "Book Title" msgstr "书名" -#: bookwyrm/forms.py:309 +#: bookwyrm/forms.py:310 #: bookwyrm/templates/snippets/create_status/review.html:25 #: bookwyrm/templates/user/shelf/shelf.html:85 #: bookwyrm/templates/user/shelf/shelf.html:116 msgid "Rating" msgstr "评价" -#: bookwyrm/forms.py:311 bookwyrm/templates/lists/list.html:107 +#: bookwyrm/forms.py:312 bookwyrm/templates/lists/list.html:107 msgid "Sort By" msgstr "排序方式" -#: bookwyrm/forms.py:315 +#: bookwyrm/forms.py:316 msgid "Ascending" msgstr "升序" -#: bookwyrm/forms.py:316 +#: bookwyrm/forms.py:317 msgid "Descending" msgstr "降序" @@ -284,9 +284,8 @@ msgstr "Goodreads key:" #: bookwyrm/templates/settings/edit_server.html:68 #: bookwyrm/templates/settings/federated_server.html:98 #: bookwyrm/templates/settings/site.html:108 -#: bookwyrm/templates/snippets/shelve_button/finish_reading_modal.html:42 -#: bookwyrm/templates/snippets/shelve_button/progress_update_modal.html:42 -#: bookwyrm/templates/snippets/shelve_button/start_reading_modal.html:36 +#: bookwyrm/templates/snippets/reading_modals/layout.html:16 +#: bookwyrm/templates/snippets/reading_modals/progress_update_modal.html:42 #: bookwyrm/templates/user_admin/user_moderation_actions.html:45 msgid "Save" msgstr "保存" @@ -300,10 +299,7 @@ msgstr "保存" #: bookwyrm/templates/settings/federated_server.html:99 #: bookwyrm/templates/snippets/delete_readthrough_modal.html:17 #: bookwyrm/templates/snippets/goal_form.html:32 -#: bookwyrm/templates/snippets/shelve_button/finish_reading_modal.html:43 -#: bookwyrm/templates/snippets/shelve_button/progress_update_modal.html:43 -#: bookwyrm/templates/snippets/shelve_button/start_reading_modal.html:37 -#: bookwyrm/templates/snippets/shelve_button/want_to_read_modal.html:28 +#: bookwyrm/templates/snippets/reading_modals/progress_update_modal.html:43 msgid "Cancel" msgstr "取消" @@ -1791,8 +1787,9 @@ msgid "boosted your status" msgstr "转发了你的 状态" #: bookwyrm/templates/notifications.html:121 -#, python-format -msgid " added %(book_title)s to your list “%(list_name)s”" +#, fuzzy, python-format +#| msgid " added %(book_title)s to your list “%(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 @@ -2446,24 +2443,24 @@ msgid "Some thoughts on the book" msgstr "对书的一些看法" #: bookwyrm/templates/snippets/create_status/comment.html:26 -#: bookwyrm/templates/snippets/shelve_button/progress_update_modal.html:16 +#: bookwyrm/templates/snippets/reading_modals/progress_update_modal.html:16 msgid "Progress:" msgstr "进度:" #: bookwyrm/templates/snippets/create_status/comment.html:34 +#: bookwyrm/templates/snippets/reading_modals/progress_update_modal.html:30 #: bookwyrm/templates/snippets/readthrough_form.html:22 -#: bookwyrm/templates/snippets/shelve_button/progress_update_modal.html:30 msgid "pages" msgstr "页数" #: bookwyrm/templates/snippets/create_status/comment.html:35 +#: bookwyrm/templates/snippets/reading_modals/progress_update_modal.html:31 #: bookwyrm/templates/snippets/readthrough_form.html:23 -#: bookwyrm/templates/snippets/shelve_button/progress_update_modal.html:31 msgid "percent" msgstr "百分比" #: bookwyrm/templates/snippets/create_status/comment.html:41 -#: bookwyrm/templates/snippets/shelve_button/progress_update_modal.html:36 +#: bookwyrm/templates/snippets/reading_modals/progress_update_modal.html:36 #, python-format msgid "of %(pages)s pages" msgstr "全书 %(pages)s 页" @@ -2492,6 +2489,7 @@ msgid "Include spoiler alert" msgstr "加入剧透警告" #: bookwyrm/templates/snippets/create_status/layout.html:38 +#: bookwyrm/templates/snippets/reading_modals/form.html:7 msgid "Comment:" msgstr "评论:" @@ -2638,9 +2636,7 @@ msgid "Goal privacy:" msgstr "目标隐私:" #: bookwyrm/templates/snippets/goal_form.html:26 -#: bookwyrm/templates/snippets/shelve_button/finish_reading_modal.html:37 -#: bookwyrm/templates/snippets/shelve_button/start_reading_modal.html:31 -#: bookwyrm/templates/snippets/shelve_button/want_to_read_modal.html:20 +#: bookwyrm/templates/snippets/reading_modals/layout.html:13 msgid "Post to feed" msgstr "发布到消息流中" @@ -2715,21 +2711,45 @@ msgstr "留下评价" msgid "Rate" msgstr "评价" +#: bookwyrm/templates/snippets/reading_modals/finish_reading_modal.html:6 +#, python-format +msgid "Finish \"%(book_title)s\"" +msgstr "完成《%(book_title)s》" + +#: bookwyrm/templates/snippets/reading_modals/finish_reading_modal.html:22 +#: bookwyrm/templates/snippets/reading_modals/start_reading_modal.html:20 #: bookwyrm/templates/snippets/readthrough_form.html:7 -#: bookwyrm/templates/snippets/shelve_button/finish_reading_modal.html:19 -#: bookwyrm/templates/snippets/shelve_button/start_reading_modal.html:19 msgid "Started reading" msgstr "已开始阅读" +#: bookwyrm/templates/snippets/reading_modals/finish_reading_modal.html:30 +#: bookwyrm/templates/snippets/readthrough_form.html:30 +msgid "Finished reading" +msgstr "已完成阅读" + +#: bookwyrm/templates/snippets/reading_modals/form.html:8 +msgid "(Optional)" +msgstr "" + +#: bookwyrm/templates/snippets/reading_modals/progress_update_modal.html:5 +#: bookwyrm/templates/snippets/shelve_button/shelve_button_options.html:45 +msgid "Update progress" +msgstr "更新进度" + +#: bookwyrm/templates/snippets/reading_modals/start_reading_modal.html:6 +#, python-format +msgid "Start \"%(book_title)s\"" +msgstr "开始《%(book_title)s》" + +#: bookwyrm/templates/snippets/reading_modals/want_to_read_modal.html:6 +#, python-format +msgid "Want to Read \"%(book_title)s\"" +msgstr "想要阅读《%(book_title)s》" + #: bookwyrm/templates/snippets/readthrough_form.html:14 msgid "Progress" msgstr "进度" -#: bookwyrm/templates/snippets/readthrough_form.html:30 -#: bookwyrm/templates/snippets/shelve_button/finish_reading_modal.html:25 -msgid "Finished reading" -msgstr "已完成阅读" - #: bookwyrm/templates/snippets/register_form.html:32 msgid "Sign Up" msgstr "注册" @@ -2746,16 +2766,6 @@ msgstr "导入书目" msgid "Move book" msgstr "移动书目" -#: bookwyrm/templates/snippets/shelve_button/finish_reading_modal.html:5 -#, python-format -msgid "Finish \"%(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 -msgid "Update progress" -msgstr "更新进度" - #: bookwyrm/templates/snippets/shelve_button/shelve_button_dropdown.html:5 msgid "More shelves" msgstr "更多书架" @@ -2769,7 +2779,6 @@ msgid "Finish reading" msgstr "完成阅读" #: bookwyrm/templates/snippets/shelve_button/shelve_button_options.html:25 -#: bookwyrm/templates/snippets/shelve_button/want_to_read_modal.html:26 msgid "Want to read" msgstr "想要阅读" @@ -2778,16 +2787,6 @@ msgstr "想要阅读" msgid "Remove from %(name)s" msgstr "从 %(name)s 移除" -#: bookwyrm/templates/snippets/shelve_button/start_reading_modal.html:5 -#, python-format -msgid "Start \"%(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》" - #: bookwyrm/templates/snippets/status/content_status.html:72 #: bookwyrm/templates/snippets/trimmed_text.html:17 msgid "Show more" @@ -2814,7 +2813,6 @@ msgstr "回复了 %(username)s%(username)s" msgid "quoted %(book)s" msgstr "引用了 %(book)s" @@ -2823,12 +2821,12 @@ msgstr "引用了 %(book)s" msgid "rated %(book)s:" msgstr "为 %(book)s 打了分:" -#: bookwyrm/templates/snippets/status/headers/read.html:5 +#: bookwyrm/templates/snippets/status/headers/read.html:7 #, python-format msgid "finished reading %(book)s" msgstr "完成阅读 %(book)s" -#: bookwyrm/templates/snippets/status/headers/reading.html:6 +#: bookwyrm/templates/snippets/status/headers/reading.html:7 #, python-format msgid "started reading %(book)s" msgstr "开始阅读 %(book)s" @@ -2838,7 +2836,7 @@ msgstr "开始阅读 %(book)s" msgid "reviewed %(book)s" msgstr "为 %(book)s 撰写了书评" -#: bookwyrm/templates/snippets/status/headers/to_read.html:6 +#: bookwyrm/templates/snippets/status/headers/to_read.html:7 #, python-format msgid "%(username)s wants to read %(book)s" msgstr "%(username)s 想要阅读 %(book)s" @@ -3143,6 +3141,11 @@ msgstr "没有找到使用该邮箱的用户。" msgid "A password reset link sent to %s" msgstr "密码重置连接已发送给 %s" +#: bookwyrm/views/rss_feed.py:34 +#, python-brace-format +msgid "Status updates from {obj.display_name}" +msgstr "" + #~ msgid "Local Timeline" #~ msgstr "本地时间线" diff --git a/locale/zh_Hant/LC_MESSAGES/django.po b/locale/zh_Hant/LC_MESSAGES/django.po index 70caf596..2a39f388 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-13 02:21+0000\n" +"POT-Creation-Date: 2021-08-16 21:26+0000\n" "PO-Revision-Date: 2021-06-30 10:36+0000\n" "Last-Translator: Grace Cheng \n" "Language-Team: LANGUAGE \n" @@ -18,59 +18,59 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" -#: bookwyrm/forms.py:232 +#: bookwyrm/forms.py:233 msgid "A user with this email already exists." msgstr "已經存在使用該郵箱的使用者。" -#: bookwyrm/forms.py:246 +#: bookwyrm/forms.py:247 msgid "One Day" msgstr "一天" -#: bookwyrm/forms.py:247 +#: bookwyrm/forms.py:248 msgid "One Week" msgstr "一週" -#: bookwyrm/forms.py:248 +#: bookwyrm/forms.py:249 msgid "One Month" msgstr "一個月" -#: bookwyrm/forms.py:249 +#: bookwyrm/forms.py:250 msgid "Does Not Expire" msgstr "永不失效" -#: bookwyrm/forms.py:254 +#: bookwyrm/forms.py:255 #, python-format msgid "%(count)d uses" msgstr "%(count)d 次使用" -#: bookwyrm/forms.py:257 +#: bookwyrm/forms.py:258 msgid "Unlimited" msgstr "不受限" -#: bookwyrm/forms.py:307 +#: bookwyrm/forms.py:308 msgid "List Order" msgstr "列表順序" -#: bookwyrm/forms.py:308 +#: bookwyrm/forms.py:309 msgid "Book Title" msgstr "書名" -#: bookwyrm/forms.py:309 +#: bookwyrm/forms.py:310 #: bookwyrm/templates/snippets/create_status/review.html:25 #: bookwyrm/templates/user/shelf/shelf.html:85 #: bookwyrm/templates/user/shelf/shelf.html:116 msgid "Rating" msgstr "評價" -#: bookwyrm/forms.py:311 bookwyrm/templates/lists/list.html:107 +#: bookwyrm/forms.py:312 bookwyrm/templates/lists/list.html:107 msgid "Sort By" msgstr "排序方式" -#: bookwyrm/forms.py:315 +#: bookwyrm/forms.py:316 msgid "Ascending" msgstr "升序" -#: bookwyrm/forms.py:316 +#: bookwyrm/forms.py:317 msgid "Descending" msgstr "降序" @@ -290,9 +290,8 @@ msgstr "Goodreads key:" #: bookwyrm/templates/settings/edit_server.html:68 #: bookwyrm/templates/settings/federated_server.html:98 #: bookwyrm/templates/settings/site.html:108 -#: bookwyrm/templates/snippets/shelve_button/finish_reading_modal.html:42 -#: bookwyrm/templates/snippets/shelve_button/progress_update_modal.html:42 -#: bookwyrm/templates/snippets/shelve_button/start_reading_modal.html:36 +#: bookwyrm/templates/snippets/reading_modals/layout.html:16 +#: bookwyrm/templates/snippets/reading_modals/progress_update_modal.html:42 #: bookwyrm/templates/user_admin/user_moderation_actions.html:45 msgid "Save" msgstr "儲存" @@ -306,10 +305,7 @@ msgstr "儲存" #: bookwyrm/templates/settings/federated_server.html:99 #: bookwyrm/templates/snippets/delete_readthrough_modal.html:17 #: bookwyrm/templates/snippets/goal_form.html:32 -#: bookwyrm/templates/snippets/shelve_button/finish_reading_modal.html:43 -#: bookwyrm/templates/snippets/shelve_button/progress_update_modal.html:43 -#: bookwyrm/templates/snippets/shelve_button/start_reading_modal.html:37 -#: bookwyrm/templates/snippets/shelve_button/want_to_read_modal.html:28 +#: bookwyrm/templates/snippets/reading_modals/progress_update_modal.html:43 msgid "Cancel" msgstr "取消" @@ -2487,24 +2483,24 @@ msgid "Some thoughts on the book" msgstr "" #: bookwyrm/templates/snippets/create_status/comment.html:26 -#: bookwyrm/templates/snippets/shelve_button/progress_update_modal.html:16 +#: bookwyrm/templates/snippets/reading_modals/progress_update_modal.html:16 msgid "Progress:" msgstr "進度:" #: bookwyrm/templates/snippets/create_status/comment.html:34 +#: bookwyrm/templates/snippets/reading_modals/progress_update_modal.html:30 #: bookwyrm/templates/snippets/readthrough_form.html:22 -#: bookwyrm/templates/snippets/shelve_button/progress_update_modal.html:30 msgid "pages" msgstr "頁數" #: bookwyrm/templates/snippets/create_status/comment.html:35 +#: bookwyrm/templates/snippets/reading_modals/progress_update_modal.html:31 #: bookwyrm/templates/snippets/readthrough_form.html:23 -#: bookwyrm/templates/snippets/shelve_button/progress_update_modal.html:31 msgid "percent" msgstr "百分比" #: bookwyrm/templates/snippets/create_status/comment.html:41 -#: bookwyrm/templates/snippets/shelve_button/progress_update_modal.html:36 +#: bookwyrm/templates/snippets/reading_modals/progress_update_modal.html:36 #, python-format msgid "of %(pages)s pages" msgstr "全書 %(pages)s 頁" @@ -2533,6 +2529,7 @@ msgid "Include spoiler alert" msgstr "加入劇透警告" #: bookwyrm/templates/snippets/create_status/layout.html:38 +#: bookwyrm/templates/snippets/reading_modals/form.html:7 msgid "Comment:" msgstr "評論:" @@ -2685,9 +2682,7 @@ msgid "Goal privacy:" msgstr "目標隱私:" #: bookwyrm/templates/snippets/goal_form.html:26 -#: bookwyrm/templates/snippets/shelve_button/finish_reading_modal.html:37 -#: bookwyrm/templates/snippets/shelve_button/start_reading_modal.html:31 -#: bookwyrm/templates/snippets/shelve_button/want_to_read_modal.html:20 +#: bookwyrm/templates/snippets/reading_modals/layout.html:13 msgid "Post to feed" msgstr "發佈到即時動態" @@ -2762,21 +2757,45 @@ msgstr "留下評價" msgid "Rate" msgstr "評價" +#: bookwyrm/templates/snippets/reading_modals/finish_reading_modal.html:6 +#, python-format +msgid "Finish \"%(book_title)s\"" +msgstr "完成 \"%(book_title)s\"" + +#: bookwyrm/templates/snippets/reading_modals/finish_reading_modal.html:22 +#: bookwyrm/templates/snippets/reading_modals/start_reading_modal.html:20 #: bookwyrm/templates/snippets/readthrough_form.html:7 -#: bookwyrm/templates/snippets/shelve_button/finish_reading_modal.html:19 -#: bookwyrm/templates/snippets/shelve_button/start_reading_modal.html:19 msgid "Started reading" msgstr "已開始閱讀" +#: bookwyrm/templates/snippets/reading_modals/finish_reading_modal.html:30 +#: bookwyrm/templates/snippets/readthrough_form.html:30 +msgid "Finished reading" +msgstr "已完成閱讀" + +#: bookwyrm/templates/snippets/reading_modals/form.html:8 +msgid "(Optional)" +msgstr "" + +#: bookwyrm/templates/snippets/reading_modals/progress_update_modal.html:5 +#: bookwyrm/templates/snippets/shelve_button/shelve_button_options.html:45 +msgid "Update progress" +msgstr "更新進度" + +#: bookwyrm/templates/snippets/reading_modals/start_reading_modal.html:6 +#, python-format +msgid "Start \"%(book_title)s\"" +msgstr "開始 \"%(book_title)s\"" + +#: bookwyrm/templates/snippets/reading_modals/want_to_read_modal.html:6 +#, python-format +msgid "Want to Read \"%(book_title)s\"" +msgstr "想要閱讀 \"%(book_title)s\"" + #: bookwyrm/templates/snippets/readthrough_form.html:14 msgid "Progress" msgstr "進度" -#: bookwyrm/templates/snippets/readthrough_form.html:30 -#: bookwyrm/templates/snippets/shelve_button/finish_reading_modal.html:25 -msgid "Finished reading" -msgstr "已完成閱讀" - #: bookwyrm/templates/snippets/register_form.html:32 msgid "Sign Up" msgstr "註冊" @@ -2793,16 +2812,6 @@ msgstr "匯入書目" msgid "Move book" msgstr "移動書目" -#: bookwyrm/templates/snippets/shelve_button/finish_reading_modal.html:5 -#, python-format -msgid "Finish \"%(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 -msgid "Update progress" -msgstr "更新進度" - #: bookwyrm/templates/snippets/shelve_button/shelve_button_dropdown.html:5 msgid "More shelves" msgstr "更多書架" @@ -2816,7 +2825,6 @@ msgid "Finish reading" msgstr "完成閱讀" #: bookwyrm/templates/snippets/shelve_button/shelve_button_options.html:25 -#: bookwyrm/templates/snippets/shelve_button/want_to_read_modal.html:26 msgid "Want to read" msgstr "想要閱讀" @@ -2825,16 +2833,6 @@ msgstr "想要閱讀" msgid "Remove from %(name)s" msgstr "從 %(name)s 移除" -#: bookwyrm/templates/snippets/shelve_button/start_reading_modal.html:5 -#, python-format -msgid "Start \"%(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\"" - #: bookwyrm/templates/snippets/status/content_status.html:72 #: bookwyrm/templates/snippets/trimmed_text.html:17 msgid "Show more" @@ -2872,13 +2870,13 @@ msgstr "移除 %(name)s" msgid "rated %(book)s:" msgstr "由 %(username)s 建立" -#: bookwyrm/templates/snippets/status/headers/read.html:5 +#: bookwyrm/templates/snippets/status/headers/read.html:7 #, fuzzy, python-format #| msgid "Editions of \"%(work_title)s\"" msgid "finished reading %(book)s" msgstr "\"%(work_title)s\" 的各版本" -#: bookwyrm/templates/snippets/status/headers/reading.html:6 +#: bookwyrm/templates/snippets/status/headers/reading.html:7 #, fuzzy, python-format #| msgid "Created by %(username)s" msgid "started reading %(book)s" @@ -2890,7 +2888,7 @@ msgstr "由 %(username)s 建立" msgid "reviewed %(book)s" msgstr "移除 %(name)s" -#: bookwyrm/templates/snippets/status/headers/to_read.html:6 +#: bookwyrm/templates/snippets/status/headers/to_read.html:7 #, fuzzy, python-format #| msgid "replied to %(username)s's status" msgid "%(username)s wants to read %(book)s" @@ -3201,6 +3199,11 @@ msgstr "沒有找到使用該郵箱的使用者。" msgid "A password reset link sent to %s" msgstr "密碼重置連結已傳送給 %s" +#: bookwyrm/views/rss_feed.py:34 +#, python-brace-format +msgid "Status updates from {obj.display_name}" +msgstr "" + #~ msgid "Local Timeline" #~ msgstr "本地時間線"