From a489549aaa3c83f263a55c47fd49fdfd9350c44d Mon Sep 17 00:00:00 2001 From: doubaniux Date: Mon, 11 May 2020 19:16:56 +0800 Subject: [PATCH] change book status names | fixed #30 --- boofilsic/settings.py | 6 ++---- books/forms.py | 6 +++--- books/templates/books/detail.html | 6 +++--- common/templates/common/home.html | 6 +++--- 4 files changed, 11 insertions(+), 13 deletions(-) diff --git a/boofilsic/settings.py b/boofilsic/settings.py index d2951709..685819e6 100644 --- a/boofilsic/settings.py +++ b/boofilsic/settings.py @@ -86,7 +86,7 @@ if DEBUG: 'NAME': 'test', 'USER': 'donotban', 'PASSWORD': 'donotbansilvousplait', - 'HOST': '172.18.96.109', + 'HOST': '192.168.238.194', 'OPTIONS': { 'client_encoding': 'UTF8', # 'isolation_level': psycopg2.extensions.ISOLATION_LEVEL_DEFAULT, @@ -113,9 +113,7 @@ else: AUTHENTICATION_BACKENDS = [ 'common.mastodon.auth.OAuth2Backend', - # for admin to login admin site - # 'django.contrib.auth.backends.ModelBackend' - ] +] # Internationalization diff --git a/books/forms.py b/books/forms.py index aa9fed25..031234b7 100644 --- a/books/forms.py +++ b/books/forms.py @@ -9,9 +9,9 @@ from common.forms import RadioBooleanField, RatingValidator def BookMarkStatusTranslator(status): trans_dict = { - MarkStatusEnum.DO.value: _("在看"), - MarkStatusEnum.WISH.value: _("想看"), - MarkStatusEnum.COLLECT.value: _("看过") + MarkStatusEnum.DO.value: _("在读"), + MarkStatusEnum.WISH.value: _("想读"), + MarkStatusEnum.COLLECT.value: _("读过") } return trans_dict[status] diff --git a/books/templates/books/detail.html b/books/templates/books/detail.html index 193c46b7..9c067de6 100644 --- a/books/templates/books/detail.html +++ b/books/templates/books/detail.html @@ -206,9 +206,9 @@ {% trans '标记这本书' %}
- {% trans '想看' %} - {% trans '在看' %} - {% trans '看过' %} + {% trans '想读' %} + {% trans '在读' %} + {% trans '读过' %}
{% endif %} diff --git a/common/templates/common/home.html b/common/templates/common/home.html index 1dab3007..7d4dc007 100644 --- a/common/templates/common/home.html +++ b/common/templates/common/home.html @@ -43,7 +43,7 @@
- {% trans '想看的书' %} + {% trans '想读的书' %}
{% if wish_books_more %} {% trans '更多' %} @@ -65,7 +65,7 @@
- {% trans '在看的书' %} + {% trans '在读的书' %}
{% if do_books_more %} {% trans '更多' %} @@ -87,7 +87,7 @@
- {% trans '看过的书' %} + {% trans '读过的书' %}
{% if collect_books_more %} {% trans '更多' %}