diff --git a/locale/de_DE/LC_MESSAGES/django.po b/locale/de_DE/LC_MESSAGES/django.po index 3271767..ba0c401 100644 --- a/locale/de_DE/LC_MESSAGES/django.po +++ b/locale/de_DE/LC_MESSAGES/django.po @@ -3,16 +3,16 @@ msgid "" msgstr "" "Project-Id-Version: Mafiasi\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-04-01 01:46+0200\n" -"PO-Revision-Date: 2024-01-12 16:56+0100\n" -"Last-Translator: Timon Engelke \n" +"POT-Creation-Date: 2024-04-01 02:11+0200\n" +"PO-Revision-Date: 2024-01-18 22:42+0100\n" +"Last-Translator: Markus Neblung \n" "Language-Team: \n" "Language: de_DE\n" "MIME-Version: 1.0\n" "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.4.1\n" +"X-Generator: Poedit 3.0.1\n" #: mafiasi/base/middleware.py:18 msgid "" @@ -169,29 +169,55 @@ msgstr "Mit dem BitPoll kannst du einfach gemeinsame Termine finden." msgid "Dashboard" msgstr "Dashboard" -#: mafiasi/dashboard/templates/dashboard/index.html:13 +#: mafiasi/dashboard/templates/dashboard/index.html:16 msgid "Services" msgstr "Dienste" -#: mafiasi/dashboard/templates/dashboard/index.html:30 +#: mafiasi/dashboard/templates/dashboard/index.html:33 msgid "Rearrange item" msgstr "Dienst umordnen" -#: mafiasi/dashboard/templates/dashboard/index.html:38 +#: mafiasi/dashboard/templates/dashboard/index.html:41 msgid "News and more" msgstr "Aktuelles und mehr" -#: mafiasi/dashboard/templates/dashboard/index.html:54 +#: mafiasi/dashboard/templates/dashboard/index.html:57 msgid "Wiki search" msgstr "Wiki-Suche" -#: mafiasi/dashboard/templates/dashboard/index.html:61 +#: mafiasi/dashboard/templates/dashboard/index.html:64 #: mafiasi/gprot/templates/gprot/menu.html:4 #: mafiasi/pks/templates/pks/menu.html:4 #: mafiasi/pks/templates/pks/search.html:5 msgid "Search" msgstr "Suche" +#: mafiasi/dashboard/templates/dashboard/mafiasi_purple.html:8 +msgid "" +"From today we offer Mafiasi Purple for ✨ only 42€ per month ✨ " +"to finance the Server-AG! You can support us by subscribing to Mafiasi " +"Purple." +msgstr "" +"Ab heute bieten wir Mafiasi Purple für ✨ nur 42€ im Monat ✨ " +"zur Finanzierung der Server-AG an! Du kannst uns unterstützen, indem du " +"Mafiasi Purple abbonierst." + +#: mafiasi/dashboard/templates/dashboard/mafiasi_purple.html:9 +msgid "" +"For people who want to continue using Mafiasi for free, we are offering " +"Mafiasi with advertising from today. The choice is yours!" +msgstr "" +"Für Leute, die Mafiasi weiterhin kostenlos nutzen wollen, bieten wir Mafiasi " +"ab heute mit Werbung an. Du hast die Wahl!" + +#: mafiasi/dashboard/templates/dashboard/mafiasi_purple.html:12 +msgid "Continue with ads" +msgstr "Weiter mit Werbung" + +#: mafiasi/dashboard/templates/dashboard/mafiasi_purple.html:15 +msgid "Book Mafiasi Purple" +msgstr "Mafiasi Purple buchen" + #: 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 9130c9f..03c828f 100644 --- a/locale/en_US/LC_MESSAGES/django.po +++ b/locale/en_US/LC_MESSAGES/django.po @@ -2,9 +2,9 @@ msgid "" msgstr "" "Project-Id-Version: Mafiasi\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-04-01 01:46+0200\n" -"PO-Revision-Date: 2024-01-12 17:06+0100\n" -"Last-Translator: Timon Engelke \n" +"POT-Creation-Date: 2024-04-01 02:11+0200\n" +"PO-Revision-Date: 2024-01-18 22:42+0100\n" +"Last-Translator: Markus Neblung \n" "Language-Team: \n" "Language: en\n" "MIME-Version: 1.0\n" @@ -155,29 +155,50 @@ msgstr "" msgid "Dashboard" msgstr "" -#: mafiasi/dashboard/templates/dashboard/index.html:13 +#: mafiasi/dashboard/templates/dashboard/index.html:16 msgid "Services" msgstr "" -#: mafiasi/dashboard/templates/dashboard/index.html:30 +#: mafiasi/dashboard/templates/dashboard/index.html:33 msgid "Rearrange item" msgstr "" -#: mafiasi/dashboard/templates/dashboard/index.html:38 +#: mafiasi/dashboard/templates/dashboard/index.html:41 msgid "News and more" msgstr "" -#: mafiasi/dashboard/templates/dashboard/index.html:54 +#: mafiasi/dashboard/templates/dashboard/index.html:57 msgid "Wiki search" msgstr "" -#: mafiasi/dashboard/templates/dashboard/index.html:61 +#: mafiasi/dashboard/templates/dashboard/index.html:64 #: mafiasi/gprot/templates/gprot/menu.html:4 #: mafiasi/pks/templates/pks/menu.html:4 #: mafiasi/pks/templates/pks/search.html:5 msgid "Search" msgstr "" +#: mafiasi/dashboard/templates/dashboard/mafiasi_purple.html:8 +msgid "" +"From today we offer Mafiasi Purple for ✨ only 42€ per month ✨ " +"to finance the Server-AG! You can support us by subscribing to Mafiasi " +"Purple." +msgstr "" + +#: mafiasi/dashboard/templates/dashboard/mafiasi_purple.html:9 +msgid "" +"For people who want to continue using Mafiasi for free, we are offering " +"Mafiasi with advertising from today. The choice is yours!" +msgstr "" + +#: mafiasi/dashboard/templates/dashboard/mafiasi_purple.html:12 +msgid "Continue with ads" +msgstr "" + +#: mafiasi/dashboard/templates/dashboard/mafiasi_purple.html:15 +msgid "Book Mafiasi Purple" +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 b538411..f28a517 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 01:46+0200\n" +"POT-Creation-Date: 2024-04-01 02:11+0200\n" "PO-Revision-Date: 2024-01-09 22:14+0000\n" "Last-Translator: kritzl \n" "Language-Team: \n" @@ -169,29 +169,52 @@ msgstr "Pawl is helps u find dates with frens :*" msgid "Dashboard" msgstr "Homi UwU" -#: mafiasi/dashboard/templates/dashboard/index.html:13 +#: mafiasi/dashboard/templates/dashboard/index.html:16 msgid "Services" msgstr "Behold: my stuff! (●'◡'●)" -#: mafiasi/dashboard/templates/dashboard/index.html:30 +#: mafiasi/dashboard/templates/dashboard/index.html:33 msgid "Rearrange item" msgstr "Move thingy" -#: mafiasi/dashboard/templates/dashboard/index.html:38 +#: mafiasi/dashboard/templates/dashboard/index.html:41 msgid "News and more" msgstr "Meows and snacks" -#: mafiasi/dashboard/templates/dashboard/index.html:54 +#: mafiasi/dashboard/templates/dashboard/index.html:57 msgid "Wiki search" msgstr "Look up knowings" -#: mafiasi/dashboard/templates/dashboard/index.html:61 +#: mafiasi/dashboard/templates/dashboard/index.html:64 #: mafiasi/gprot/templates/gprot/menu.html:4 #: mafiasi/pks/templates/pks/menu.html:4 #: mafiasi/pks/templates/pks/search.html:5 msgid "Search" msgstr "Looksies" +#: mafiasi/dashboard/templates/dashboard/mafiasi_purple.html:8 +msgid "" +"From today we offer Mafiasi Purple for ✨ only 42€ per month ✨ " +"to finance the Server-AG! You can support us by subscribing to Mafiasi " +"Purple." +msgstr "" + +#: mafiasi/dashboard/templates/dashboard/mafiasi_purple.html:9 +msgid "" +"For people who want to continue using Mafiasi for free, we are offering " +"Mafiasi with advertising from today. The choice is yours!" +msgstr "" + +#: mafiasi/dashboard/templates/dashboard/mafiasi_purple.html:12 +#, fuzzy +#| msgid "Continue" +msgid "Continue with ads" +msgstr "Continue" + +#: mafiasi/dashboard/templates/dashboard/mafiasi_purple.html:15 +msgid "Book Mafiasi Purple" +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 a000f8e..9cc8167 100644 --- a/locale/fr_FR/LC_MESSAGES/django.po +++ b/locale/fr_FR/LC_MESSAGES/django.po @@ -2,9 +2,9 @@ msgid "" msgstr "" "Project-Id-Version: Mafiasi\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-04-01 01:46+0200\n" -"PO-Revision-Date: 2024-01-15 16:39+0100\n" -"Last-Translator: Timon Engelke \n" +"POT-Creation-Date: 2024-04-01 02:11+0200\n" +"PO-Revision-Date: 2024-01-18 22:41+0100\n" +"Last-Translator: Markus Neblung \n" "Language-Team: \n" "Language: fr_FR\n" "MIME-Version: 1.0\n" @@ -175,29 +175,56 @@ msgstr "" msgid "Dashboard" msgstr "Dashboard" -#: mafiasi/dashboard/templates/dashboard/index.html:13 +#: mafiasi/dashboard/templates/dashboard/index.html:16 msgid "Services" msgstr "Services" -#: mafiasi/dashboard/templates/dashboard/index.html:30 +#: mafiasi/dashboard/templates/dashboard/index.html:33 msgid "Rearrange item" msgstr "Réorganiser" -#: mafiasi/dashboard/templates/dashboard/index.html:38 +#: mafiasi/dashboard/templates/dashboard/index.html:41 msgid "News and more" msgstr "Les nouvelles et plus" -#: mafiasi/dashboard/templates/dashboard/index.html:54 +#: mafiasi/dashboard/templates/dashboard/index.html:57 msgid "Wiki search" msgstr "Recherche Wiki" -#: mafiasi/dashboard/templates/dashboard/index.html:61 +#: mafiasi/dashboard/templates/dashboard/index.html:64 #: mafiasi/gprot/templates/gprot/menu.html:4 #: mafiasi/pks/templates/pks/menu.html:4 #: mafiasi/pks/templates/pks/search.html:5 msgid "Search" msgstr "Recherche" +#: mafiasi/dashboard/templates/dashboard/mafiasi_purple.html:8 +msgid "" +"From today we offer Mafiasi Purple for ✨ only 42€ per month ✨ " +"to finance the Server-AG! You can support us by subscribing to Mafiasi " +"Purple." +msgstr "" +"A partir d'aujourd'hui, nous proposons Mafiasi Purple pour ✨ " +"seulement 42€ par mois ✨ pour financer le Server-AG ! Tu peux nous soutenir " +"en t'abonnant à Mafiasi Purple." + +#: mafiasi/dashboard/templates/dashboard/mafiasi_purple.html:9 +msgid "" +"For people who want to continue using Mafiasi for free, we are offering " +"Mafiasi with advertising from today. The choice is yours!" +msgstr "" +"Pour les personnes qui souhaitent continuer à utiliser Mafiasi gratuitement, " +"nous proposons Mafiasi avec de la publicité à partir d'aujourd'hui. A toi de " +"choisir !" + +#: mafiasi/dashboard/templates/dashboard/mafiasi_purple.html:12 +msgid "Continue with ads" +msgstr "Continuer avec les annonces" + +#: mafiasi/dashboard/templates/dashboard/mafiasi_purple.html:15 +msgid "Book Mafiasi Purple" +msgstr "Livre Mafiasi Purple" + #: 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 4f5bce5..b500bf7 100644 --- a/mafiasi/base/special_day_middleware.py +++ b/mafiasi/base/special_day_middleware.py @@ -10,27 +10,31 @@ def __init__(self, get_response): def __call__(self, request): request.session["specialDay"] = False - request.session["specialDayClasses"] = "" + request.session["specialFeature"] = False + request.session["specialFeatureClasses"] = "" # get date in current timezone n = localdate(now(), get_current_timezone()) # check if user disabled special day surprises via cookie - if not request.COOKIES.get("disable-specialday", False): + if not request.COOKIES.get("disable-special", False): # first of april (april fools) if n.day == 1 and n.month == 4: - request.session["specialDay"] = "aprilfools" - option = random.randint(0, 1) + request.session["specialDay"] = "April Fools" + option = random.randint(0, 2) if option == 0: - request.session["specialDayClasses"] += " first-of-april" + request.session["specialFeature"] = "upsideDown" + request.session["specialFeatureClasses"] += " first-of-april" elif option == 1: + request.session["specialFeature"] = "uwu" translation.activate("en-uwu") request.LANGUAGE_CODE = translation.get_language() + elif option == 2: + request.session["specialFeature"] = "mafiasiPurple" # winter season if n.month == 12 and n.day >= 10: - request.session["specialDay"] = "winter" - request.session["specialDayClasses"] += " snowing" + request.session["specialFeature"] = "winter" # call view response = self.get_response(request) diff --git a/mafiasi/base/static/css/main.css b/mafiasi/base/static/css/main.css index c435030..29ef17b 100644 --- a/mafiasi/base/static/css/main.css +++ b/mafiasi/base/static/css/main.css @@ -125,6 +125,6 @@ body { cursor: pointer; } -#specialday-off { +#specialfeature-off { margin-top: 14px; } diff --git a/mafiasi/base/static/js/misc.js b/mafiasi/base/static/js/misc.js index 3b9a53d..a1a19c0 100644 --- a/mafiasi/base/static/js/misc.js +++ b/mafiasi/base/static/js/misc.js @@ -8,12 +8,12 @@ function toggleTheme() { document.documentElement.dataset.theme = theme } -function disableSpecialDaySurprise() { +function disableSpecialFeature() { const tomorrow = new Date() tomorrow.setDate(tomorrow.getDate() + 1); tomorrow.setHours(0, 0, 0); - document.cookie = `disable-specialday=True; path=/; expires=${tomorrow.toUTCString()}; Secure`; + document.cookie = `disable-special=True; path=/; expires=${tomorrow.toUTCString()}; Secure`; window.location.reload() } -document.querySelector('#specialday-off').addEventListener('click', disableSpecialDaySurprise) +document.querySelector('#specialfeature-off').addEventListener('click', disableSpecialFeature) diff --git a/mafiasi/base/templates/base.html b/mafiasi/base/templates/base.html index 425342d..502ca65 100644 --- a/mafiasi/base/templates/base.html +++ b/mafiasi/base/templates/base.html @@ -22,7 +22,7 @@ - {% if request.session.specialDay == 'winter' %} + {% if request.session.specialFeature == 'winter' %} {% endif %} @@ -37,8 +37,8 @@ {% endif %}
{% value_from_settings PROJECT_BANNER %} - {% if request.session.specialDay %} - + {% if request.session.specialFeature %} + {% trans "Disable surprise" %} {% endif %} @@ -119,7 +119,7 @@

