From b23c322caac20fa1caf8e0aa611cfe3db577274c Mon Sep 17 00:00:00 2001 From: imperosol Date: Sun, 26 Jan 2025 00:10:01 +0100 Subject: [PATCH] Add a disclaimer when moderating weekly news --- com/templates/com/macros.jinja | 18 ++++++++++++++++++ locale/fr/LC_MESSAGES/django.po | 14 ++++++++++++-- 2 files changed, 30 insertions(+), 2 deletions(-) diff --git a/com/templates/com/macros.jinja b/com/templates/com/macros.jinja index 388267d2..46f4b7c4 100644 --- a/com/templates/com/macros.jinja +++ b/com/templates/com/macros.jinja @@ -44,6 +44,24 @@ It will stay hidden for other users until it has been moderated. {% endtrans %}

+ {% if user.has_perm("com.moderate_news") %} + {# This is an additional query for each non-moderated news, + but it will be executed only for admin users, and only one time + (if they do their job and moderated news as soon as they see them), + so it's still reasonable #} + {% set nb_event=news.dates.count() %} + {% if nb_event > 1 %} +
+ {% trans %}Weekly event{% endtrans %} +

+ {% trans trimmed nb=nb_event %} + This event will take place every week for {{ nb }} weeks. + If you moderate or delete this event, + it will also be moderated (or deleted) for the following weeks. + {% endtrans %} +

+ {% endif %} + {% endif %} {% if user.has_perm("com.moderate_news") %} diff --git a/locale/fr/LC_MESSAGES/django.po b/locale/fr/LC_MESSAGES/django.po index 134a903b..69fc684f 100644 --- a/locale/fr/LC_MESSAGES/django.po +++ b/locale/fr/LC_MESSAGES/django.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-01-20 17:35+0100\n" +"POT-Creation-Date: 2025-01-25 23:46+0100\n" "PO-Revision-Date: 2016-07-18\n" "Last-Translator: Maréchal \n" @@ -1263,7 +1263,7 @@ msgstr "Format : 16:9 | Résolution : 1920x1080" msgid "Start date" msgstr "Date de début" -#: com/forms.py +#: com/forms.py com/templates/com/macros.jinja msgid "Weekly event" msgstr "Événement Hebdomadaire" @@ -1422,6 +1422,16 @@ msgstr "" "Elle sera cachée pour les autres utilisateurs tant qu'elle ne sera pas " "modérée." +#: com/templates/com/macros.jinja +#, python-format +msgid "" +"This event will take place every week for %(nb)s weeks. If you moderate or delete " +"this event, it will also be moderated (or deleted) for the following weeks." +msgstr "" +"Cet événement se déroulera chaque semaine pendant %(nb)s semaines. Si vous " +"modérez ou supprimez cet événement, il sera également modéré (ou supprimé) " +"pour les semaines suivantes." + #: com/templates/com/macros.jinja com/templates/com/mailing_admin.jinja #: com/templates/com/news_admin_list.jinja com/templates/com/news_detail.jinja #: core/templates/core/file_detail.jinja