Skip to content

Commit e09e78b

Browse files
committed
i18n for discover page
1 parent ac31934 commit e09e78b

File tree

5 files changed

+12
-12
lines changed

5 files changed

+12
-12
lines changed

catalog/jobs/discover.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,7 @@ def run(self):
8888
gallery_list.append(
8989
{
9090
"name": "popular_" + category.value,
91-
"title": ""
92-
+ (category.label if category != ItemCategory.Book else _("Book")),
91+
"category": category,
9392
"items": items,
9493
}
9594
)

catalog/templates/discover.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
then call el.scrollBy({left:el.offsetWidth, behavior:'smooth'})"><i class="fa-solid fa-circle-right"></i></a>
5252
</span>
5353
</span>
54-
<h5>{{ gallery.title }}</h5>
54+
<h5>{{ gallery.category.label }}</h5>
5555
<ul class="cards">
5656
{% for item in gallery.items %}
5757
<li class="card">

common/static/scss/_item.scss

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,13 +111,17 @@
111111
align-items: center;
112112
}
113113

114-
.item-action button {
114+
.item-mark-buttons button {
115115
margin-left: 0.2em;
116116
margin-right: 0.2em;
117117
max-width: 31%;
118118
white-space: nowrap;
119119
}
120120

121+
.mark button.edit {
122+
min-width: 75%;
123+
}
124+
121125
.mark {
122126
text-align: center;
123127
}

locale/zh_Hans/LC_MESSAGES/django.po

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ msgstr "苹果播客"
291291
#: common/templates/_header.html:25
292292
#: journal/templates/_sidebar_user_mark_list.html:31
293293
msgid "Book"
294-
msgstr ""
294+
msgstr "图书"
295295

296296
#: catalog/common/models.py:127
297297
msgid "TV Serie"

neodb.env.example

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,15 @@ NEODB_SECRET_KEY=change_me
77
NEODB_SITE_NAME=Example Site
88
NEODB_SITE_DOMAIN=example.site
99

10-
# Change these too
10+
# Change these to customize your site
1111
NEODB_SITE_INTRO=/welcome.html
1212
NEODB_SITE_LOGO=/logo.png
1313
NEODB_SITE_ICON=/icon.png
1414
NEODB_SITE_LINKS=@NiceDB=https://donotban.com/@testie,@NeoDB=https://mastodon.social/@neodb
1515

16-
# Turn off DEBUG only when you are ready for production service
17-
# NEODB_DEBUG=False
16+
# Uncomment these if you are doing development
17+
# NEODB_DEBUG=True
18+
# NEODB_IMAGE=neodb/neodb:edge
1819

1920
# HTTP port your reverse proxy should send request to
2021
# NEODB_PORT=8000
@@ -30,7 +31,3 @@ NEODB_SITE_LINKS=@NiceDB=https://donotban.com/@testie,@NeoDB=https://mastodon.so
3031
# TAKAHE_WEB_WORKER_NUM=32
3132
# TAKAHE_STATOR_CONCURRENCY=10
3233
# TAKAHE_STATOR_CONCURRENCY_PER_MODEL=10
33-
34-
# pull NeoDB Docker image from a specific tag
35-
# see available tags: https://hub.docker.com/r/neodb/neodb/tags
36-
# NEODB_IMAGE=neodb/neodb:main

0 commit comments

Comments
 (0)