Translations working in templates

This commit is contained in:
Mouse Reeve 2021-02-27 16:18:24 -08:00
parent b2e431daed
commit 2d79a52133
7 changed files with 11 additions and 11 deletions

View file

@ -30,11 +30,6 @@ EMAIL_USE_TLS = env('EMAIL_USE_TLS', True)
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
LOCALE_PATHS = [os.path.join(BASE_DIR, 'locale'),] LOCALE_PATHS = [os.path.join(BASE_DIR, 'locale'),]
LANGUAGES = [
('en-US', _('English')),
('en-beep', _('Beep')),
]
# Quick-start development settings - unsuitable for production # Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/2.0/howto/deployment/checklist/ # See https://docs.djangoproject.com/en/2.0/howto/deployment/checklist/
@ -143,6 +138,11 @@ AUTH_PASSWORD_VALIDATORS = [
# https://docs.djangoproject.com/en/2.0/topics/i18n/ # https://docs.djangoproject.com/en/2.0/topics/i18n/
LANGUAGE_CODE = 'en-us' LANGUAGE_CODE = 'en-us'
LANGUAGES = [
('en-us', _('English')),
('en-beep', _('Beep')),
]
TIME_ZONE = 'UTC' TIME_ZONE = 'UTC'

View file

@ -55,13 +55,13 @@
<div class="navbar-start"> <div class="navbar-start">
{% if request.user.is_authenticated %} {% if request.user.is_authenticated %}
<a href="{% url 'user-shelves' request.user.localname %}" class="navbar-item"> <a href="{% url 'user-shelves' request.user.localname %}" class="navbar-item">
Your shelves {% trans "Your shelves" %}
</a> </a>
<a href="/#feed" class="navbar-item"> <a href="/#feed" class="navbar-item">
Feed {% trans "Feed" %}
</a> </a>
<a href="{% url 'lists' %}" class="navbar-item"> <a href="{% url 'lists' %}" class="navbar-item">
Lists {% trans "Lists" %}
</a> </a>
{% endif %} {% endif %}
</div> </div>

View file

@ -142,9 +142,9 @@ LANGUAGE_CODE = 'en-us'
TIME_ZONE = 'UTC' TIME_ZONE = 'UTC'
USE_I18N = True USE_I18N = False
USE_L10N = True USE_L10N = False
USE_TZ = True USE_TZ = True

Binary file not shown.

Binary file not shown.

View file

@ -98,7 +98,7 @@ msgstr ""
#: bookwyrm/templates/book.html:215 bookwyrm/templates/search_results.html:84 #: bookwyrm/templates/book.html:215 bookwyrm/templates/search_results.html:84
#: bookwyrm/templates/user/user_layout.html:60 #: bookwyrm/templates/user/user_layout.html:60
msgid "Lists" msgid "Lists"
msgstr "lirsts" msgstr ""
#: bookwyrm/templates/book.html:244 #: bookwyrm/templates/book.html:244
msgid "rated it" msgid "rated it"