update templates
This commit is contained in:
parent
65098a137d
commit
cc239d24f8
42 changed files with 196 additions and 470 deletions
|
@ -37,6 +37,7 @@ from catalog.common import (
|
|||
jsondata,
|
||||
)
|
||||
from catalog.common.models import SCRIPT_CHOICES
|
||||
from common.models.misc import uniq
|
||||
|
||||
from .utils import *
|
||||
|
||||
|
@ -235,11 +236,20 @@ class Edition(Item):
|
|||
if target.works.all().exists():
|
||||
for work in target.works.all():
|
||||
self.works.add(work)
|
||||
work.localized_title = uniq(work.localized_title + self.localized_title)
|
||||
work.save()
|
||||
elif self.works.all().exists():
|
||||
for work in self.works.all():
|
||||
target.works.add(work)
|
||||
work.localized_title = uniq(
|
||||
work.localized_title + target.localized_title
|
||||
)
|
||||
work.save()
|
||||
else:
|
||||
Work.objects.create(title=self.title).editions.add(self, target)
|
||||
work = Work.objects.create(title=self.title)
|
||||
work.editions.add(self, target)
|
||||
work.localized_title = self.localized_title
|
||||
work.save()
|
||||
return True
|
||||
|
||||
def unlink_from_all_works(self):
|
||||
|
@ -290,16 +300,13 @@ class Work(Item):
|
|||
|
||||
def merge_to(self, to_item: "Work | None"): # type: ignore[reportIncompatibleMethodOverride]
|
||||
super().merge_to(to_item)
|
||||
if to_item:
|
||||
if not to_item:
|
||||
return
|
||||
for edition in self.editions.all():
|
||||
to_item.editions.add(edition)
|
||||
self.editions.clear()
|
||||
if (
|
||||
to_item
|
||||
and self.title != to_item.title
|
||||
and self.title not in to_item.other_title
|
||||
):
|
||||
to_item.other_title += [self.title] # type: ignore
|
||||
to_item.other_title = uniq(to_item.other_title + [self.title]) # type: ignore
|
||||
to_item.localized_title = uniq(to_item.localized_title + self.localized_title)
|
||||
to_item.save()
|
||||
|
||||
def delete(self, using=None, keep_parents=False, soft=True, *args, **kwargs):
|
||||
|
|
|
@ -84,11 +84,14 @@ class WorkTestCase(TestCase):
|
|||
self.assertFalse(self.hyperion_print.has_related_books())
|
||||
|
||||
def test_merge(self):
|
||||
w1 = Work.objects.create(title="title1")
|
||||
w2 = Work.objects.create(title="title2")
|
||||
title1 = [{"lang": "zh", "text": "z"}]
|
||||
title2 = [{"lang": "en", "text": "e"}]
|
||||
w1 = Work.objects.create(title="title1", localized_title=title1)
|
||||
w2 = Work.objects.create(title="title2", localized_title=title2)
|
||||
w2.merge_to(w1)
|
||||
self.assertEqual(w1.title, "title1")
|
||||
self.assertEqual(w1.other_title, ["title2"])
|
||||
self.assertEqual(len(w1.localized_title), 2)
|
||||
|
||||
def test_link(self):
|
||||
self.hyperion_print.link_to_related_book(self.hyperion_ebook)
|
||||
|
|
|
@ -3,8 +3,11 @@ import pprint
|
|||
from django.contrib.contenttypes.models import ContentType
|
||||
from django.core.management.base import BaseCommand
|
||||
from django.db.models import Count, F
|
||||
from tqdm import tqdm
|
||||
|
||||
from catalog.book.tests import uniq
|
||||
from catalog.models import *
|
||||
from common.models.lang import detect_language
|
||||
from journal.models import update_journal_for_merged_item
|
||||
|
||||
|
||||
|
@ -25,6 +28,11 @@ class Command(BaseCommand):
|
|||
action="store_true",
|
||||
help="purge deleted items",
|
||||
)
|
||||
parser.add_argument(
|
||||
"--localize",
|
||||
action="store_true",
|
||||
help="migrate localized title/description",
|
||||
)
|
||||
parser.add_argument(
|
||||
"--integrity",
|
||||
action="store_true",
|
||||
|
@ -38,8 +46,28 @@ class Command(BaseCommand):
|
|||
self.purge()
|
||||
if options["integrity"]:
|
||||
self.integrity()
|
||||
if options["localize"]:
|
||||
self.localize()
|
||||
self.stdout.write(self.style.SUCCESS(f"Done."))
|
||||
|
||||
def localize(self):
|
||||
for i in tqdm(Item.objects.all()):
|
||||
localized_title = [{"lang": detect_language(i.title), "text": i.title}]
|
||||
if hasattr(i, "orig_title") and i.orig_title: # type:ignore
|
||||
localized_title += [
|
||||
{
|
||||
"lang": detect_language(i.orig_title), # type:ignore
|
||||
"text": i.orig_title, # type:ignore
|
||||
}
|
||||
]
|
||||
if hasattr(i, "other_title") and i.other_title: # type:ignore
|
||||
for title in i.other_title: # type:ignore
|
||||
localized_title += [{"lang": detect_language(title), "text": title}]
|
||||
localized_desc = [{"lang": detect_language(i.brief), "text": i.brief}]
|
||||
i.localized_title = uniq(localized_title)
|
||||
i.localized_description = localized_desc
|
||||
i.save(update_fields=["metadata"])
|
||||
|
||||
def purge(self):
|
||||
for cls in Item.__subclasses__():
|
||||
if self.fix:
|
||||
|
|
|
@ -44,7 +44,7 @@ class Movie(Item):
|
|||
douban_movie = PrimaryLookupIdDescriptor(IdType.DoubanMovie)
|
||||
|
||||
METADATA_COPY_LIST = [
|
||||
# "title",
|
||||
"title",
|
||||
"localized_title",
|
||||
"orig_title",
|
||||
# "other_title",
|
||||
|
|
|
@ -56,7 +56,6 @@ class DoubanDramaTestCase(TestCase):
|
|||
if item is None:
|
||||
raise ValueError()
|
||||
self.assertEqual(item.orig_title, "Iphigenie auf Tauris")
|
||||
print(item.localized_title)
|
||||
self.assertEqual(len(item.localized_title), 3)
|
||||
self.assertEqual(item.opening_date, "1974-04-21")
|
||||
self.assertEqual(item.choreographer, ["Pina Bausch"])
|
||||
|
@ -94,7 +93,7 @@ class DoubanDramaTestCase(TestCase):
|
|||
)
|
||||
self.assertEqual(len(resource.related_resources), 4)
|
||||
crawl_related_resources_task(resource.id) # force the async job to run now
|
||||
productions = list(item.productions.all().order_by("title"))
|
||||
productions = sorted(list(item.productions.all()), key=lambda p: p.opening_date)
|
||||
self.assertEqual(len(productions), 4)
|
||||
self.assertEqual(
|
||||
productions[3].actor,
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<div class="item player">
|
||||
<hgroup>
|
||||
<h5>
|
||||
<a href="{{ item.url }}">{{ item.title }}</a>
|
||||
<a href="{{ item.url }}">{{ item.display_title }}</a>
|
||||
<small>
|
||||
{% if not hide_category %}<span class="category">[{{ item.category.label }}]</span>{% endif %}
|
||||
<span class="site-list">
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
</span>
|
||||
{% endif %}
|
||||
{% if item.parent_item %}
|
||||
<span>{% trans "part of" %} {{ item.parent_item.type.label }}: <a href="{{ item.parent_item.url }}">{{ item.parent_item.title }}</a></span>
|
||||
<span>{% trans "part of" %} {{ item.parent_item.type.label }}: <a href="{{ item.parent_item.url }}">{{ item.parent_item.display_title }}</a></span>
|
||||
{% endif %}
|
||||
</small>
|
||||
</hgroup>
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
{% comment %} {% include '_people.html' with people=item.language role='' max=5 %} {% endcomment %}
|
||||
{% include '_people.html' with people=item.platform role='' max=5 %}
|
||||
{% if item.show %}
|
||||
<span>{{ item.show.type.label }}: <a href="{{ item.show.url }}">{{ item.show.title }}</a></span>
|
||||
<span>{{ item.show.type.label }}: <a href="{{ item.show.url }}">{{ item.show.display_title }}</a></span>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endblock brief %}
|
||||
|
|
|
@ -40,8 +40,8 @@
|
|||
data-cover="{{ comment.item.cover_url|default:item.cover.url }}"
|
||||
class="episode"
|
||||
data-hosts="{{ item.hosts|join:' / ' }}"
|
||||
data-title="{{ comment.item.title }}"
|
||||
data-album="{{ item.title }}"
|
||||
data-title="{{ comment.item.display_title }}"
|
||||
data-album="{{ item.display_title }}"
|
||||
{% if request.user.is_authenticated %} data-comment-href="{% url 'journal:comment' comment.item.uuid %}" {% endif %}
|
||||
data-uuid="{{ comment.item.uuid }}"><i class="fa-regular fa-circle-play"></i></a>
|
||||
</span>
|
||||
|
@ -65,7 +65,7 @@
|
|||
</span>
|
||||
</span>
|
||||
{% if comment.item != item %}
|
||||
<a href="{{ comment.item_url }}">{{ comment.item.title }}</a><small class="title_deco">{{ comment.item.title_deco }}</small>
|
||||
<a href="{{ comment.item_url }}">{{ comment.item.display_title }}</a><small class="title_deco">{{ comment.item.title_deco }}</small>
|
||||
{% endif %}
|
||||
<div class="tldr" _="on click toggle .tldr on me">
|
||||
<span>
|
||||
|
|
|
@ -67,8 +67,10 @@
|
|||
{{ comment.mark.action_label }}
|
||||
</span>
|
||||
</span>
|
||||
{% if comment.focus_item %}<a href="{{ comment.focus_item.url }}">{{ comment.focus_item.title }}</a>{% endif %}
|
||||
{% if comment.item != item %}<a href="{{ comment.item.url }}">{{ comment.item.title }}</a>{% endif %}
|
||||
{% if comment.focus_item %}
|
||||
<a href="{{ comment.focus_item.url }}">{{ comment.focus_item.display_title }}</a>
|
||||
{% endif %}
|
||||
{% if comment.item != item %}<a href="{{ comment.item.url }}">{{ comment.item.display_title }}</a>{% endif %}
|
||||
<div class="tldr" _="on click toggle .tldr on me">{{ comment.html|safe }}</div>
|
||||
</section>
|
||||
{% else %}
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
<span class="timestamp">{% trans "review" %}</span>
|
||||
</span>
|
||||
{% if review.item != item %}
|
||||
<a href="{{ review.item.url }}">{{ review.item.title }}</a><small class="title_deco">{{ comment.item.title_deco }}</small>
|
||||
<a href="{{ review.item.url }}">{{ review.item.display_title }}</a><small class="title_deco">{{ comment.item.title_deco }}</small>
|
||||
{% endif %}
|
||||
<div class="tldr">
|
||||
<span>
|
||||
|
|
|
@ -56,7 +56,7 @@
|
|||
{% comment %} <span class="timestamp">{{ comment.created_time|date }}</span> {% endcomment %}
|
||||
</span>
|
||||
<p>
|
||||
<a href="{{ comment.item.url }}">{{ comment.item.title }}</a>: {{ comment.html|safe }}
|
||||
<a href="{{ comment.item.url }}">{{ comment.item.display_title }}</a>: {{ comment.html|safe }}
|
||||
</p>
|
||||
{% endfor %}
|
||||
</section>
|
||||
|
|
|
@ -42,7 +42,7 @@
|
|||
<ul>
|
||||
{% endif %}
|
||||
<li>
|
||||
<a href="{{ i.url }}?skipcheck=1">{{ i.title }}</a>
|
||||
<a href="{{ i.url }}?skipcheck=1">{{ i.display_title }}</a>
|
||||
</li>
|
||||
{% if forloop.last %}</ul>{% endif %}
|
||||
{% endfor %}
|
||||
|
@ -83,7 +83,7 @@
|
|||
<p class="tag-list" style="overflow: scroll; max-height: 20em;">
|
||||
{% for ep in item.child_items %}
|
||||
<span class="season-number" id="ci_{{ ep.uuid }}">
|
||||
<a href="{% url 'catalog:edit' ep.url_path ep.uuid %}">{{ ep.episode_number|default:ep.title|default:"#" }}</a>
|
||||
<a href="{% url 'catalog:edit' ep.url_path ep.uuid %}">{{ ep.episode_number|default:ep.display_title|default:"#" }}</a>
|
||||
</span>
|
||||
{% endfor %}
|
||||
</p>
|
||||
|
@ -226,7 +226,7 @@
|
|||
{% trans "This edition belongs to the following work" %}
|
||||
{% for i in item.works.all %}
|
||||
<li>
|
||||
<a href="{{ i.url }}?skipcheck=1">{{ i.title }}</a>
|
||||
<a href="{{ i.url }}?skipcheck=1">{{ i.display_title }}</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
<form method="post"
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>{{ site_name }} -
|
||||
{% if form.instance.id %}
|
||||
{% trans 'Edit' %} {{ form.instance.title }}
|
||||
{% trans 'Edit' %} {{ form.instance.display_title }}
|
||||
{% else %}
|
||||
{% trans 'Create' %}
|
||||
{% endif %}
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>{{ site_name }} - {{ item.title }} - {% trans "revision history" %}</title>
|
||||
<title>{{ site_name }} - {{ item.display_title }} - {% trans "revision history" %}</title>
|
||||
{% include "common_libs.html" %}
|
||||
<style>
|
||||
aside details {
|
||||
|
@ -27,7 +27,7 @@
|
|||
{% include "_header.html" %}
|
||||
<main>
|
||||
<div class="grid__main">
|
||||
<h4>{{ item.title }} - {% trans "revision history" %}</h4>
|
||||
<h4>{{ item.display_title }} - {% trans "revision history" %}</h4>
|
||||
<table class="table table-striped table-bordered">
|
||||
<thead>
|
||||
<tr style="background:#eee;">
|
||||
|
|
|
@ -55,11 +55,11 @@
|
|||
<ul class="cards">
|
||||
{% for item in gallery.items %}
|
||||
<li class="card">
|
||||
<a href="{{ item.url }}" title="{{ item.title }}">
|
||||
<a href="{{ item.url }}" title="{{ item.display_title }}">
|
||||
<img src="{{ item.cover|thumb:'normal' }}"
|
||||
alt="{{ item.title }}"
|
||||
alt="{{ item.display_title }}"
|
||||
loading="lazy">
|
||||
<div class="card-title">{{ item.title }}</div>
|
||||
<div class="card-title">{{ item.display_title }}</div>
|
||||
</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
|
@ -85,11 +85,11 @@
|
|||
<ul class="cards">
|
||||
{% for item in featured_collections %}
|
||||
<li class="card">
|
||||
<a href="{{ item.url }}" title="{{ item.title }}">
|
||||
<a href="{{ item.url }}" title="{{ item.display_title }}">
|
||||
<img src="{{ item.cover|thumb:'normal' }}"
|
||||
alt="{{ item.title }}"
|
||||
alt="{{ item.display_title }}"
|
||||
loading="lazy">
|
||||
<div class="card-title">{{ item.title }}</div>
|
||||
<div class="card-title">{{ item.display_title }}</div>
|
||||
</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
|
|
|
@ -94,7 +94,7 @@
|
|||
<summary>{% trans 'other editions' %}</summary>
|
||||
{% for b in related_books %}
|
||||
<div>
|
||||
<a href="{{ b.url }}">{{ b.title }}</a>
|
||||
<a href="{{ b.url }}">{{ b.display_title }}</a>
|
||||
<small class="title_deco">{{ b.title_deco }}</small>
|
||||
{% comment %} {% for res in b.external_resources.all %}
|
||||
<a href="{{ res.url }}">
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<script src="{{ cdn_url }}/npm/cash-dom@8.1.5/dist/cash.min.js"></script>
|
||||
{% block head %}{% endblock %}
|
||||
<title>{{ site_name }} - {% trans item.category.label %} | {{ item.title }}</title>
|
||||
<title>{{ site_name }} - {% trans item.category.label %} | {{ item.display_title }}</title>
|
||||
</head>
|
||||
<body></body>
|
||||
</html>
|
||||
|
|
|
@ -32,10 +32,10 @@ window.player = new Shikwasa.Player({
|
|||
theme: 'dark',
|
||||
themeColor: '#837FFF',
|
||||
audio: {
|
||||
title: "{{ focus_item.title | escapejs }}",
|
||||
title: "{{ focus_item.display_title | escapejs }}",
|
||||
cover: "{{ focus_item.cover_url | default:item.cover.url | escapejs }}",
|
||||
src: "{{ focus_item.media_url | escapejs }}",
|
||||
album: "{{ item.title|escapejs }}",
|
||||
album: "{{ item.display_title|escapejs }}",
|
||||
artist: "{{ item.hosts|join:' / '|escapejs }}"
|
||||
}
|
||||
});
|
||||
|
|
|
@ -46,7 +46,7 @@
|
|||
</div>
|
||||
<div id="item-cover" class="left">
|
||||
<img src="{{ item.cover_image_url|default:item.cover.url|relative_uri }}"
|
||||
alt="{{ item.title }}">
|
||||
alt="{{ item.display_title }}">
|
||||
</div>
|
||||
{% if request.user.is_authenticated and not mark.shelf_type %}
|
||||
<div id="item-primary-action" class="right mark">
|
||||
|
@ -209,7 +209,7 @@
|
|||
{% endif %}
|
||||
{% if item.parent_item %}
|
||||
<p>
|
||||
{% trans 'part of' %} {{ item.parent_item.type.label }}: <span><a href="{{ item.parent_item.url }}"></span>{{ item.parent_item.title }}</a>
|
||||
{% trans 'part of' %} {{ item.parent_item.type.label }}: <span><a href="{{ item.parent_item.url }}"></span>{{ item.parent_item.display_title }}</a>
|
||||
</p>
|
||||
{% endif %}
|
||||
{% if item.author or item.translator %}
|
||||
|
|
|
@ -41,7 +41,9 @@
|
|||
<div>
|
||||
<a href="{{ mark.owner.url }}" title="@{{ mark.owner.handle }}">{{ mark.owner.display_name }}</a>
|
||||
<span>{{ mark.action_label }}</span>
|
||||
{% if mark.comment.item != item %}<a href="{{ mark.comment.item_url }}">{{ mark.comment.item.title }}</a>{% endif %}
|
||||
{% if mark.comment.item != item %}
|
||||
<a href="{{ mark.comment.item_url }}">{{ mark.comment.item.display_title }}</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div>
|
||||
{% if mark.rating_grade %}{{ mark.rating_grade|rating_star }}{% endif %}
|
||||
|
|
|
@ -42,7 +42,7 @@
|
|||
{% for prod in productions %}
|
||||
<hgroup>
|
||||
<h6>
|
||||
<a href="{{ prod.url }}">{{ prod.title }}</a>
|
||||
<a href="{{ prod.url }}">{{ prod.display_title }}</a>
|
||||
</h6>
|
||||
<div>
|
||||
{% if prod.opening_date %}
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
</section>
|
||||
<script>
|
||||
window.podcastData = {
|
||||
"title": "{{ item.title | escapejs }}",
|
||||
"title": "{{ item.display_title | escapejs }}",
|
||||
"subtitle": "",
|
||||
"description": "{{ item.brief | escapejs }}",
|
||||
"cover": "{{ item.cover.url | escapejs }}",
|
||||
|
@ -47,10 +47,10 @@ $(()=>{
|
|||
var position = 1 * "{{request.GET.position|escapejs}}";
|
||||
window.current_item_uuid = "{{focus_item.uuid}}";
|
||||
create_player({
|
||||
title: "{{ focus_item.title | escapejs }}",
|
||||
title: "{{ focus_item.display_title | escapejs }}",
|
||||
cover: "{{ focus_item.cover_url | default:item.cover.url | escapejs }}",
|
||||
src: "{{ focus_item.media_url | escapejs }}",
|
||||
album: "{{ item.title|escapejs }}",
|
||||
album: "{{ item.display_title|escapejs }}",
|
||||
artist: "{{ item.hosts|join:' / '|escapejs }}"
|
||||
})
|
||||
if (position) window.player._initSeek = position;
|
||||
|
|
|
@ -10,8 +10,8 @@
|
|||
class="episode gg-play-button-o"
|
||||
href="{{ ep.url }}"
|
||||
data-uuid="{{ ep.uuid }}"
|
||||
data-title="{{ ep.title }}"
|
||||
data-album="{{ item.title }}"
|
||||
data-title="{{ ep.display_title }}"
|
||||
data-album="{{ item.display_title }}"
|
||||
data-hosts="{{ item.hosts|join:' / ' }}"
|
||||
{% if request.user.is_authenticated %} data-comment-href="{% url 'journal:comment' ep.uuid %}" {% endif %}
|
||||
style="top:4px;
|
||||
|
@ -29,7 +29,7 @@
|
|||
target="_blank"
|
||||
rel="noopener"
|
||||
href="{{ ep.link }}"><i class="fa-solid fa-link"></i></a>
|
||||
{{ ep.title }}
|
||||
{{ ep.display_title }}
|
||||
<small style="color:lightgrey;">{{ ep.pub_date|date }}</small>
|
||||
</h6>
|
||||
<small class="tldr-2 muted" _="on click toggle .tldr-2">{{ ep.brief | linebreaksbr }}</small>
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
<summary>{% trans 'Editions' %}</summary>
|
||||
{% for b in item.editions.all %}
|
||||
<div>
|
||||
<a href="{{ b.url }}">{{ b.title }}</a>
|
||||
<a href="{{ b.url }}">{{ b.display_title }}</a>
|
||||
<small>({{ b.pub_house | default:'' }} {{ b.pub_year | default:'' }})</small>
|
||||
</div>
|
||||
{% endfor %}
|
||||
|
|
|
@ -229,7 +229,7 @@ ZH_LOCALE_SUBTAGS_PRIO = {
|
|||
ZH_LOCALE_SUBTAGS = {
|
||||
"zh-sg": _("Simplified Chinese (Singapore)"),
|
||||
"zh-my": _("Simplified Chinese (Malaysia)"),
|
||||
"zh-mo": _("Traditional Chinese (Taiwan)"),
|
||||
"zh-mo": _("Traditional Chinese (Macau)"),
|
||||
}
|
||||
ZH_LANGUAGE_SUBTAGS_PRIO = {
|
||||
"cmn": _("Mandarin Chinese"),
|
||||
|
|
|
@ -106,18 +106,18 @@
|
|||
data-uuid="{{ item.uuid }}"
|
||||
data-media="{{ item.media_url }}"
|
||||
data-cover="{{ item.cover_url|default:item.program.cover.url }}"
|
||||
data-title="{{ item.title }}"
|
||||
data-album="{{ item.program.title }}"
|
||||
data-title="{{ item.display_title }}"
|
||||
data-album="{{ item.program.display_title }}"
|
||||
data-hosts="{{ item.program.hosts|join:' / ' }}"
|
||||
{% if request.user.is_authenticated %} data-comment-href="{% url 'journal:comment' item.uuid %}" {% endif %}
|
||||
data-position="0"
|
||||
href="{{ item.url }}"
|
||||
title="{{ item.title }}">
|
||||
title="{{ item.display_title }}">
|
||||
<img src="{{ item.cover_image_url|default:item.cover.url|relative_uri }}"
|
||||
alt="{{ item.title }}"
|
||||
alt="{{ item.display_title }}"
|
||||
loading="lazy">
|
||||
<div class="card-title">
|
||||
<i class="fa-solid fa-circle-play"></i> {{ item.title }}
|
||||
<i class="fa-solid fa-circle-play"></i> {{ item.display_title }}
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
|
@ -137,11 +137,11 @@
|
|||
<ul class="cards">
|
||||
{% for item in books_in_progress %}
|
||||
<li class="card">
|
||||
<a href="{{ item.url }}" title="{{ item.title }}">
|
||||
<a href="{{ item.url }}" title="{{ item.display_title }}">
|
||||
<img src="{{ item.cover|thumb:'normal' }}"
|
||||
alt="{{ item.title }}"
|
||||
alt="{{ item.display_title }}"
|
||||
loading="lazy">
|
||||
<div class="card-title">{{ item.title }}</div>
|
||||
<div class="card-title">{{ item.display_title }}</div>
|
||||
</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
|
@ -160,11 +160,11 @@
|
|||
<ul class="cards">
|
||||
{% for item in tvshows_in_progress %}
|
||||
<li class="card">
|
||||
<a href="{{ item.url }}" title="{{ item.title }}">
|
||||
<a href="{{ item.url }}" title="{{ item.display_title }}">
|
||||
<img src="{{ item.cover|thumb:'normal' }}"
|
||||
alt="{{ item.title }}"
|
||||
alt="{{ item.display_title }}"
|
||||
loading="lazy">
|
||||
<div class="card-title">{{ item.title }}</div>
|
||||
<div class="card-title">{{ item.display_title }}</div>
|
||||
</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
aria-label="Close"
|
||||
class="close"
|
||||
_="on click trigger close_dialog" />
|
||||
<strong>{% trans 'Comment' %} - {{ item.parent_item.title }}: {{ item.title }}</strong>
|
||||
<strong>{% trans 'Comment' %} - {{ item.parent_item.display_title }}: {{ item.display_title }}</strong>
|
||||
</header>
|
||||
<div>
|
||||
<form action="{% url 'journal:comment' item.uuid %}" method="post">
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
aria-label="Close"
|
||||
class="close"
|
||||
_="on click trigger close_dialog" />
|
||||
<strong>{% trans "Mark" %} - {{ item.title }}</strong>
|
||||
<strong>{% trans "Mark" %} - {{ item.display_title }}</strong>
|
||||
</header>
|
||||
<div>
|
||||
<form method="post" action="{% url 'journal:mark' item.uuid %}">
|
||||
|
|
|
@ -98,11 +98,11 @@
|
|||
{% for member in shelf.members %}
|
||||
<li class="card">
|
||||
<a href="{% if shelf_type == 'reviewed' %}{{ member.url }}{% else %}{{ member.item.url }}{% endif %}"
|
||||
title="{{ member.item.title }}">
|
||||
title="{{ member.item.display_title }}">
|
||||
<img src="{{ member.item.cover|thumb:'normal' }}"
|
||||
alt="{{ member.item.title }}"
|
||||
alt="{{ member.item.display_title }}"
|
||||
loading="lazy">
|
||||
<div>{{ member.item.title }}</div>
|
||||
<div>{{ member.item.display_title }}</div>
|
||||
</a>
|
||||
</li>
|
||||
{% empty %}
|
||||
|
|
|
@ -146,7 +146,7 @@ class TagTest(TestCase):
|
|||
|
||||
def test_cleanup(self):
|
||||
self.assertEqual(Tag.cleanup_title("# "), "_")
|
||||
self.assertEqual(Tag.deep_cleanup_title("# C "), "text")
|
||||
self.assertEqual(Tag.deep_cleanup_title("# C "), "c")
|
||||
|
||||
def test_user_tag(self):
|
||||
t1 = "tag 1"
|
||||
|
|
|
@ -6,7 +6,7 @@ msgid ""
|
|||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2024-07-13 00:12-0400\n"
|
||||
"POT-Creation-Date: 2024-07-13 01:27-0400\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
|
@ -27,68 +27,68 @@ msgstr "简体中文"
|
|||
msgid "Traditional Chinese"
|
||||
msgstr "繁体中文"
|
||||
|
||||
#: catalog/book/models.py:97
|
||||
#: catalog/book/models.py:98
|
||||
msgid "subtitle"
|
||||
msgstr "副标题"
|
||||
|
||||
#: catalog/book/models.py:100 catalog/movie/models.py:68
|
||||
#: catalog/book/models.py:101 catalog/movie/models.py:68
|
||||
#: catalog/performance/models.py:257 catalog/tv/models.py:137
|
||||
#: catalog/tv/models.py:292
|
||||
msgid "original title"
|
||||
msgstr "原名"
|
||||
|
||||
#: catalog/book/models.py:103 catalog/book/models.py:259
|
||||
#: catalog/book/models.py:104 catalog/book/models.py:269
|
||||
msgid "author"
|
||||
msgstr "作者"
|
||||
|
||||
#: catalog/book/models.py:110
|
||||
#: catalog/book/models.py:111
|
||||
msgid "translator"
|
||||
msgstr "译者"
|
||||
|
||||
#: catalog/book/models.py:117 catalog/common/models.py:299
|
||||
#: catalog/book/models.py:118 catalog/common/models.py:299
|
||||
#: catalog/common/models.py:316 catalog/common/models.py:329
|
||||
#: catalog/templates/edition.html:47 catalog/tv/models.py:372
|
||||
#: users/models/user.py:114
|
||||
msgid "language"
|
||||
msgstr "语言"
|
||||
|
||||
#: catalog/book/models.py:125 catalog/templates/edition.html:26
|
||||
#: catalog/book/models.py:126 catalog/templates/edition.html:26
|
||||
msgid "publishing house"
|
||||
msgstr "出版社"
|
||||
|
||||
#: catalog/book/models.py:128
|
||||
#: catalog/book/models.py:129
|
||||
msgid "publication year"
|
||||
msgstr "发行年份"
|
||||
|
||||
#: catalog/book/models.py:134
|
||||
#: catalog/book/models.py:135
|
||||
msgid "publication month"
|
||||
msgstr "发行月份"
|
||||
|
||||
#: catalog/book/models.py:140 catalog/templates/edition.html:52
|
||||
#: catalog/book/models.py:141 catalog/templates/edition.html:52
|
||||
msgid "binding"
|
||||
msgstr "装订"
|
||||
|
||||
#: catalog/book/models.py:142
|
||||
#: catalog/book/models.py:143
|
||||
msgid "pages"
|
||||
msgstr "页数"
|
||||
|
||||
#: catalog/book/models.py:144 catalog/templates/edition.html:42
|
||||
#: catalog/book/models.py:145 catalog/templates/edition.html:42
|
||||
msgid "series"
|
||||
msgstr "丛书"
|
||||
|
||||
#: catalog/book/models.py:146
|
||||
#: catalog/book/models.py:147
|
||||
msgid "contents"
|
||||
msgstr "目录"
|
||||
|
||||
#: catalog/book/models.py:147 catalog/templates/edition.html:57
|
||||
#: catalog/book/models.py:148 catalog/templates/edition.html:57
|
||||
msgid "price"
|
||||
msgstr "价格"
|
||||
|
||||
#: catalog/book/models.py:148 catalog/templates/edition.html:31
|
||||
#: catalog/book/models.py:149 catalog/templates/edition.html:31
|
||||
msgid "imprint"
|
||||
msgstr "出品方"
|
||||
|
||||
#: catalog/book/models.py:266 catalog/game/models.py:60
|
||||
#: catalog/book/models.py:276 catalog/game/models.py:60
|
||||
#: catalog/movie/models.py:71 catalog/music/models.py:87
|
||||
#: catalog/performance/models.py:115 catalog/performance/models.py:260
|
||||
#: catalog/tv/models.py:141 catalog/tv/models.py:295
|
||||
|
@ -680,8 +680,7 @@ msgstr "显示更多"
|
|||
#: catalog/templates/_item_comments_by_episode.html:82
|
||||
#: catalog/templates/_item_reviews.html:47
|
||||
#: catalog/templates/podcast_episode_data.html:44
|
||||
#: social/templates/events.html:43 social/templates/feed_data.html:44
|
||||
#: social/templates/feed_events.html:133
|
||||
#: social/templates/events.html:43 social/templates/feed_events.html:133
|
||||
msgid "nothing more."
|
||||
msgstr "没有更多内容了。"
|
||||
|
||||
|
@ -2169,7 +2168,7 @@ msgstr "未知或其它"
|
|||
msgid "Simplified Chinese (Mainland)"
|
||||
msgstr "简体中文(大陆)"
|
||||
|
||||
#: common/models/lang.py:226 common/models/lang.py:232
|
||||
#: common/models/lang.py:226
|
||||
msgid "Traditional Chinese (Taiwan)"
|
||||
msgstr "正体中文(台湾)"
|
||||
|
||||
|
@ -2185,6 +2184,10 @@ msgstr "简体中文(新加坡)"
|
|||
msgid "Simplified Chinese (Malaysia)"
|
||||
msgstr "简体中文(马来西亚)"
|
||||
|
||||
#: common/models/lang.py:232
|
||||
msgid "Traditional Chinese (Macau)"
|
||||
msgstr "繁体中文(澳门)"
|
||||
|
||||
#: common/models/lang.py:235
|
||||
msgid "Mandarin Chinese"
|
||||
msgstr "普通话"
|
||||
|
@ -3779,41 +3782,6 @@ msgstr "联邦实例返回了无效的账号数据。"
|
|||
msgid "Invalid account data from Threads."
|
||||
msgstr "Threads返回了无效的账号数据。"
|
||||
|
||||
#: social/templates/activity/comment_child_item.html:12
|
||||
#: social/templates/feed_events.html:40
|
||||
msgid "play"
|
||||
msgstr "播放"
|
||||
|
||||
#: social/templates/activity/comment_child_item.html:25
|
||||
msgid "comment"
|
||||
msgstr "写短评"
|
||||
|
||||
#: social/templates/activity/create_collection.html:16 takahe/utils.py:563
|
||||
msgid "created collection"
|
||||
msgstr "创建了收藏单"
|
||||
|
||||
#: social/templates/activity/feature_collection.html:17
|
||||
msgid "set a target"
|
||||
msgstr "设置了目标"
|
||||
|
||||
#: social/templates/activity/like_collection.html:17
|
||||
#, python-format
|
||||
msgid "liked <a href=\"%(owner_url)s\">%(owner_name)s</a>'s collection"
|
||||
msgstr "赞了 <a href=\"%(owner_url)s\">%(owner_name)s</a> 的收藏单"
|
||||
|
||||
#: social/templates/activity/mark_item.html:12
|
||||
#: social/templates/activity/mark_item.html:19
|
||||
#: social/templates/activity/review_item.html:12
|
||||
#: social/templates/activity/review_item.html:19
|
||||
#: social/templates/feed_events.html:51
|
||||
msgid "mark"
|
||||
msgstr "标记"
|
||||
|
||||
#: social/templates/activity/review_item.html:35
|
||||
#, python-format
|
||||
msgid "wrote a review of %(item)s"
|
||||
msgstr "评论了 %(item)s"
|
||||
|
||||
#: social/templates/event/boosted.html:3
|
||||
msgid "boosted your post"
|
||||
msgstr "转播了你的帖文"
|
||||
|
@ -3986,19 +3954,27 @@ msgstr "仅书影音"
|
|||
msgid "Notifications"
|
||||
msgstr "通知"
|
||||
|
||||
#: social/templates/feed_data.html:48 social/templates/feed_events.html:137
|
||||
#, python-format
|
||||
msgid "Find and mark some books/movies/podcasts/games, <a href=\"%(import_url)s\">import your data</a> from Goodreads/Letterboxd/Douban, follow some fellow %(site_name)s users on the fediverse, so their recent activities and yours will show up here."
|
||||
msgstr "搜索并标记一些书影音/播客/游戏,<a href=\"%(import_url)s\">导入你的豆瓣、Letterboxd或Goodreads记录</a>,去联邦宇宙(长毛象)关注一些正在使用%(site_name)s的用户,这里就会显示你和她们的近期动态。"
|
||||
|
||||
#: social/templates/feed_events.html:23
|
||||
msgid "boosted"
|
||||
msgstr "转播了"
|
||||
|
||||
#: social/templates/feed_events.html:40
|
||||
msgid "play"
|
||||
msgstr "播放"
|
||||
|
||||
#: social/templates/feed_events.html:51
|
||||
msgid "mark"
|
||||
msgstr "标记"
|
||||
|
||||
#: social/templates/feed_events.html:70
|
||||
msgid "wrote a note"
|
||||
msgstr "写了笔记"
|
||||
|
||||
#: social/templates/feed_events.html:137
|
||||
#, python-format
|
||||
msgid "Find and mark some books/movies/podcasts/games, <a href=\"%(import_url)s\">import your data</a> from Goodreads/Letterboxd/Douban, follow some fellow %(site_name)s users on the fediverse, so their recent activities and yours will show up here."
|
||||
msgstr "搜索并标记一些书影音/播客/游戏,<a href=\"%(import_url)s\">导入你的豆瓣、Letterboxd或Goodreads记录</a>,去联邦宇宙(长毛象)关注一些正在使用%(site_name)s的用户,这里就会显示你和她们的近期动态。"
|
||||
|
||||
#: social/templates/notification.html:29
|
||||
msgid "mention"
|
||||
msgstr "提及"
|
||||
|
@ -4035,6 +4011,10 @@ msgstr "头像"
|
|||
msgid "Header picture"
|
||||
msgstr "背景图片"
|
||||
|
||||
#: takahe/utils.py:563
|
||||
msgid "created collection"
|
||||
msgstr "创建了收藏单"
|
||||
|
||||
#: users/models/task.py:17
|
||||
msgid "Pending"
|
||||
msgstr "等待"
|
||||
|
|
|
@ -6,7 +6,7 @@ msgid ""
|
|||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2024-07-13 00:12-0400\n"
|
||||
"POT-Creation-Date: 2024-07-13 01:27-0400\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
|
@ -27,68 +27,68 @@ msgstr "簡體中文"
|
|||
msgid "Traditional Chinese"
|
||||
msgstr "繁體中文"
|
||||
|
||||
#: catalog/book/models.py:97
|
||||
#: catalog/book/models.py:98
|
||||
msgid "subtitle"
|
||||
msgstr "副標題"
|
||||
|
||||
#: catalog/book/models.py:100 catalog/movie/models.py:68
|
||||
#: catalog/book/models.py:101 catalog/movie/models.py:68
|
||||
#: catalog/performance/models.py:257 catalog/tv/models.py:137
|
||||
#: catalog/tv/models.py:292
|
||||
msgid "original title"
|
||||
msgstr "原名"
|
||||
|
||||
#: catalog/book/models.py:103 catalog/book/models.py:259
|
||||
#: catalog/book/models.py:104 catalog/book/models.py:269
|
||||
msgid "author"
|
||||
msgstr "作者"
|
||||
|
||||
#: catalog/book/models.py:110
|
||||
#: catalog/book/models.py:111
|
||||
msgid "translator"
|
||||
msgstr "譯者"
|
||||
|
||||
#: catalog/book/models.py:117 catalog/common/models.py:299
|
||||
#: catalog/book/models.py:118 catalog/common/models.py:299
|
||||
#: catalog/common/models.py:316 catalog/common/models.py:329
|
||||
#: catalog/templates/edition.html:47 catalog/tv/models.py:372
|
||||
#: users/models/user.py:114
|
||||
msgid "language"
|
||||
msgstr "語言"
|
||||
|
||||
#: catalog/book/models.py:125 catalog/templates/edition.html:26
|
||||
#: catalog/book/models.py:126 catalog/templates/edition.html:26
|
||||
msgid "publishing house"
|
||||
msgstr "出版社"
|
||||
|
||||
#: catalog/book/models.py:128
|
||||
#: catalog/book/models.py:129
|
||||
msgid "publication year"
|
||||
msgstr "發行年份"
|
||||
|
||||
#: catalog/book/models.py:134
|
||||
#: catalog/book/models.py:135
|
||||
msgid "publication month"
|
||||
msgstr "發行月份"
|
||||
|
||||
#: catalog/book/models.py:140 catalog/templates/edition.html:52
|
||||
#: catalog/book/models.py:141 catalog/templates/edition.html:52
|
||||
msgid "binding"
|
||||
msgstr "裝訂"
|
||||
|
||||
#: catalog/book/models.py:142
|
||||
#: catalog/book/models.py:143
|
||||
msgid "pages"
|
||||
msgstr "頁數"
|
||||
|
||||
#: catalog/book/models.py:144 catalog/templates/edition.html:42
|
||||
#: catalog/book/models.py:145 catalog/templates/edition.html:42
|
||||
msgid "series"
|
||||
msgstr "叢書"
|
||||
|
||||
#: catalog/book/models.py:146
|
||||
#: catalog/book/models.py:147
|
||||
msgid "contents"
|
||||
msgstr "目錄"
|
||||
|
||||
#: catalog/book/models.py:147 catalog/templates/edition.html:57
|
||||
#: catalog/book/models.py:148 catalog/templates/edition.html:57
|
||||
msgid "price"
|
||||
msgstr "價格"
|
||||
|
||||
#: catalog/book/models.py:148 catalog/templates/edition.html:31
|
||||
#: catalog/book/models.py:149 catalog/templates/edition.html:31
|
||||
msgid "imprint"
|
||||
msgstr "出品方"
|
||||
|
||||
#: catalog/book/models.py:266 catalog/game/models.py:60
|
||||
#: catalog/book/models.py:276 catalog/game/models.py:60
|
||||
#: catalog/movie/models.py:71 catalog/music/models.py:87
|
||||
#: catalog/performance/models.py:115 catalog/performance/models.py:260
|
||||
#: catalog/tv/models.py:141 catalog/tv/models.py:295
|
||||
|
@ -680,8 +680,7 @@ msgstr "顯示更多"
|
|||
#: catalog/templates/_item_comments_by_episode.html:82
|
||||
#: catalog/templates/_item_reviews.html:47
|
||||
#: catalog/templates/podcast_episode_data.html:44
|
||||
#: social/templates/events.html:43 social/templates/feed_data.html:44
|
||||
#: social/templates/feed_events.html:133
|
||||
#: social/templates/events.html:43 social/templates/feed_events.html:133
|
||||
msgid "nothing more."
|
||||
msgstr "沒有更多內容了。"
|
||||
|
||||
|
@ -2169,7 +2168,7 @@ msgstr "未知或其它"
|
|||
msgid "Simplified Chinese (Mainland)"
|
||||
msgstr "簡體中文(大陸)"
|
||||
|
||||
#: common/models/lang.py:226 common/models/lang.py:232
|
||||
#: common/models/lang.py:226
|
||||
msgid "Traditional Chinese (Taiwan)"
|
||||
msgstr "正體中文(臺灣)"
|
||||
|
||||
|
@ -2185,6 +2184,10 @@ msgstr "簡體中文(新加坡)"
|
|||
msgid "Simplified Chinese (Malaysia)"
|
||||
msgstr "簡體中文(馬來西亞)"
|
||||
|
||||
#: common/models/lang.py:232
|
||||
msgid "Traditional Chinese (Macau)"
|
||||
msgstr "繁體中文(澳門)"
|
||||
|
||||
#: common/models/lang.py:235
|
||||
msgid "Mandarin Chinese"
|
||||
msgstr "普通話"
|
||||
|
@ -3779,41 +3782,6 @@ msgstr "聯邦實例返回了無效的賬號數據。"
|
|||
msgid "Invalid account data from Threads."
|
||||
msgstr "Threads返回了無效的賬號數據。"
|
||||
|
||||
#: social/templates/activity/comment_child_item.html:12
|
||||
#: social/templates/feed_events.html:40
|
||||
msgid "play"
|
||||
msgstr "播放"
|
||||
|
||||
#: social/templates/activity/comment_child_item.html:25
|
||||
msgid "comment"
|
||||
msgstr "寫短評"
|
||||
|
||||
#: social/templates/activity/create_collection.html:16 takahe/utils.py:563
|
||||
msgid "created collection"
|
||||
msgstr "創建了收藏單"
|
||||
|
||||
#: social/templates/activity/feature_collection.html:17
|
||||
msgid "set a target"
|
||||
msgstr "設置了目標"
|
||||
|
||||
#: social/templates/activity/like_collection.html:17
|
||||
#, python-format
|
||||
msgid "liked <a href=\"%(owner_url)s\">%(owner_name)s</a>'s collection"
|
||||
msgstr "讚了 <a href=\"%(owner_url)s\">%(owner_name)s</a> 的收藏單"
|
||||
|
||||
#: social/templates/activity/mark_item.html:12
|
||||
#: social/templates/activity/mark_item.html:19
|
||||
#: social/templates/activity/review_item.html:12
|
||||
#: social/templates/activity/review_item.html:19
|
||||
#: social/templates/feed_events.html:51
|
||||
msgid "mark"
|
||||
msgstr "標記"
|
||||
|
||||
#: social/templates/activity/review_item.html:35
|
||||
#, python-format
|
||||
msgid "wrote a review of %(item)s"
|
||||
msgstr "評論了 %(item)s"
|
||||
|
||||
#: social/templates/event/boosted.html:3
|
||||
msgid "boosted your post"
|
||||
msgstr "轉播了你的帖文"
|
||||
|
@ -3986,19 +3954,27 @@ msgstr "僅書影音"
|
|||
msgid "Notifications"
|
||||
msgstr "通知"
|
||||
|
||||
#: social/templates/feed_data.html:48 social/templates/feed_events.html:137
|
||||
#, python-format
|
||||
msgid "Find and mark some books/movies/podcasts/games, <a href=\"%(import_url)s\">import your data</a> from Goodreads/Letterboxd/Douban, follow some fellow %(site_name)s users on the fediverse, so their recent activities and yours will show up here."
|
||||
msgstr "搜索並標記一些書影音/播客/遊戲,<a href=\"%(import_url)s\">導入你的豆瓣、Letterboxd或Goodreads記錄</a>,去聯邦宇宙(長毛象)關注一些正在使用%(site_name)s的用戶,這裏就會顯示你和她們的近期動態。"
|
||||
|
||||
#: social/templates/feed_events.html:23
|
||||
msgid "boosted"
|
||||
msgstr "轉播了"
|
||||
|
||||
#: social/templates/feed_events.html:40
|
||||
msgid "play"
|
||||
msgstr "播放"
|
||||
|
||||
#: social/templates/feed_events.html:51
|
||||
msgid "mark"
|
||||
msgstr "標記"
|
||||
|
||||
#: social/templates/feed_events.html:70
|
||||
msgid "wrote a note"
|
||||
msgstr "寫了筆記"
|
||||
|
||||
#: social/templates/feed_events.html:137
|
||||
#, python-format
|
||||
msgid "Find and mark some books/movies/podcasts/games, <a href=\"%(import_url)s\">import your data</a> from Goodreads/Letterboxd/Douban, follow some fellow %(site_name)s users on the fediverse, so their recent activities and yours will show up here."
|
||||
msgstr "搜索並標記一些書影音/播客/遊戲,<a href=\"%(import_url)s\">導入你的豆瓣、Letterboxd或Goodreads記錄</a>,去聯邦宇宙(長毛象)關注一些正在使用%(site_name)s的用戶,這裏就會顯示你和她們的近期動態。"
|
||||
|
||||
#: social/templates/notification.html:29
|
||||
msgid "mention"
|
||||
msgstr "提及"
|
||||
|
@ -4035,6 +4011,10 @@ msgstr "頭像"
|
|||
msgid "Header picture"
|
||||
msgstr "背景圖片"
|
||||
|
||||
#: takahe/utils.py:563
|
||||
msgid "created collection"
|
||||
msgstr "創建了收藏單"
|
||||
|
||||
#: users/models/task.py:17
|
||||
msgid "Pending"
|
||||
msgstr "等待"
|
||||
|
|
|
@ -1,57 +0,0 @@
|
|||
{% load static %}
|
||||
{% load i18n %}
|
||||
{% load l10n %}
|
||||
{% load mastodon %}
|
||||
{% load thumb %}
|
||||
{% load user_actions %}
|
||||
{% load duration %}
|
||||
{% wish_item_action activity.action_object.item.parent_item as action %}
|
||||
<span class="action">
|
||||
{% if activity.action_object.item.class_name == 'podcastepisode' %}
|
||||
<span>
|
||||
<a title="{% trans "play" %}"
|
||||
class="episode"
|
||||
data-uuid="{{ activity.action_object.item.uuid }}"
|
||||
data-media="{{ activity.action_object.item.media_url }}"
|
||||
data-cover="{{ activity.action_object.item.cover_url|default:activity.action_object.item.parent_item.cover.url }}"
|
||||
data-title="{{ activity.action_object.item.title }}"
|
||||
data-album="{{ activity.action_object.item.parent_item.title }}"
|
||||
data-hosts="{{ activity.action_object.item.parent_item.hosts|join:' / ' }}"
|
||||
{% if request.user.is_authenticated %} data-comment-href="{% url 'journal:comment' activity.action_object.item.uuid %}" {% endif %}
|
||||
data-position="{{ activity.action_object.metadata.position | default:0 }}"><i class="fa-solid fa-circle-play"></i></a>
|
||||
</span>
|
||||
{% endif %}
|
||||
<span>
|
||||
<a title="{% trans "comment" %}"
|
||||
hx-get="{% url 'journal:comment' activity.action_object.item.uuid %}"
|
||||
hx-target="body"
|
||||
hx-swap="beforeend"><i class="fa-regular fa-comment"></i></a>
|
||||
</span>
|
||||
{% if activity.action_object.latest_post %}
|
||||
{% include "action_reply_piece.html" with post=activity.action_object.latest_post piece=activity.action_object %}
|
||||
{% include "action_like_post.html" with post=activity.action_object.latest_post %}
|
||||
{% include "action_boost_post.html" with post=activity.action_object.latest_post %}
|
||||
{% include "action_open_post.html" with post=activity.action_object.latest_post %}
|
||||
{% endif %}
|
||||
</span>
|
||||
<div class="spacing">
|
||||
{{ activity.action_object.mark.action_label }}
|
||||
<a href="{{ activity.action_object.item_url }}">{{ activity.action_object.item.title }}</a>
|
||||
{% if activity.action_object.metadata.position %}
|
||||
<span class="muted">{{ activity.action_object.metadata.position|duration_format:1 }}</span>
|
||||
{% endif %}
|
||||
{% if activity.action_object.mark.rating_grade %}
|
||||
{{ activity.action_object.mark.rating_grade | rating_star }}
|
||||
{% endif %}
|
||||
</div>
|
||||
<article>
|
||||
{% if activity.action_object.item.parent_item %}
|
||||
{% include "_item_card.html" with item=activity.action_object.item.parent_item allow_embed=1 %}
|
||||
{% else %}
|
||||
{% include "_item_card.html" with item=activity.action_object.item %}
|
||||
{% endif %}
|
||||
<footer>
|
||||
{% if activity.action_object.mark.comment_text %}<p>{{ activity.action_object.mark.comment_html|safe }}</p>{% endif %}
|
||||
<p id="replies_{{ activity.action_object.latest_post.pk }}"></p>
|
||||
</footer>
|
||||
</article>
|
|
@ -1,18 +0,0 @@
|
|||
{% load static %}
|
||||
{% load i18n %}
|
||||
{% load l10n %}
|
||||
{% load mastodon %}
|
||||
{% load thumb %}
|
||||
{% load user_actions %}
|
||||
<span class="action">
|
||||
{% if activity.action_object.latest_post %}
|
||||
{% include "action_reply_piece.html" with post=activity.action_object.latest_post piece=activity.action_object %}
|
||||
{% include "action_like_post.html" with post=activity.action_object.latest_post %}
|
||||
{% include "action_boost_post.html" with post=activity.action_object.latest_post %}
|
||||
{% include "action_open_post.html" with post=activity.action_object.latest_post %}
|
||||
{% endif %}
|
||||
</span>
|
||||
<div class="spacing">
|
||||
{% trans "created collection" %}
|
||||
<a href="{{ activity.action_object.url }}">{{ activity.action_object.title }}</a>
|
||||
</div>
|
|
@ -1,23 +0,0 @@
|
|||
{% load static %}
|
||||
{% load i18n %}
|
||||
{% load l10n %}
|
||||
{% load mastodon %}
|
||||
{% load thumb %}
|
||||
{% load user_actions %}
|
||||
{% with activity.action_object.target as collection %}
|
||||
<span class="action">
|
||||
{% if activity.action_object.latest_post %}
|
||||
{% include "action_reply_piece.html" with post=activity.action_object.latest_post piece=activity.action_object %}
|
||||
{% include "action_like_post.html" with post=activity.action_object.latest_post %}
|
||||
{% include "action_boost_post.html" with post=activity.action_object.latest_post %}
|
||||
{% include "action_open_post.html" with post=activity.action_object.latest_post %}
|
||||
{% endif %}
|
||||
</span>
|
||||
<div class="spacing">
|
||||
{% trans "set a target" %}
|
||||
<a href="{{ collection.url }}">{{ collection.title }}</a>
|
||||
</div>
|
||||
<p>
|
||||
<progress value="{{ activity.action_object.progress }}" max="100"></progress>
|
||||
</p>
|
||||
{% endwith %}
|
|
@ -1,20 +0,0 @@
|
|||
{% load static %}
|
||||
{% load i18n %}
|
||||
{% load l10n %}
|
||||
{% load mastodon %}
|
||||
{% load thumb %}
|
||||
{% load user_actions %}
|
||||
{% with activity.action_object.target as collection %}
|
||||
<span class="action">
|
||||
{% if activity.action_object.latest_post %}
|
||||
{% include "action_reply_piece.html" with post=activity.action_object.latest_post piece=activity.action_object %}
|
||||
{% include "action_like_post.html" with post=activity.action_object.latest_post %}
|
||||
{% include "action_boost_post.html" with post=activity.action_object.latest_post %}
|
||||
{% include "action_open_post.html" with post=activity.action_object.latest_post %}
|
||||
{% endif %}
|
||||
</span>
|
||||
<div class="spacing">
|
||||
{% blocktrans with owner_url=collection.owner.url owner_name=collection.owner.display_name %}liked <a href="{{ owner_url }}">{{ owner_name }}</a>'s collection{% endblocktrans %}
|
||||
<a href="{{ collection.url }}">{{ collection.title }}</a>
|
||||
</div>
|
||||
{% endwith %}
|
|
@ -1,47 +0,0 @@
|
|||
{% load static %}
|
||||
{% load i18n %}
|
||||
{% load l10n %}
|
||||
{% load mastodon %}
|
||||
{% load thumb %}
|
||||
{% load user_actions %}
|
||||
{% load duration %}
|
||||
{% wish_item_action activity.action_object.item as action %}
|
||||
<span class="action">
|
||||
<span>
|
||||
{% if not action.taken %}
|
||||
<a title="{% trans "mark" %}"
|
||||
hx-get="{% url 'journal:mark' activity.action_object.item.uuid %}?shelf_type=wishlist"
|
||||
hx-target="body"
|
||||
hx-swap="beforeend">
|
||||
<i class="fa-regular fa-bookmark"></i>
|
||||
</a>
|
||||
{% else %}
|
||||
<a title="{% trans "mark" %}"
|
||||
hx-get="{% url 'journal:mark' activity.action_object.item.uuid %}"
|
||||
hx-target="body"
|
||||
hx-swap="beforeend">
|
||||
<i class="fa-solid fa-bookmark"></i>
|
||||
</a>
|
||||
{% endif %}
|
||||
</span>
|
||||
{% if activity.action_object.latest_post %}
|
||||
{% include "action_reply_piece.html" with post=activity.action_object.latest_post piece=activity.action_object %}
|
||||
{% include "action_like_post.html" with post=activity.action_object.latest_post %}
|
||||
{% include "action_boost_post.html" with post=activity.action_object.latest_post %}
|
||||
{% include "action_open_post.html" with post=activity.action_object.latest_post %}
|
||||
{% endif %}
|
||||
</span>
|
||||
<div class="spacing">
|
||||
{{ activity.action_object.mark.action_label_for_feed }}
|
||||
{% comment %} {{ activity.action_object.item.title }} {% endcomment %}
|
||||
{% if activity.action_object.mark.rating_grade %}
|
||||
{{ activity.action_object.mark.rating_grade | rating_star }}
|
||||
{% endif %}
|
||||
</div>
|
||||
<article>
|
||||
{% include "_item_card.html" with item=activity.action_object.item allow_embed=1 %}
|
||||
<footer>
|
||||
{% if activity.action_object.mark.comment_text %}<p>{{ activity.action_object.mark.comment_html|safe }}</p>{% endif %}
|
||||
<p id="replies_{{ activity.action_object.latest_post.pk }}"></p>
|
||||
</footer>
|
||||
</article>
|
|
@ -1,47 +0,0 @@
|
|||
{% load static %}
|
||||
{% load i18n %}
|
||||
{% load l10n %}
|
||||
{% load mastodon %}
|
||||
{% load thumb %}
|
||||
{% load user_actions %}
|
||||
{% load duration %}
|
||||
{% wish_item_action activity.action_object.item as action %}
|
||||
<span class="action">
|
||||
<span>
|
||||
{% if not action.taken %}
|
||||
<a title="{% trans "mark" %}"
|
||||
hx-get="{% url 'journal:mark' activity.action_object.item.uuid %}?shelf_type=wishlist"
|
||||
hx-target="body"
|
||||
hx-swap="beforeend">
|
||||
<i class="fa-regular fa-bookmark"></i>
|
||||
</a>
|
||||
{% else %}
|
||||
<a title="{% trans "mark" %}"
|
||||
hx-get="{% url 'journal:mark' activity.action_object.item.uuid %}"
|
||||
hx-target="body"
|
||||
hx-swap="beforeend">
|
||||
<i class="fa-solid fa-bookmark"></i>
|
||||
</a>
|
||||
{% endif %}
|
||||
</span>
|
||||
{% if activity.action_object.latest_post %}
|
||||
{% include "action_reply_piece.html" with post=activity.action_object.latest_post piece=activity.action_object %}
|
||||
{% include "action_like_post.html" with post=activity.action_object.latest_post %}
|
||||
{% include "action_boost_post.html" with post=activity.action_object.latest_post %}
|
||||
{% include "action_open_post.html" with post=activity.action_object.latest_post %}
|
||||
{% endif %}
|
||||
</span>
|
||||
<div class="spacing">
|
||||
{% blocktrans with item=activity.action_object.item.title %}wrote a review of {{item}}{% endblocktrans %}
|
||||
<a href="{{ activity.action_object.url }}">{{ activity.action_object.title }}</a>
|
||||
{% if activity.action_object.mark.rating_grade %}
|
||||
{{ activity.action_object.mark.rating_grade | rating_star }}
|
||||
{% endif %}
|
||||
</div>
|
||||
<article>
|
||||
{% include "_item_card.html" with item=activity.action_object.item allow_embed=1 %}
|
||||
<footer>
|
||||
<p class="tldr-2">{{ activity.action_object.plain_content }}</p>
|
||||
<p id="replies_{{ activity.action_object.latest_post.pk }}"></p>
|
||||
</footer>
|
||||
</article>
|
|
@ -1,51 +0,0 @@
|
|||
{% load static %}
|
||||
{% load i18n %}
|
||||
{% load l10n %}
|
||||
{% load humanize %}
|
||||
{% load mastodon %}
|
||||
{% load thumb %}
|
||||
{% load user_actions %}
|
||||
{% load duration %}
|
||||
{% for activity in activities %}
|
||||
<section class="activity">
|
||||
<div class="avatar">
|
||||
<img src="{{ activity.owner.avatar }}" alt="cover">
|
||||
</div>
|
||||
<div>
|
||||
<div>
|
||||
<span class="time">
|
||||
<span>{{ activity.action_object.created_time|naturaldelta }}</span>
|
||||
</span>
|
||||
<div class="spacing">
|
||||
<span>
|
||||
<a href="{{ activity.owner.url }}" class="nickname">{{ activity.owner.display_name }}</a>
|
||||
</span>
|
||||
<span>
|
||||
<a href="{{ activity.owner.url }}" class="handler">@{{ activity.owner.full_handle }}</a>
|
||||
</span>
|
||||
</div>
|
||||
{% with "activity/"|add:activity.template|add:".html" as template %}
|
||||
{% include template %}
|
||||
{% endwith %}
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
{% if forloop.last %}
|
||||
<div class="htmx-indicator"
|
||||
style="margin-left: 60px"
|
||||
hx-get="{% url 'social:data' %}?last={{ activity.created_time|date:'Y-m-d H:i:s.uO'|urlencode }}"
|
||||
hx-trigger="revealed"
|
||||
hx-swap="outerHTML">
|
||||
<i class="fa-solid fa-compact-disc fa-spin loading"></i>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% empty %}
|
||||
{% if request.GET.last %}
|
||||
<div class="empty">{% trans 'nothing more.' %}</div>
|
||||
{% else %}
|
||||
<div class="empty">
|
||||
{% url 'users:data' as import_url %}
|
||||
{% blocktrans %}Find and mark some books/movies/podcasts/games, <a href="{{ import_url }}">import your data</a> from Goodreads/Letterboxd/Douban, follow some fellow {{ site_name }} users on the fediverse, so their recent activities and yours will show up here.{% endblocktrans %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endfor %}
|
|
@ -42,8 +42,8 @@
|
|||
data-uuid="{{ item.uuid }}"
|
||||
data-media="{{ item.media_url }}"
|
||||
data-cover="{{ item.cover_url|default:item.parent_item.cover.url }}"
|
||||
data-title="{{ item.title }}"
|
||||
data-album="{{ item.parent_item.title }}"
|
||||
data-title="{{ item.display_title }}"
|
||||
data-album="{{ item.parent_item.display_title }}"
|
||||
data-hosts="{{ item.parent_item.hosts|join:' / ' }}"
|
||||
{% if request.user.is_authenticated %} data-comment-href="{% url 'journal:comment' item.uuid %}" {% endif %}
|
||||
data-position="{{ piece.metadata.position | default:0 }}"><i class="fa-solid fa-circle-play"></i></a>
|
||||
|
@ -106,8 +106,10 @@
|
|||
<div class="embed-cover">
|
||||
{% if piece and piece.classname == 'note' %}
|
||||
{% if item %}
|
||||
<a href="{{ item.url }}" title="{{ item.title }}">
|
||||
<img src="{{ item.cover_image_url }}" title="{{ item.title }}" alt="cover">
|
||||
<a href="{{ item.url }}" title="{{ item.display_title }}">
|
||||
<img src="{{ item.cover_image_url }}"
|
||||
title="{{ item.display_title }}"
|
||||
alt="cover">
|
||||
</a>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
|
|
@ -116,20 +116,6 @@ def data(request):
|
|||
return render(request, "feed_events.html", {"feed_type": typ, "events": events})
|
||||
|
||||
|
||||
# @login_required
|
||||
# @require_http_methods(["GET"])
|
||||
# def data(request):
|
||||
# return render(
|
||||
# request,
|
||||
# "feed_data.html",
|
||||
# {
|
||||
# "activities": ActivityManager(request.user.identity).get_timeline(
|
||||
# before_time=request.GET.get("last")
|
||||
# )[:PAGE_SIZE],
|
||||
# },
|
||||
# )
|
||||
|
||||
|
||||
@require_http_methods(["GET"])
|
||||
@login_required
|
||||
def notification(request):
|
||||
|
|
Loading…
Add table
Reference in a new issue