improve shelf rss description

Co-authored-by: Adeodato Simó <73768+dato@users.noreply.github.com>
This commit is contained in:
Matt Katz 2024-03-18 21:33:30 -04:00 committed by GitHub
parent 6976cb4876
commit cd29b44807
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -232,7 +232,6 @@ class RssShelfFeed(Feed):
def description(self, obj):
"""description of the shelf including the shelf name and user."""
# if there's a description, lets add it. Not everyone puts a description in.
desc = ""
if obj.description:
desc = f" {obj.description}"
return f"Books added to the '{obj.name}' shelf for {obj.user.name}.{desc}"
if desc := obj.description:
return _(f"{obj.user.name}s {obj.name} shelf: {desc}"
return _(f"Books added to {obj.user.name}s {obj.name} shelf"