forked from mirrors/bookwyrm
Translate table titles in header
This commit is contained in:
parent
8bb7d5bba0
commit
5938c438e2
2 changed files with 6 additions and 1 deletions
|
@ -3,7 +3,7 @@
|
|||
{% load bookwyrm_tags %}
|
||||
{% block panel %}
|
||||
|
||||
<h1 class="title">{% blocktrans with tab_title=tab|title %}{{ tab_title }} Timeline{% endblocktrans %}</h1>
|
||||
<h1 class="title">{% blocktrans %}{{ tab_title }} Timeline{% endblocktrans %}</h1>
|
||||
<div class="tabs">
|
||||
<ul>
|
||||
<li class="{% if tab == 'home' %}is-active{% endif %}">
|
||||
|
|
|
@ -6,6 +6,7 @@ from django.http import HttpResponseNotFound
|
|||
from django.template.response import TemplateResponse
|
||||
from django.utils import timezone
|
||||
from django.utils.decorators import method_decorator
|
||||
from django.utils.translation import gettext as _
|
||||
from django.views import View
|
||||
|
||||
from bookwyrm import forms, models
|
||||
|
@ -29,18 +30,22 @@ class Feed(View):
|
|||
if tab == 'home':
|
||||
activities = get_activity_feed(
|
||||
request.user, following_only=True)
|
||||
tab_title = _('Home')
|
||||
elif tab == 'local':
|
||||
activities = get_activity_feed(
|
||||
request.user, privacy=['public', 'followers'], local_only=True)
|
||||
tab_title = _('Local')
|
||||
else:
|
||||
activities = get_activity_feed(
|
||||
request.user, privacy=['public', 'followers'])
|
||||
tab_title = _('Federated')
|
||||
paginated = Paginator(activities, PAGE_LENGTH)
|
||||
|
||||
data = {**feed_page_data(request.user), **{
|
||||
'user': request.user,
|
||||
'activities': paginated.page(page),
|
||||
'tab': tab,
|
||||
'tab_title': tab_title,
|
||||
'goal_form': forms.GoalForm(),
|
||||
'path': '/%s' % tab,
|
||||
}}
|
||||
|
|
Loading…
Reference in a new issue