From 2db1914324a7b58d9ac27334ee63c8a2b4ba3dab Mon Sep 17 00:00:00 2001 From: Your Name Date: Sat, 19 Oct 2024 00:47:08 -0400 Subject: [PATCH] Qidian: fix style; add book format and localized label --- catalog/sites/qidian.py | 1 + catalog/sites/ypshuo.py | 1 + common/static/scss/_sitelabel.scss | 2 +- locale/zh_Hans/LC_MESSAGES/django.po | 8 ++++++++ locale/zh_Hant/LC_MESSAGES/django.po | 8 ++++++++ 5 files changed, 19 insertions(+), 1 deletion(-) diff --git a/catalog/sites/qidian.py b/catalog/sites/qidian.py index 4e9f2962..a65464d1 100644 --- a/catalog/sites/qidian.py +++ b/catalog/sites/qidian.py @@ -48,6 +48,7 @@ class Qidian(AbstractSite): metadata={ "localized_title": [{"lang": "zh-cn", "text": title}], "author": authors, + "format": Edition.BookFormat.WEB, "localized_description": [{"lang": "zh-cn", "text": brief}], "cover_image_url": img_url, } diff --git a/catalog/sites/ypshuo.py b/catalog/sites/ypshuo.py index 7ddaaf19..6c3d2a38 100644 --- a/catalog/sites/ypshuo.py +++ b/catalog/sites/ypshuo.py @@ -30,6 +30,7 @@ class Ypshuo(AbstractSite): metadata={ "localized_title": [{"lang": "zh-cn", "text": o["data"]["novel_name"]}], "author": [o["data"]["author_name"]], + "format": Edition.BookFormat.WEB, "localized_description": [ {"lang": "zh-cn", "text": o["data"]["synopsis"]} ], diff --git a/common/static/scss/_sitelabel.scss b/common/static/scss/_sitelabel.scss index 4f310d17..c946e353 100644 --- a/common/static/scss/_sitelabel.scss +++ b/common/static/scss/_sitelabel.scss @@ -18,7 +18,7 @@ white-space: nowrap; } - .qidian { + .qidian, .ypshuo { border: none; color: white; background-color: #9e252b; diff --git a/locale/zh_Hans/LC_MESSAGES/django.po b/locale/zh_Hans/LC_MESSAGES/django.po index 8e76c984..97d7bbfb 100644 --- a/locale/zh_Hans/LC_MESSAGES/django.po +++ b/locale/zh_Hans/LC_MESSAGES/django.po @@ -199,6 +199,14 @@ msgstr "苹果音乐" msgid "Fediverse" msgstr "联邦宇宙" +#: catalog/common/models.py:60 catalog/common/models.py:123 +msgid "Qidian" +msgstr "起点" + +#: catalog/common/models.py:61 catalog/common/models.py:124 +msgid "Ypshuo" +msgstr "阅评说" + #: catalog/common/models.py:63 msgid "WikiData" msgstr "维基数据" diff --git a/locale/zh_Hant/LC_MESSAGES/django.po b/locale/zh_Hant/LC_MESSAGES/django.po index 0c22285c..455780f2 100644 --- a/locale/zh_Hant/LC_MESSAGES/django.po +++ b/locale/zh_Hant/LC_MESSAGES/django.po @@ -199,6 +199,14 @@ msgstr "蘋果音樂" msgid "Fediverse" msgstr "聯邦宇宙" +#: catalog/common/models.py:60 catalog/common/models.py:123 +msgid "Qidian" +msgstr "起點" + +#: catalog/common/models.py:61 catalog/common/models.py:124 +msgid "Ypshuo" +msgstr "閱評說" + #: catalog/common/models.py:63 msgid "WikiData" msgstr "維基數據"