parent
5a6f33f8e2
commit
956ec7210c
@ -232,7 +232,7 @@ class EventModerateForm(ModelForm):
|
||||
|
||||
new_tags = MultipleChoiceFieldAcceptAll(
|
||||
label=_("New tags"),
|
||||
help_text=_('Create new labels (sparingly).'),
|
||||
help_text=_('Create new labels (sparingly). Note: by starting your tag with the characters “TW:”, you''ll create a “trigger warning” tag, and the associated events will be announced as such.'),
|
||||
widget=DynamicArrayWidget(),
|
||||
required=False
|
||||
)
|
||||
|
@ -8,7 +8,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: agenda_culturel\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2024-11-17 22:38+0100\n"
|
||||
"POT-Creation-Date: 2024-11-17 23:43+0100\n"
|
||||
"PO-Revision-Date: 2023-10-29 14:16+0000\n"
|
||||
"Last-Translator: Jean-Marie Favreau <jeanmarie.favreau@free.fr>\n"
|
||||
"Language-Team: Jean-Marie Favreau <jeanmarie.favreau@free.fr>\n"
|
||||
@ -182,8 +182,15 @@ msgid "New tags"
|
||||
msgstr "Nouvelles étiquettes"
|
||||
|
||||
#: agenda_culturel/forms.py:235
|
||||
msgid "Create new labels (sparingly)."
|
||||
msgstr "Créer (avec parcimonie) de nouvelles étiquettes."
|
||||
msgid ""
|
||||
"Create new labels (sparingly). Note: by starting your tag with the "
|
||||
"characters “TW:”, youll create a “trigger warning” tag, and the associated "
|
||||
"events will be announced as such."
|
||||
msgstr ""
|
||||
"Créer (avec parcimonie) de nouvelles étiquettes. "
|
||||
"Remarque: en faisant commencer votre étiquette par les caractères “TW:”, "
|
||||
"vous créerez une étiquette “trigger warning”, et les événements associés "
|
||||
"seront annoncés comme tels."
|
||||
|
||||
#: agenda_culturel/forms.py:275
|
||||
msgid "JSON in the format expected for the import."
|
||||
@ -1007,44 +1014,44 @@ msgstr "Les propriétés du message de contact ont été modifié avec succès."
|
||||
msgid "Spam has been successfully deleted."
|
||||
msgstr "Le spam a été supprimé avec succès"
|
||||
|
||||
#: agenda_culturel/views.py:1000
|
||||
#: agenda_culturel/views.py:1004
|
||||
msgid "The import has been run successfully."
|
||||
msgstr "L'import a été lancé avec succès"
|
||||
|
||||
#: agenda_culturel/views.py:1019
|
||||
#: agenda_culturel/views.py:1023
|
||||
msgid "The import has been canceled."
|
||||
msgstr "L'import a été annulé"
|
||||
|
||||
#: agenda_culturel/views.py:1093
|
||||
#: agenda_culturel/views.py:1097
|
||||
msgid "The recurrent import has been successfully modified."
|
||||
msgstr "L'import récurrent a été modifié avec succès."
|
||||
|
||||
#: agenda_culturel/views.py:1102
|
||||
#: agenda_culturel/views.py:1106
|
||||
msgid "The recurrent import has been successfully deleted."
|
||||
msgstr "L'import récurrent a été supprimé avec succès"
|
||||
|
||||
#: agenda_culturel/views.py:1142
|
||||
#: agenda_culturel/views.py:1146
|
||||
msgid "The import has been launched."
|
||||
msgstr "L'import a été lancé"
|
||||
|
||||
#: agenda_culturel/views.py:1164
|
||||
#: agenda_culturel/views.py:1168
|
||||
msgid "Imports has been launched."
|
||||
msgstr "Les imports ont été lancés"
|
||||
|
||||
#: agenda_culturel/views.py:1223
|
||||
#: agenda_culturel/views.py:1227
|
||||
msgid "Update successfully completed."
|
||||
msgstr "Mise à jour réalisée avec succès."
|
||||
|
||||
#: agenda_culturel/views.py:1281
|
||||
#: agenda_culturel/views.py:1285
|
||||
msgid "Creation of a merged event has been successfully completed."
|
||||
msgstr "Création d'un événement fusionné réalisée avec succès."
|
||||
|
||||
#: agenda_culturel/views.py:1317
|
||||
#: agenda_culturel/views.py:1321
|
||||
msgid "Events have been marked as unduplicated."
|
||||
msgstr "Les événements ont été marqués comme non dupliqués."
|
||||
|
||||
#: agenda_culturel/views.py:1331 agenda_culturel/views.py:1340
|
||||
#: agenda_culturel/views.py:1358
|
||||
#: agenda_culturel/views.py:1335 agenda_culturel/views.py:1344
|
||||
#: agenda_culturel/views.py:1362
|
||||
msgid ""
|
||||
"The selected item is no longer included in the list of duplicates. Someone "
|
||||
"else has probably modified the list in the meantime."
|
||||
@ -1052,23 +1059,23 @@ msgstr ""
|
||||
"L'élément sélectionné ne fait plus partie de la liste des dupliqués. Une "
|
||||
"autre personne a probablement modifié la liste entre temps."
|
||||
|
||||
#: agenda_culturel/views.py:1334
|
||||
#: agenda_culturel/views.py:1338
|
||||
msgid "The selected event has been set as representative"
|
||||
msgstr "L'événement sélectionné a été défini comme representatif."
|
||||
|
||||
#: agenda_culturel/views.py:1349
|
||||
#: agenda_culturel/views.py:1353
|
||||
msgid "The event has been withdrawn from the group and made independent."
|
||||
msgstr "L'événement a été retiré du groupe et rendu indépendant."
|
||||
|
||||
#: agenda_culturel/views.py:1393
|
||||
#: agenda_culturel/views.py:1397
|
||||
msgid "Cleaning up duplicates: {} item(s) fixed."
|
||||
msgstr "Nettoyage des dupliqués: {} élément(s) corrigé(s)."
|
||||
|
||||
#: agenda_culturel/views.py:1442
|
||||
#: agenda_culturel/views.py:1446
|
||||
msgid "The event was successfully duplicated."
|
||||
msgstr "L'événement a été marqué dupliqué avec succès."
|
||||
|
||||
#: agenda_culturel/views.py:1450
|
||||
#: agenda_culturel/views.py:1454
|
||||
msgid ""
|
||||
"The event has been successfully flagged as a duplicate. The moderation team "
|
||||
"will deal with your suggestion shortly."
|
||||
@ -1076,32 +1083,32 @@ msgstr ""
|
||||
"L'événement a été signalé comme dupliqué avec succès. Votre suggestion sera "
|
||||
"prochainement prise en charge par l'équipe de modération."
|
||||
|
||||
#: agenda_culturel/views.py:1503
|
||||
#: agenda_culturel/views.py:1507
|
||||
msgid "The categorisation rule has been successfully modified."
|
||||
msgstr "La règle de catégorisation a été modifiée avec succès."
|
||||
|
||||
#: agenda_culturel/views.py:1512
|
||||
#: agenda_culturel/views.py:1516
|
||||
msgid "The categorisation rule has been successfully deleted."
|
||||
msgstr "La règle de catégorisation a été supprimée avec succès"
|
||||
|
||||
#: agenda_culturel/views.py:1534
|
||||
#: agenda_culturel/views.py:1538
|
||||
msgid "The rules were successfully applied and 1 event was categorised."
|
||||
msgstr ""
|
||||
"Les règles ont été appliquées avec succès et 1 événement a été catégorisé"
|
||||
|
||||
#: agenda_culturel/views.py:1541
|
||||
#: agenda_culturel/views.py:1545
|
||||
msgid "The rules were successfully applied and {} events were categorised."
|
||||
msgstr ""
|
||||
"Les règles ont été appliquées avec succès et {} événements ont été "
|
||||
"catégorisés"
|
||||
|
||||
#: agenda_culturel/views.py:1548 agenda_culturel/views.py:1601
|
||||
#: agenda_culturel/views.py:1552 agenda_culturel/views.py:1605
|
||||
msgid "The rules were successfully applied and no events were categorised."
|
||||
msgstr ""
|
||||
"Les règles ont été appliquées avec succès et aucun événement n'a été "
|
||||
"catégorisé"
|
||||
|
||||
#: agenda_culturel/views.py:1587
|
||||
#: agenda_culturel/views.py:1591
|
||||
msgid ""
|
||||
"The rules were successfully applied and 1 event with default category was "
|
||||
"categorised."
|
||||
@ -1109,7 +1116,7 @@ msgstr ""
|
||||
"Les règles ont été appliquées avec succès et 1 événement avec catégorie par "
|
||||
"défaut a été catégorisé"
|
||||
|
||||
#: agenda_culturel/views.py:1594
|
||||
#: agenda_culturel/views.py:1598
|
||||
msgid ""
|
||||
"The rules were successfully applied and {} events with default category were "
|
||||
"categorised."
|
||||
@ -1117,50 +1124,50 @@ msgstr ""
|
||||
"Les règles ont été appliquées avec succès et {} événements avec catégorie "
|
||||
"par défaut ont été catégorisés"
|
||||
|
||||
#: agenda_culturel/views.py:1683 agenda_culturel/views.py:1745
|
||||
#: agenda_culturel/views.py:1783
|
||||
#: agenda_culturel/views.py:1687 agenda_culturel/views.py:1749
|
||||
#: agenda_culturel/views.py:1787
|
||||
msgid "{} events have been updated."
|
||||
msgstr "{} événements ont été mis à jour."
|
||||
|
||||
#: agenda_culturel/views.py:1686 agenda_culturel/views.py:1747
|
||||
#: agenda_culturel/views.py:1786
|
||||
#: agenda_culturel/views.py:1690 agenda_culturel/views.py:1751
|
||||
#: agenda_culturel/views.py:1790
|
||||
msgid "1 event has been updated."
|
||||
msgstr "1 événement a été mis à jour"
|
||||
|
||||
#: agenda_culturel/views.py:1688 agenda_culturel/views.py:1749
|
||||
#: agenda_culturel/views.py:1788
|
||||
#: agenda_culturel/views.py:1692 agenda_culturel/views.py:1753
|
||||
#: agenda_culturel/views.py:1792
|
||||
msgid "No events have been modified."
|
||||
msgstr "Aucun événement n'a été modifié."
|
||||
|
||||
#: agenda_culturel/views.py:1697
|
||||
#: agenda_culturel/views.py:1701
|
||||
msgid "The place has been successfully updated."
|
||||
msgstr "Le lieu a été modifié avec succès."
|
||||
|
||||
#: agenda_culturel/views.py:1706
|
||||
#: agenda_culturel/views.py:1710
|
||||
msgid "The place has been successfully created."
|
||||
msgstr "Le lieu a été créé avec succès."
|
||||
|
||||
#: agenda_culturel/views.py:1771
|
||||
#: agenda_culturel/views.py:1775
|
||||
msgid "The selected place has been assigned to the event."
|
||||
msgstr "Le lieu sélectionné a été assigné à l'événement."
|
||||
|
||||
#: agenda_culturel/views.py:1775
|
||||
#: agenda_culturel/views.py:1779
|
||||
msgid "A new alias has been added to the selected place."
|
||||
msgstr "Un nouvel alias a été créé pour le lieu sélectionné."
|
||||
|
||||
#: agenda_culturel/views.py:1831
|
||||
#: agenda_culturel/views.py:1835
|
||||
msgid "The tag has been successfully updated."
|
||||
msgstr "L'étiquette a été modifiée avec succès."
|
||||
|
||||
#: agenda_culturel/views.py:1838
|
||||
#: agenda_culturel/views.py:1842
|
||||
msgid "The tag has been successfully created."
|
||||
msgstr "L'étiquette a été créée avec succès."
|
||||
|
||||
#: agenda_culturel/views.py:1901
|
||||
#: agenda_culturel/views.py:1906
|
||||
msgid "You have not modified the tag name."
|
||||
msgstr "Vous n'avez pas modifié le nom de l'étiquette."
|
||||
|
||||
#: agenda_culturel/views.py:1911
|
||||
#: agenda_culturel/views.py:1916
|
||||
msgid ""
|
||||
"This tag {} is already in use, and is described by different information "
|
||||
"from the current tag. You can force renaming by checking the corresponding "
|
||||
@ -1173,7 +1180,7 @@ msgstr ""
|
||||
"sera supprimée, et tous les événements associés à l'étiquette {} seront "
|
||||
"associés à l'étiquette {}."
|
||||
|
||||
#: agenda_culturel/views.py:1918
|
||||
#: agenda_culturel/views.py:1923
|
||||
msgid ""
|
||||
"This tag {} is already in use. You can force renaming by checking the "
|
||||
"corresponding option."
|
||||
@ -1181,6 +1188,11 @@ msgstr ""
|
||||
"Cette étiquette {} est déjà utilisée. Vous pouvez forcer le renommage en "
|
||||
"cochant l'option correspondante."
|
||||
|
||||
#: agenda_culturel/views.py:1941
|
||||
#: agenda_culturel/views.py:1946
|
||||
msgid "The tag {} has been successfully renamed to {}."
|
||||
msgstr "L'étiquette {} a été renommée avec succès en {}."
|
||||
|
||||
#: agenda_culturel/views.py:1980
|
||||
msgid "The tag {} has been successfully deleted."
|
||||
msgstr "L'événement {} a été supprimé avec succès."
|
||||
|
||||
|
@ -198,6 +198,7 @@ details[role="list"] summary + ul li.selected>a:hover {
|
||||
@extend .outline;
|
||||
font-size: 90%;
|
||||
padding: 0.15em 0.4em 0.3em 0.4em;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
|
||||
@ -871,6 +872,7 @@ nav>div {
|
||||
}
|
||||
|
||||
|
||||
|
||||
.badge.error {
|
||||
background: #b71c1c;
|
||||
border-color: #cb1b1b;
|
||||
@ -882,6 +884,25 @@ nav>div {
|
||||
color: var(--secondary-inverse);
|
||||
}
|
||||
|
||||
.tw-badge {
|
||||
background: black;
|
||||
border-color: black;
|
||||
color: #f2f207;
|
||||
font-weight: bold;
|
||||
padding: 0.2em 0.4em;
|
||||
font-size: 60%;
|
||||
opacity: 80%;
|
||||
}
|
||||
|
||||
.tw-prefix {
|
||||
background: black;
|
||||
color: #f2f207;
|
||||
height: 2.1em;
|
||||
margin: -0.5em 0 -0.5em -0.5em;
|
||||
padding: 0.3em;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
form [role="button"], form button {
|
||||
margin: var(--spacing) 0 var(--spacing) 0;
|
||||
}
|
||||
|
@ -44,7 +44,7 @@
|
||||
{% if event.start_day == day.date and event.start_time %}
|
||||
{{ event.start_time }}
|
||||
{% endif %}
|
||||
<a href="{{ event.get_absolute_url }}">{{ event|picto_status }} {{ event.title }}</a>
|
||||
<a href="{{ event.get_absolute_url }}">{{ event|picto_status }} {{ event.title }} {{ event|tw_badge }}</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
@ -67,6 +67,7 @@
|
||||
{{ event.start_time }}
|
||||
{% endif %}
|
||||
{{ event|picto_status }} <a href="{{ event.get_absolute_url }}" data-target="event-{{ event.id }}" onClick="toggleModal(event)">{{ event.title }}</a>
|
||||
{{ event|tw_badge }}
|
||||
<dialog id="event-{{ event.id }}">
|
||||
{% include "agenda_culturel/single-event/event-modal-inc.html" with event=event filter=filter %}
|
||||
</dialog>
|
||||
|
@ -4,6 +4,7 @@
|
||||
|
||||
{% load cat_extra %}
|
||||
{% load utils_extra %}
|
||||
{% load tag_extra %}
|
||||
|
||||
{% block entete_header %}
|
||||
{% css_categories %}
|
||||
@ -43,7 +44,7 @@
|
||||
<li><strong>Catégorie :</strong> {{ object.defaultCategory }}</li>
|
||||
<li><strong>Étiquettes :</strong>
|
||||
{% for tag in object.defaultTags %}
|
||||
{{ tag }}{% if not forloop.last %}, {% endif %}
|
||||
{{ tag|tw_highlight }}{% if not forloop.last %}, {% endif %}
|
||||
{% endfor %}
|
||||
</li>
|
||||
</ul>
|
||||
|
@ -101,7 +101,7 @@
|
||||
{% if event.start_time %}
|
||||
{{ event.start_time }}
|
||||
{% endif %}
|
||||
{{ event|picto_status }} <a href="#event-{{ event.id }}">{{ event.title }}</a>
|
||||
{{ event|picto_status }} <a href="#event-{{ event.id }}">{{ event.title }}</a> {{ event|tw_badge }}
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
|
@ -57,7 +57,7 @@
|
||||
<div class="infos">
|
||||
<p>
|
||||
{% for tag in event.tags %}
|
||||
<a href="{% url 'view_tag' tag|prepare_tag %}" role="button" class="small-cat">{{ tag }}</a>
|
||||
<a href="{% url 'view_tag' tag|prepare_tag %}" role="button" class="small-cat">{{ tag|tw_highlight }}</a>
|
||||
{% endfor %}
|
||||
</p>
|
||||
|
||||
|
@ -37,7 +37,7 @@
|
||||
<p class="subentry-search">
|
||||
{% picto_from_name "tag" %}
|
||||
{% for tag in event.tags %}
|
||||
<a href="{% url 'view_tag' tag|prepare_tag %}">{{ tag }}</a>
|
||||
<a href="{% url 'view_tag' tag|prepare_tag %}">{{ tag|tw_highlight }}</a>
|
||||
{% if not forloop.last %}, {% endif %}
|
||||
{% endfor %}
|
||||
</p>
|
||||
|
@ -39,7 +39,7 @@
|
||||
<p>
|
||||
{% picto_from_name "tag" %}
|
||||
{% for tag in event.tags %}
|
||||
<a href="{% url 'view_tag' tag|prepare_tag %}">{{ tag }}</a>
|
||||
<a href="{% url 'view_tag' tag|prepare_tag %}">{{ tag|tw_highlight }}</a>
|
||||
{% if not forloop.last %}, {% endif %}
|
||||
{% endfor %}
|
||||
</p>
|
||||
|
@ -66,7 +66,7 @@
|
||||
|
||||
<p>
|
||||
{% for tag in event.tags %}
|
||||
<a href="{% url 'view_tag' tag|prepare_tag %}" role="button" class="small-cat">{{ tag }}</a>
|
||||
<a href="{% url 'view_tag' tag|prepare_tag %}" role="button" class="small-cat">{{ tag|tw_highlight }}</a>
|
||||
{% endfor %}
|
||||
</p>
|
||||
|
||||
|
@ -1,5 +1,7 @@
|
||||
{% extends "agenda_culturel/page.html" %}
|
||||
|
||||
{% load tag_extra %}
|
||||
|
||||
{% block title %}{% block og_title %}Les événements {{ tag }}{% endblock %}{% endblock %}
|
||||
|
||||
{% load cat_extra %}
|
||||
|
@ -164,3 +164,10 @@ def only_allowed(elist, is_authenticated):
|
||||
return [e for e in elist if e.status == Event.STATUS.PUBLISHED]
|
||||
else:
|
||||
return elist
|
||||
|
||||
@register.filter
|
||||
def tw_badge(event):
|
||||
if event.tags and len([t for t in event.tags if t.startswith("TW:")]) > 0:
|
||||
return mark_safe('<span class="badge tw-badge">TW</span>')
|
||||
else:
|
||||
return ""
|
@ -69,3 +69,10 @@ def show_suggested_tags(filter):
|
||||
@register.filter
|
||||
def prepare_tag(tag):
|
||||
return tag.replace('/', '-')
|
||||
|
||||
@register.filter
|
||||
def tw_highlight(tag):
|
||||
if tag.startswith('TW:'):
|
||||
return mark_safe('<span class="tw-prefix">TW:</span>' + tag[3:])
|
||||
else:
|
||||
return tag
|
Loading…
Reference in New Issue
Block a user