{% block ptitle %}{% endblock %}

- {% if request.session.specialDay == 'winter' %} + {% if request.session.specialFeature == 'winter' %} {% endif %} diff --git a/mafiasi/dashboard/templates/dashboard/index.html b/mafiasi/dashboard/templates/dashboard/index.html index c0c187a..3b6ffa7 100644 --- a/mafiasi/dashboard/templates/dashboard/index.html +++ b/mafiasi/dashboard/templates/dashboard/index.html @@ -7,11 +7,14 @@ {% endblock %} {% block content %} -
+{% if request.session.specialFeature == 'mafiasiPurple' %} + {% include "dashboard/mafiasi_purple.html" %} +{% endif %} +

{% trans "Services" %} - {% if request.session.specialDay == 'winter' %} + {% if request.session.specialFeature == 'winter' %} santa-hat {% endif %}

diff --git a/mafiasi/dashboard/templates/dashboard/mafiasi_purple.html b/mafiasi/dashboard/templates/dashboard/mafiasi_purple.html new file mode 100644 index 0000000..24143e1 --- /dev/null +++ b/mafiasi/dashboard/templates/dashboard/mafiasi_purple.html @@ -0,0 +1,159 @@ +{% load i18n %} + +
+
+
+
Mafiasi Purple
+
+ {% trans "From today we offer Mafiasi Purple for ✨ only 42€ per month ✨ to finance the Server-AG! You can support us by subscribing to Mafiasi Purple." %}
+ {% trans "For people who want to continue using Mafiasi for free, we are offering Mafiasi with advertising from today. The choice is yours!" %} +
+
+ +
+
+ +
+
+
+
+ + + +