forked from mirrors/bookwyrm
Moves tab title translations into templates
This commit is contained in:
parent
3efabf1da3
commit
2fe9d1044a
2 changed files with 9 additions and 9 deletions
|
@ -3,7 +3,15 @@
|
|||
{% load bookwyrm_tags %}
|
||||
{% block panel %}
|
||||
|
||||
<h1 class="title">{% blocktrans %}{{ tab_title }} Timeline{% endblocktrans %}</h1>
|
||||
<h1 class="title">
|
||||
{% if tab == 'home' %}
|
||||
{% trans "Home Timeline" %}
|
||||
{% elif tab == 'local' %}
|
||||
{% trans "Local Timeline" %}
|
||||
{% else %}
|
||||
{% trans "Federated Timeline" %}
|
||||
{% endif %}
|
||||
</h1>
|
||||
<div class="tabs">
|
||||
<ul>
|
||||
<li class="{% if tab == 'home' %}is-active{% endif %}"{% if tab == 'home' %} aria-current="page"{% endif %}>
|
||||
|
|
|
@ -6,7 +6,6 @@ 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 activitystreams, forms, models
|
||||
|
@ -31,12 +30,6 @@ class Feed(View):
|
|||
if not tab in STREAMS:
|
||||
tab = 'home'
|
||||
|
||||
tab_title = {
|
||||
'home': _("Home"),
|
||||
"local": _("Local"),
|
||||
"federated": _("Federated")
|
||||
}[tab]
|
||||
|
||||
activities = activitystreams.streams[tab].get_activity_stream(request.user)
|
||||
|
||||
paginated = Paginator(activities, PAGE_LENGTH)
|
||||
|
@ -47,7 +40,6 @@ class Feed(View):
|
|||
"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