From 883cdfefefec15f22cafa58171bd80a75cd5e920 Mon Sep 17 00:00:00 2001 From: ftsell Date: Wed, 1 May 2024 00:28:44 +0200 Subject: [PATCH] add may day special feature --- locale/de_DE/LC_MESSAGES/django.po | 20 +++--- locale/en_US/LC_MESSAGES/django.po | 16 +++-- locale/en_Uwu/LC_MESSAGES/django.po | 16 +++-- locale/fr_FR/LC_MESSAGES/django.po | 16 +++-- mafiasi/base/special_day_middleware.py | 3 + .../dashboard/templates/dashboard/index.html | 2 + .../templates/dashboard/may_day.html | 71 +++++++++++++++++++ 7 files changed, 118 insertions(+), 26 deletions(-) create mode 100644 mafiasi/dashboard/templates/dashboard/may_day.html diff --git a/locale/de_DE/LC_MESSAGES/django.po b/locale/de_DE/LC_MESSAGES/django.po index d9d737d..5e6d10a 100644 --- a/locale/de_DE/LC_MESSAGES/django.po +++ b/locale/de_DE/LC_MESSAGES/django.po @@ -3,8 +3,8 @@ msgid "" msgstr "" "Project-Id-Version: Mafiasi\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-04-01 02:46+0200\n" -"PO-Revision-Date: 2024-01-18 22:42+0100\n" +"POT-Creation-Date: 2024-05-01 00:25+0200\n" +"PO-Revision-Date: 2024-05-01 00:26+0200\n" "Last-Translator: Markus Neblung \n" "Language-Team: \n" "Language: de_DE\n" @@ -12,7 +12,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -"X-Generator: Poedit 3.0.1\n" +"X-Generator: Poedit 3.4.2\n" #: mafiasi/base/middleware.py:18 msgid "" @@ -169,23 +169,23 @@ msgstr "Mit dem BitPoll kannst du einfach gemeinsame Termine finden." msgid "Dashboard" msgstr "Dashboard" -#: mafiasi/dashboard/templates/dashboard/index.html:16 +#: mafiasi/dashboard/templates/dashboard/index.html:18 msgid "Services" msgstr "Dienste" -#: mafiasi/dashboard/templates/dashboard/index.html:33 +#: mafiasi/dashboard/templates/dashboard/index.html:35 msgid "Rearrange item" msgstr "Dienst umordnen" -#: mafiasi/dashboard/templates/dashboard/index.html:41 +#: mafiasi/dashboard/templates/dashboard/index.html:43 msgid "News and more" msgstr "Aktuelles und mehr" -#: mafiasi/dashboard/templates/dashboard/index.html:57 +#: mafiasi/dashboard/templates/dashboard/index.html:59 msgid "Wiki search" msgstr "Wiki-Suche" -#: mafiasi/dashboard/templates/dashboard/index.html:64 +#: mafiasi/dashboard/templates/dashboard/index.html:66 #: mafiasi/gprot/templates/gprot/menu.html:4 #: mafiasi/pks/templates/pks/menu.html:4 #: mafiasi/pks/templates/pks/search.html:5 @@ -218,6 +218,10 @@ msgstr "Weiter mit Werbung" msgid "Book Mafiasi Purple" msgstr "Mafiasi Purple buchen" +#: mafiasi/dashboard/templates/dashboard/may_day.html:10 +msgid "Server-Rooms are being occupied…" +msgstr "Serverräume werden besetzt…" + #: mafiasi/discourse/apps.py:11 msgid "Discourse" msgstr "Discourse" diff --git a/locale/en_US/LC_MESSAGES/django.po b/locale/en_US/LC_MESSAGES/django.po index 7229ee3..b67423f 100644 --- a/locale/en_US/LC_MESSAGES/django.po +++ b/locale/en_US/LC_MESSAGES/django.po @@ -2,7 +2,7 @@ msgid "" msgstr "" "Project-Id-Version: Mafiasi\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-04-01 02:46+0200\n" +"POT-Creation-Date: 2024-05-01 00:25+0200\n" "PO-Revision-Date: 2024-01-18 22:42+0100\n" "Last-Translator: Markus Neblung \n" "Language-Team: \n" @@ -155,23 +155,23 @@ msgstr "" msgid "Dashboard" msgstr "" -#: mafiasi/dashboard/templates/dashboard/index.html:16 +#: mafiasi/dashboard/templates/dashboard/index.html:18 msgid "Services" msgstr "" -#: mafiasi/dashboard/templates/dashboard/index.html:33 +#: mafiasi/dashboard/templates/dashboard/index.html:35 msgid "Rearrange item" msgstr "" -#: mafiasi/dashboard/templates/dashboard/index.html:41 +#: mafiasi/dashboard/templates/dashboard/index.html:43 msgid "News and more" msgstr "" -#: mafiasi/dashboard/templates/dashboard/index.html:57 +#: mafiasi/dashboard/templates/dashboard/index.html:59 msgid "Wiki search" msgstr "" -#: mafiasi/dashboard/templates/dashboard/index.html:64 +#: mafiasi/dashboard/templates/dashboard/index.html:66 #: mafiasi/gprot/templates/gprot/menu.html:4 #: mafiasi/pks/templates/pks/menu.html:4 #: mafiasi/pks/templates/pks/search.html:5 @@ -199,6 +199,10 @@ msgstr "" msgid "Book Mafiasi Purple" msgstr "" +#: mafiasi/dashboard/templates/dashboard/may_day.html:10 +msgid "Server-Rooms are being occupied…" +msgstr "" + #: mafiasi/discourse/apps.py:11 msgid "Discourse" msgstr "" diff --git a/locale/en_Uwu/LC_MESSAGES/django.po b/locale/en_Uwu/LC_MESSAGES/django.po index 66be1c7..145b997 100644 --- a/locale/en_Uwu/LC_MESSAGES/django.po +++ b/locale/en_Uwu/LC_MESSAGES/django.po @@ -2,7 +2,7 @@ msgid "" msgstr "" "Project-Id-Version: Mafiasi\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-04-01 02:46+0200\n" +"POT-Creation-Date: 2024-05-01 00:25+0200\n" "PO-Revision-Date: 2024-01-09 22:14+0000\n" "Last-Translator: kritzl \n" "Language-Team: \n" @@ -169,23 +169,23 @@ msgstr "Pawl is helps u find dates with frens :*" msgid "Dashboard" msgstr "Homi UwU" -#: mafiasi/dashboard/templates/dashboard/index.html:16 +#: mafiasi/dashboard/templates/dashboard/index.html:18 msgid "Services" msgstr "Behold: my stuff! (●'◡'●)" -#: mafiasi/dashboard/templates/dashboard/index.html:33 +#: mafiasi/dashboard/templates/dashboard/index.html:35 msgid "Rearrange item" msgstr "Move thingy" -#: mafiasi/dashboard/templates/dashboard/index.html:41 +#: mafiasi/dashboard/templates/dashboard/index.html:43 msgid "News and more" msgstr "Meows and snacks" -#: mafiasi/dashboard/templates/dashboard/index.html:57 +#: mafiasi/dashboard/templates/dashboard/index.html:59 msgid "Wiki search" msgstr "Look up knowings" -#: mafiasi/dashboard/templates/dashboard/index.html:64 +#: mafiasi/dashboard/templates/dashboard/index.html:66 #: mafiasi/gprot/templates/gprot/menu.html:4 #: mafiasi/pks/templates/pks/menu.html:4 #: mafiasi/pks/templates/pks/search.html:5 @@ -215,6 +215,10 @@ msgstr "Continue" msgid "Book Mafiasi Purple" msgstr "" +#: mafiasi/dashboard/templates/dashboard/may_day.html:10 +msgid "Server-Rooms are being occupied…" +msgstr "" + #: mafiasi/discourse/apps.py:11 msgid "Discourse" msgstr "Talks with frens 1" diff --git a/locale/fr_FR/LC_MESSAGES/django.po b/locale/fr_FR/LC_MESSAGES/django.po index 48a5624..153d0c0 100644 --- a/locale/fr_FR/LC_MESSAGES/django.po +++ b/locale/fr_FR/LC_MESSAGES/django.po @@ -2,7 +2,7 @@ msgid "" msgstr "" "Project-Id-Version: Mafiasi\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-04-01 02:46+0200\n" +"POT-Creation-Date: 2024-05-01 00:25+0200\n" "PO-Revision-Date: 2024-01-18 22:41+0100\n" "Last-Translator: Markus Neblung \n" "Language-Team: \n" @@ -175,23 +175,23 @@ msgstr "" msgid "Dashboard" msgstr "Dashboard" -#: mafiasi/dashboard/templates/dashboard/index.html:16 +#: mafiasi/dashboard/templates/dashboard/index.html:18 msgid "Services" msgstr "Services" -#: mafiasi/dashboard/templates/dashboard/index.html:33 +#: mafiasi/dashboard/templates/dashboard/index.html:35 msgid "Rearrange item" msgstr "Réorganiser" -#: mafiasi/dashboard/templates/dashboard/index.html:41 +#: mafiasi/dashboard/templates/dashboard/index.html:43 msgid "News and more" msgstr "Les nouvelles et plus" -#: mafiasi/dashboard/templates/dashboard/index.html:57 +#: mafiasi/dashboard/templates/dashboard/index.html:59 msgid "Wiki search" msgstr "Recherche Wiki" -#: mafiasi/dashboard/templates/dashboard/index.html:64 +#: mafiasi/dashboard/templates/dashboard/index.html:66 #: mafiasi/gprot/templates/gprot/menu.html:4 #: mafiasi/pks/templates/pks/menu.html:4 #: mafiasi/pks/templates/pks/search.html:5 @@ -225,6 +225,10 @@ msgstr "Continuer avec les annonces" msgid "Book Mafiasi Purple" msgstr "Livre Mafiasi Purple" +#: mafiasi/dashboard/templates/dashboard/may_day.html:10 +msgid "Server-Rooms are being occupied…" +msgstr "" + #: mafiasi/discourse/apps.py:11 msgid "Discourse" msgstr "Discourse" diff --git a/mafiasi/base/special_day_middleware.py b/mafiasi/base/special_day_middleware.py index 7dd9860..d1f7f32 100644 --- a/mafiasi/base/special_day_middleware.py +++ b/mafiasi/base/special_day_middleware.py @@ -55,6 +55,9 @@ def __call__(self, request): # winter season if n.month == 12 and n.day >= 10: feature = "winter" + # may day (tag der arbeit) + if n.month == 5 and n.day == 1: + feature = "mayDay" # make sure session hold the current feature request.session["specialFeature"] = feature diff --git a/mafiasi/dashboard/templates/dashboard/index.html b/mafiasi/dashboard/templates/dashboard/index.html index 3b6ffa7..753f6f0 100644 --- a/mafiasi/dashboard/templates/dashboard/index.html +++ b/mafiasi/dashboard/templates/dashboard/index.html @@ -9,6 +9,8 @@ {% block content %} {% if request.session.specialFeature == 'mafiasiPurple' %} {% include "dashboard/mafiasi_purple.html" %} +{% elif request.session.specialFeature == 'mayDay' %} + {% include "dashboard/may_day.html" %} {% endif %}
diff --git a/mafiasi/dashboard/templates/dashboard/may_day.html b/mafiasi/dashboard/templates/dashboard/may_day.html new file mode 100644 index 0000000..c564afe --- /dev/null +++ b/mafiasi/dashboard/templates/dashboard/may_day.html @@ -0,0 +1,71 @@ +{% load i18n %} + +
+ + + + +

+ {%translate "Server-Rooms are being occupied…" %} +

+
+ +