From 648e287144a45d8791311bb82bc0b11078c0877a Mon Sep 17 00:00:00 2001 From: mpeltriaux Date: Thu, 20 Jan 2022 12:31:20 +0100 Subject: [PATCH] # 70 Tab title rest * adds tab titles for some other pages * adds/updates translations --- konova/views.py | 2 ++ locale/de/LC_MESSAGES/django.mo | Bin 34615 -> 34713 bytes locale/de/LC_MESSAGES/django.po | 24 ++++++++++++++++-------- news/views.py | 3 +++ user/views.py | 4 ++++ 5 files changed, 25 insertions(+), 8 deletions(-) diff --git a/konova/views.py b/konova/views.py index 1f16b9ea..abfea284 100644 --- a/konova/views.py +++ b/konova/views.py @@ -18,6 +18,7 @@ from konova.contexts import BaseContext from konova.decorators import any_group_check from konova.forms import RemoveModalForm from konova.models import Deadline +from konova.sub_settings.context_settings import TAB_TITLE_IDENTIFIER from news.models import ServerMessage from konova.settings import SSO_SERVER_BASE @@ -92,6 +93,7 @@ def home_view(request: HttpRequest): "user_compensation_count": user_comps.count(), "total_eco_count": eco_accs.count(), "user_eco_count": user_ecco_accs.count(), + TAB_TITLE_IDENTIFIER: _("Home"), } context = BaseContext(request, additional_context).context return render(request, template, context) diff --git a/locale/de/LC_MESSAGES/django.mo b/locale/de/LC_MESSAGES/django.mo index 87ac689b8766276b9b18c7238f66d14bfc9d74cf..619b6ef4f243212e38b6b5aceaefebcb847129ec 100644 GIT binary patch delta 8206 zcmYk>dtBGm9mnzWL-5Y!MC)MlNZzHQM?SlYF)Q#iF2%c2jTwUSB# zGiC%<<8u5Q)zzGIW1?{_hT|5S51QR18dGo#TVNfw#B=x?yoAijjPGhKMb)dsBwX&w zU&2=8_hS^ELO-5&`L8gNyy<4lO%R2xOwgEQ5*i>ITjLOHi<7VoKIq=BcRq(&$!<)+ zW3K!fHX{E6X5cTVg>~z02h75jguEZ>ExHhVxM~UXE(`B&tERb2~OCzu)DL zI_pvOKSIVdm#`!HnT1xIg-!5wWEaga)B-Cos8FsUp^$8H?!u zj|$z>s1Ej^CUOMTt`7Zp1~u>{)Rz7WwM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^fb5tm^Q4{Ed z+N0j64u@k9jz$f5KkCd(#ys5M{1g+&$MTU##&)R4490w%hq~r_QQsTyf=hhi{K|O^ zYf#}Qm%o7;_;=KVYAvu6k3@A8>x@VJHcUpf&p_30?((;y7T6v+E1v1_ipNl$7rKsNl+p!J)6LT^0F`Ms=n$T<6fN7>GPg@ zn?a2f(#LSED^shTq?h6vp24JF`M-Diug~)-*VjWoNBr+ox@T^4HOerHXARF;-g0TH zf1Y&jPx$ww<_Gad^0TQCfxz4TmL}r^$NcEDoa_zMSkJST`noPvr1cL5`uUjW1kZNz zi+FbMyx~8Rc5h&de>SaO++Om-RFR+Yr1@%^Ik?sDnm#{d6RB7Iqv=^K_mk2U+s3ns z=Y1aiJj3$>@0MdKPgByX{gjN>frEZwMnU)<@^|x8@Eq{BWW?)(V\n" "Language-Team: LANGUAGE \n" @@ -1885,7 +1885,11 @@ msgstr "{} wurde erfolgreich vom Nutzer {} geprüft! {}" msgid "missing" msgstr "fehlt" -#: konova/views.py:115 +#: konova/views.py:96 templates/navbars/navbar.html:16 +msgid "Home" +msgstr "Home" + +#: konova/views.py:117 msgid "Deadline removed" msgstr "Frist gelöscht" @@ -1913,7 +1917,7 @@ msgstr "Ältere ..." msgid "All" msgstr "Alle" -#: news/templates/news/index.html:9 +#: news/templates/news/index.html:9 news/views.py:34 msgid "News" msgstr "Neuigkeiten" @@ -2182,10 +2186,6 @@ msgstr "" msgid "KSP" msgstr "" -#: templates/navbars/navbar.html:16 -msgid "Home" -msgstr "Home" - #: templates/navbars/navbar.html:40 msgid "More" msgstr "Mehr" @@ -2300,10 +2300,18 @@ msgstr "Benachrichtigungseinstellungen ändern" msgid "Notification settings" msgstr "Benachrichtigungen" -#: user/views.py:52 +#: user/views.py:29 +msgid "User settings" +msgstr "Einstellungen" + +#: user/views.py:55 msgid "Notifications edited" msgstr "Benachrichtigungen bearbeitet" +#: user/views.py:67 +msgid "User notifications" +msgstr "Benachrichtigungen" + #: venv/lib/python3.7/site-packages/bootstrap4/components.py:17 #: venv/lib/python3.7/site-packages/bootstrap4/templates/bootstrap4/form_errors.html:3 #: venv/lib/python3.7/site-packages/bootstrap4/templates/bootstrap4/messages.html:4 diff --git a/news/views.py b/news/views.py index d386de01..a556e4cc 100644 --- a/news/views.py +++ b/news/views.py @@ -2,8 +2,10 @@ from django.contrib.auth.decorators import login_required from django.http import HttpRequest from django.shortcuts import render from django.utils import timezone +from django.utils.translation import gettext_lazy as _ from konova.contexts import BaseContext +from konova.sub_settings.context_settings import TAB_TITLE_IDENTIFIER from news.models import ServerMessage @@ -29,6 +31,7 @@ def index_view(request: HttpRequest): context = { "news": news, + TAB_TITLE_IDENTIFIER: _("News"), } context = BaseContext(request, context).context return render(request, template, context) diff --git a/user/views.py b/user/views.py index 13fecf5c..59796752 100644 --- a/user/views.py +++ b/user/views.py @@ -1,5 +1,7 @@ from django.contrib import messages from django.contrib.auth.decorators import login_required + +from konova.sub_settings.context_settings import TAB_TITLE_IDENTIFIER from user.models import User from django.http import HttpRequest from django.shortcuts import render, redirect, get_object_or_404 @@ -24,6 +26,7 @@ def index_view(request: HttpRequest): template = "user/index.html" context = { "user": request.user, + TAB_TITLE_IDENTIFIER: _("User settings"), } context = BaseContext(request, context).context return render(request, template, context) @@ -61,6 +64,7 @@ def notifications_view(request: HttpRequest): context = { "user": user, "form": form, + TAB_TITLE_IDENTIFIER: _("User notifications"), } context = BaseContext(request, context).context return render(request, template, context)