diff --git a/src/agenda_culturel/locale/fr/LC_MESSAGES/django.po b/src/agenda_culturel/locale/fr/LC_MESSAGES/django.po index fe50f5e..164761d 100644 --- a/src/agenda_culturel/locale/fr/LC_MESSAGES/django.po +++ b/src/agenda_culturel/locale/fr/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: agenda_culturel\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-12-28 18:44+0100\n" +"POT-Creation-Date: 2024-12-29 01:06+0100\n" "PO-Revision-Date: 2023-10-29 14:16+0000\n" "Last-Translator: Jean-Marie Favreau \n" "Language-Team: Jean-Marie Favreau \n" @@ -110,7 +110,7 @@ msgstr "Non" msgid "Imported from" msgstr "Importé depuis" -#: agenda_culturel/filters.py:367 agenda_culturel/models.py:1883 +#: agenda_culturel/filters.py:367 agenda_culturel/models.py:1928 msgid "Closed" msgstr "Fermé" @@ -118,7 +118,7 @@ msgstr "Fermé" msgid "Open" msgstr "Ouvert" -#: agenda_culturel/filters.py:372 agenda_culturel/models.py:1877 +#: agenda_culturel/filters.py:372 agenda_culturel/models.py:1922 msgid "Spam" msgstr "Spam" @@ -149,11 +149,11 @@ msgstr "" msgid "Your email" msgstr "Votre adresse email" -#: agenda_culturel/forms.py:135 agenda_culturel/models.py:1867 +#: agenda_culturel/forms.py:135 agenda_culturel/models.py:1912 msgid "Your email address" msgstr "Votre adresse email" -#: agenda_culturel/forms.py:141 agenda_culturel/models.py:1890 +#: agenda_culturel/forms.py:141 agenda_culturel/models.py:1935 msgid "Comments" msgstr "Commentaires" @@ -168,20 +168,20 @@ msgstr "" msgid "Receive notification of publication or leave a message for moderation" msgstr "Être notifié de la publication ou laisser un message à la modération" -#: agenda_culturel/forms.py:171 agenda_culturel/models.py:180 -#: agenda_culturel/models.py:622 agenda_culturel/models.py:2008 -#: agenda_culturel/models.py:2118 +#: agenda_culturel/forms.py:171 agenda_culturel/models.py:185 +#: agenda_culturel/models.py:627 agenda_culturel/models.py:2053 +#: agenda_culturel/models.py:2163 msgid "Category" msgstr "Catégorie" #: agenda_culturel/forms.py:177 agenda_culturel/forms.py:211 #: agenda_culturel/forms.py:242 agenda_culturel/forms.py:402 -#: agenda_culturel/models.py:221 agenda_culturel/models.py:730 +#: agenda_culturel/models.py:226 agenda_culturel/models.py:735 msgid "Tags" msgstr "Étiquettes" #: agenda_culturel/forms.py:188 agenda_culturel/forms.py:549 -#: agenda_culturel/models.py:814 +#: agenda_culturel/models.py:819 msgid "Event" msgstr "Événement" @@ -205,16 +205,16 @@ msgstr "Cet événement est récurrent" msgid "Details" msgstr "Détails" -#: agenda_culturel/forms.py:324 agenda_culturel/models.py:652 -#: agenda_culturel/models.py:1983 +#: agenda_culturel/forms.py:324 agenda_culturel/models.py:657 +#: agenda_culturel/models.py:2028 msgid "Location" msgstr "Localisation" -#: agenda_culturel/forms.py:328 agenda_culturel/models.py:685 +#: agenda_culturel/forms.py:328 agenda_culturel/models.py:690 msgid "Illustration" msgstr "Illustration" -#: agenda_culturel/forms.py:332 agenda_culturel/models.py:722 +#: agenda_culturel/forms.py:332 agenda_culturel/models.py:727 msgid "URLs" msgstr "URLs" @@ -299,8 +299,8 @@ msgstr "Valeur de la version {}" msgid "Apply category {} to the event {}" msgstr "Appliquer la catégorie {} à l'événement {}" -#: agenda_culturel/forms.py:746 agenda_culturel/models.py:468 -#: agenda_culturel/models.py:2170 +#: agenda_culturel/forms.py:746 agenda_culturel/models.py:473 +#: agenda_culturel/models.py:2215 msgid "Place" msgstr "Lieu" @@ -322,7 +322,7 @@ msgstr "" msgid "Header" msgstr "Entête" -#: agenda_culturel/forms.py:804 agenda_culturel/models.py:441 +#: agenda_culturel/forms.py:804 agenda_culturel/models.py:446 msgid "Address" msgstr "Adresse" @@ -338,83 +338,83 @@ msgstr "Informations" msgid "Add a comment" msgstr "Ajouter un commentaire" -#: agenda_culturel/models.py:61 agenda_culturel/models.py:109 -#: agenda_culturel/models.py:190 agenda_culturel/models.py:411 -#: agenda_culturel/models.py:439 agenda_culturel/models.py:526 -#: agenda_culturel/models.py:1859 agenda_culturel/models.py:1937 +#: agenda_culturel/models.py:66 agenda_culturel/models.py:114 +#: agenda_culturel/models.py:195 agenda_culturel/models.py:416 +#: agenda_culturel/models.py:444 agenda_culturel/models.py:531 +#: agenda_culturel/models.py:1904 agenda_culturel/models.py:1982 msgid "Name" msgstr "Nom" -#: agenda_culturel/models.py:62 agenda_culturel/models.py:109 +#: agenda_culturel/models.py:67 agenda_culturel/models.py:114 msgid "Category name" msgstr "Nom de la catégorie" -#: agenda_culturel/models.py:67 +#: agenda_culturel/models.py:72 msgid "Content" msgstr "Contenu" -#: agenda_culturel/models.py:67 +#: agenda_culturel/models.py:72 msgid "Text as shown to the visitors" msgstr "Texte tel que présenté aux visiteureuses" -#: agenda_culturel/models.py:71 +#: agenda_culturel/models.py:76 msgid "URL path" msgstr "Chemin URL" -#: agenda_culturel/models.py:72 +#: agenda_culturel/models.py:77 msgid "URL path where the content is included." msgstr "Chemin URL où le contenu est présent." -#: agenda_culturel/models.py:76 +#: agenda_culturel/models.py:81 msgid "Static content" msgstr "Contenu statique" -#: agenda_culturel/models.py:77 +#: agenda_culturel/models.py:82 msgid "Static contents" msgstr "Contenus statiques" -#: agenda_culturel/models.py:113 +#: agenda_culturel/models.py:118 msgid "Color" msgstr "Couleur" -#: agenda_culturel/models.py:114 +#: agenda_culturel/models.py:119 msgid "Color used as background for the category" msgstr "Couleur utilisée comme fond de la catégorie" -#: agenda_culturel/models.py:120 +#: agenda_culturel/models.py:125 msgid "Pictogram" msgstr "Pictogramme" -#: agenda_culturel/models.py:121 +#: agenda_culturel/models.py:126 msgid "Pictogram of the category (svg format)" msgstr "Pictogramme de la catégorie (format svg)" -#: agenda_culturel/models.py:128 +#: agenda_culturel/models.py:133 msgid "Position for ordering categories" msgstr "Position pour ordonner les catégories" -#: agenda_culturel/models.py:181 +#: agenda_culturel/models.py:186 msgid "Categories" msgstr "Catégories" -#: agenda_culturel/models.py:190 +#: agenda_culturel/models.py:195 msgid "Tag name" msgstr "Nom de l'étiquette" -#: agenda_culturel/models.py:195 agenda_culturel/models.py:451 -#: agenda_culturel/models.py:538 agenda_culturel/models.py:669 +#: agenda_culturel/models.py:200 agenda_culturel/models.py:456 +#: agenda_culturel/models.py:543 agenda_culturel/models.py:674 msgid "Description" msgstr "Description" -#: agenda_culturel/models.py:196 +#: agenda_culturel/models.py:201 msgid "Description of the tag" msgstr "Description de l'étiquette" -#: agenda_culturel/models.py:202 +#: agenda_culturel/models.py:207 msgid "Principal" msgstr "Principal" -#: agenda_culturel/models.py:203 +#: agenda_culturel/models.py:208 msgid "" "This tag is highlighted as a main tag for visitors, particularly in the " "filter." @@ -422,91 +422,91 @@ msgstr "" "Cette étiquette est mise en avant comme étiquette principale pour les " "visiteurs, en particulier dans le filtre." -#: agenda_culturel/models.py:208 +#: agenda_culturel/models.py:213 msgid "In excluded suggestions" msgstr "Dans les suggestions d'exclusion" -#: agenda_culturel/models.py:209 +#: agenda_culturel/models.py:214 msgid "This tag will be part of the excluded suggestions." msgstr "Cette étiquette fera partie des suggestions d'exclusion." -#: agenda_culturel/models.py:214 +#: agenda_culturel/models.py:219 msgid "In included suggestions" msgstr "Dans les suggestions d'inclusion." -#: agenda_culturel/models.py:215 +#: agenda_culturel/models.py:220 msgid "This tag will be part of the included suggestions." msgstr "Cette étiquette fera partie des suggestions d'inclusion." -#: agenda_culturel/models.py:220 +#: agenda_culturel/models.py:225 msgid "Tag" msgstr "Étiquette" -#: agenda_culturel/models.py:266 +#: agenda_culturel/models.py:271 msgid "Suggestions" msgstr "Suggestions" -#: agenda_culturel/models.py:267 +#: agenda_culturel/models.py:272 msgid "Others" msgstr "Autres" -#: agenda_culturel/models.py:282 +#: agenda_culturel/models.py:287 msgid "Representative event" msgstr "Événement représentatif" -#: agenda_culturel/models.py:283 +#: agenda_culturel/models.py:288 msgid "This event is the representative event of the duplicated events group" msgstr "" "Cet événement est l'événement représentatif du groupe d'événements dupliqués." -#: agenda_culturel/models.py:290 agenda_culturel/models.py:291 +#: agenda_culturel/models.py:295 agenda_culturel/models.py:296 msgid "Duplicated events" msgstr "Événements dupliqués" -#: agenda_culturel/models.py:411 +#: agenda_culturel/models.py:416 msgid "Name of the location" msgstr "Nom de la position" -#: agenda_culturel/models.py:414 +#: agenda_culturel/models.py:419 msgid "Main" msgstr "Principale" -#: agenda_culturel/models.py:415 +#: agenda_culturel/models.py:420 msgid "This location is one of the main locations (shown first higher values)." msgstr "" "Cette position est une position principale (affichage en premier des plus " "grandes valeurs)." -#: agenda_culturel/models.py:419 +#: agenda_culturel/models.py:424 msgid "Suggested distance (km)" msgstr "" -#: agenda_culturel/models.py:420 +#: agenda_culturel/models.py:425 msgid "" "If this distance is given, this location is part of the suggested filters." msgstr "" -#: agenda_culturel/models.py:426 +#: agenda_culturel/models.py:431 msgid "Reference location" msgstr "Position de référence" -#: agenda_culturel/models.py:427 +#: agenda_culturel/models.py:432 msgid "Reference locations" msgstr "Positions de référence" -#: agenda_culturel/models.py:439 +#: agenda_culturel/models.py:444 msgid "Name of the place" msgstr "Nom du lieu" -#: agenda_culturel/models.py:442 +#: agenda_culturel/models.py:447 msgid "Address of this place (without city name)" msgstr "Adresse de ce lieu (sans le nom de la ville)" -#: agenda_culturel/models.py:446 +#: agenda_culturel/models.py:451 msgid "Postcode" msgstr "Code postal" -#: agenda_culturel/models.py:446 +#: agenda_culturel/models.py:451 msgid "" "The post code is not displayed, but makes it easier to find an address when " "you enter it." @@ -514,23 +514,23 @@ msgstr "" "Le code postal ne sera pas affiché, mais facilite la recherche d'adresse au " "moment de la saisie." -#: agenda_culturel/models.py:447 +#: agenda_culturel/models.py:452 msgid "City" msgstr "Ville" -#: agenda_culturel/models.py:447 +#: agenda_culturel/models.py:452 msgid "City name" msgstr "Nom de la ville" -#: agenda_culturel/models.py:452 +#: agenda_culturel/models.py:457 msgid "Description of the place, including accessibility." msgstr "Description du lieu, inclus l'accessibilité." -#: agenda_culturel/models.py:459 +#: agenda_culturel/models.py:464 msgid "Alternative names" msgstr "Noms alternatifs" -#: agenda_culturel/models.py:461 +#: agenda_culturel/models.py:466 msgid "" "Alternative names or addresses used to match a place with the free-form " "location of an event." @@ -538,31 +538,31 @@ msgstr "" "Noms et adresses alternatives qui seront utilisées pour associer une adresse " "avec la localisation en forme libre d'un événement" -#: agenda_culturel/models.py:469 +#: agenda_culturel/models.py:474 msgid "Places" msgstr "Lieux" -#: agenda_culturel/models.py:526 +#: agenda_culturel/models.py:531 msgid "Organisation name" msgstr "Nom de l'organisme" -#: agenda_culturel/models.py:530 +#: agenda_culturel/models.py:535 msgid "Website" msgstr "Site internet" -#: agenda_culturel/models.py:531 +#: agenda_culturel/models.py:536 msgid "Website of the organisation" msgstr "Site internet de l'organisme" -#: agenda_culturel/models.py:539 +#: agenda_culturel/models.py:544 msgid "Description of the organisation." msgstr "Description de l'organisme" -#: agenda_culturel/models.py:546 +#: agenda_culturel/models.py:551 msgid "Principal place" msgstr "Lieu principal" -#: agenda_culturel/models.py:547 +#: agenda_culturel/models.py:552 msgid "" "Place mainly associated with this organizer. Mainly used if there is a " "similarity in the name, to avoid redundant displays." @@ -570,75 +570,75 @@ msgstr "" "Lieu principalement associé à cet organisateur. Principalement utilisé s'il " "y a une similarité de nom, pour éviter les affichages redondants." -#: agenda_culturel/models.py:554 +#: agenda_culturel/models.py:559 msgid "Organisation" msgstr "Organisme" -#: agenda_culturel/models.py:555 +#: agenda_culturel/models.py:560 msgid "Organisations" msgstr "Organismes" -#: agenda_culturel/models.py:567 agenda_culturel/models.py:1978 +#: agenda_culturel/models.py:572 agenda_culturel/models.py:2023 msgid "Published" msgstr "Publié" -#: agenda_culturel/models.py:568 +#: agenda_culturel/models.py:573 msgid "Draft" msgstr "Brouillon" -#: agenda_culturel/models.py:569 +#: agenda_culturel/models.py:574 msgid "Trash" msgstr "Corbeille" -#: agenda_culturel/models.py:578 +#: agenda_culturel/models.py:583 msgid "Author of the event creation" msgstr "Auteur de la création de l'événement" -#: agenda_culturel/models.py:586 +#: agenda_culturel/models.py:591 msgid "Author of the last importation" msgstr "Auteur de la dernière importation" -#: agenda_culturel/models.py:594 +#: agenda_culturel/models.py:599 msgid "Author of the last modification" msgstr "Auteur de la dernière modification" -#: agenda_culturel/models.py:602 +#: agenda_culturel/models.py:607 msgid "Author of the last moderation" msgstr "Auteur de la dernière modération" -#: agenda_culturel/models.py:613 +#: agenda_culturel/models.py:618 msgid "Title" msgstr "Titre" -#: agenda_culturel/models.py:617 agenda_culturel/models.py:2086 +#: agenda_culturel/models.py:622 agenda_culturel/models.py:2131 msgid "Status" msgstr "Status" -#: agenda_culturel/models.py:629 +#: agenda_culturel/models.py:634 msgid "Start day" msgstr "Date de début" -#: agenda_culturel/models.py:632 +#: agenda_culturel/models.py:637 msgid "Start time" msgstr "Heure de début" -#: agenda_culturel/models.py:638 +#: agenda_culturel/models.py:643 msgid "End day" msgstr "Date de fin" -#: agenda_culturel/models.py:643 +#: agenda_culturel/models.py:648 msgid "End time" msgstr "Heure de fin" -#: agenda_culturel/models.py:647 +#: agenda_culturel/models.py:652 msgid "Recurrence" msgstr "Récurrence" -#: agenda_culturel/models.py:658 +#: agenda_culturel/models.py:663 msgid "Location (free form)" msgstr "Localisation (forme libre)" -#: agenda_culturel/models.py:660 +#: agenda_culturel/models.py:665 msgid "" "Address of the event in case its not available in the already known places " "(free form)" @@ -646,11 +646,11 @@ msgstr "" "Addresse d'un événement si elle n'est pas déjà présente dans la liste des " "lieux disponible (forme libre)" -#: agenda_culturel/models.py:677 +#: agenda_culturel/models.py:682 msgid "Organisers" msgstr "Organisateurs" -#: agenda_culturel/models.py:679 +#: agenda_culturel/models.py:684 msgid "" "list of event organisers. Organizers will only be displayed if one of them " "does not normally use the venue." @@ -658,63 +658,71 @@ msgstr "" "Liste des organisateurs de l'événements. Les organisateurs seront affichés " "uniquement si au moins un d'entre eux n'utilise pas habituellement le lieu." -#: agenda_culturel/models.py:692 +#: agenda_culturel/models.py:697 msgid "Illustration (URL)" msgstr "Illustration (URL)" -#: agenda_culturel/models.py:693 +#: agenda_culturel/models.py:698 msgid "External URL of the illustration image" msgstr "URL externe de l'image illustrative" -#: agenda_culturel/models.py:699 +#: agenda_culturel/models.py:704 msgid "Illustration description" msgstr "Description de l'illustration" -#: agenda_culturel/models.py:700 +#: agenda_culturel/models.py:705 msgid "Alternative text used by screen readers for the image" msgstr "Texte alternatif utiliser par les lecteurs d'écrans pour l'image" -#: agenda_culturel/models.py:708 +#: agenda_culturel/models.py:713 msgid "Importation source" msgstr "Source d'importation" -#: agenda_culturel/models.py:709 +#: agenda_culturel/models.py:714 msgid "Importation source used to detect removed entries." msgstr "Source d'importation utilisée pour détecter les éléments supprimés/" -#: agenda_culturel/models.py:715 +#: agenda_culturel/models.py:720 msgid "UUIDs" msgstr "UUIDs" -#: agenda_culturel/models.py:716 +#: agenda_culturel/models.py:721 msgid "UUIDs from import to detect duplicated entries." msgstr "UUIDs utilisés pendant l'import pour détecter les entrées dupliquées" -#: agenda_culturel/models.py:723 +#: agenda_culturel/models.py:728 msgid "List of all the urls where this event can be found." msgstr "Liste de toutes les urls où l'événement peut être trouvé." -#: agenda_culturel/models.py:737 +#: agenda_culturel/models.py:742 msgid "Other versions" msgstr "" -#: agenda_culturel/models.py:815 +#: agenda_culturel/models.py:820 msgid "Events" msgstr "Événements" -#: agenda_culturel/models.py:1288 +#: agenda_culturel/models.py:1173 +msgid "Your event has been published" +msgstr "Ton événement a été publié" + +#: agenda_culturel/models.py:1176 +msgid "Your message has not been retained" +msgstr "Ton événement n'a pas été retenu" + +#: agenda_culturel/models.py:1333 msgid "during import process" msgstr "pendant le processus d'import" -#: agenda_culturel/models.py:1626 +#: agenda_culturel/models.py:1671 msgid "Import" msgstr "Import" -#: agenda_culturel/models.py:1626 +#: agenda_culturel/models.py:1671 msgid "import process" msgstr "processus d'import" -#: agenda_culturel/models.py:1626 +#: agenda_culturel/models.py:1671 msgid "" "The duration of the event is a little too long for direct publication. " "Moderators can choose to publish it or not." @@ -722,135 +730,135 @@ msgstr "" "La durée de l'événement est un peu trop longue pour qu'il soit publié " "directement. Les modérateurs peuvent choisir de le publier ou non." -#: agenda_culturel/models.py:1824 agenda_culturel/models.py:1872 +#: agenda_culturel/models.py:1869 agenda_culturel/models.py:1917 msgid "Message" msgstr "Message" -#: agenda_culturel/models.py:1825 +#: agenda_culturel/models.py:1870 msgid "Messages" msgstr "Messages" -#: agenda_culturel/models.py:1836 +#: agenda_culturel/models.py:1881 msgid "Subject" msgstr "Sujet" -#: agenda_culturel/models.py:1837 +#: agenda_culturel/models.py:1882 msgid "The subject of your message" msgstr "Sujet de votre message" -#: agenda_culturel/models.py:1843 +#: agenda_culturel/models.py:1888 msgid "Related event" msgstr "Événement associé" -#: agenda_culturel/models.py:1844 +#: agenda_culturel/models.py:1889 msgid "The message is associated with this event." msgstr "Le message est associé à cet événement." -#: agenda_culturel/models.py:1852 +#: agenda_culturel/models.py:1897 msgid "Author of the message" msgstr "Auteur du message" -#: agenda_culturel/models.py:1860 +#: agenda_culturel/models.py:1905 msgid "Your name" msgstr "Votre nom" -#: agenda_culturel/models.py:1866 +#: agenda_culturel/models.py:1911 msgid "Email address" msgstr "Adresse email" -#: agenda_culturel/models.py:1872 +#: agenda_culturel/models.py:1917 msgid "Your message" msgstr "Votre message" -#: agenda_culturel/models.py:1878 +#: agenda_culturel/models.py:1923 msgid "This message is a spam." msgstr "Ce message est un spam." -#: agenda_culturel/models.py:1885 +#: agenda_culturel/models.py:1930 msgid "this message has been processed and no longer needs to be handled" msgstr "Ce message a été traité et ne nécessite plus d'être pris en charge" -#: agenda_culturel/models.py:1891 +#: agenda_culturel/models.py:1936 msgid "Comments on the message from the moderation team" msgstr "Commentaires sur ce message par l'équipe de modération" -#: agenda_culturel/models.py:1906 agenda_culturel/models.py:2066 +#: agenda_culturel/models.py:1951 agenda_culturel/models.py:2111 msgid "Recurrent import" msgstr "Import récurrent" -#: agenda_culturel/models.py:1907 +#: agenda_culturel/models.py:1952 msgid "Recurrent imports" msgstr "Imports récurrents" -#: agenda_culturel/models.py:1911 +#: agenda_culturel/models.py:1956 msgid "ical" msgstr "ical" -#: agenda_culturel/models.py:1912 +#: agenda_culturel/models.py:1957 msgid "ical no busy" msgstr "ical sans busy" -#: agenda_culturel/models.py:1913 +#: agenda_culturel/models.py:1958 msgid "ical no VC" msgstr "ical sans VC" -#: agenda_culturel/models.py:1914 +#: agenda_culturel/models.py:1959 msgid "lacoope.org" msgstr "lacoope.org" -#: agenda_culturel/models.py:1915 +#: agenda_culturel/models.py:1960 msgid "la comédie" msgstr "la comédie" -#: agenda_culturel/models.py:1916 +#: agenda_culturel/models.py:1961 msgid "le fotomat" msgstr "le fotomat" -#: agenda_culturel/models.py:1917 +#: agenda_culturel/models.py:1962 msgid "la puce à l'oreille" msgstr "la puce à loreille" -#: agenda_culturel/models.py:1918 +#: agenda_culturel/models.py:1963 msgid "Plugin wordpress MEC" msgstr "Plugin wordpress MEC" -#: agenda_culturel/models.py:1919 +#: agenda_culturel/models.py:1964 msgid "Événements d'une page FB" msgstr "Événements d'une page FB" -#: agenda_culturel/models.py:1920 +#: agenda_culturel/models.py:1965 msgid "la cour des 3 coquins" msgstr "la cour des 3 coquins" -#: agenda_culturel/models.py:1921 +#: agenda_culturel/models.py:1966 msgid "Arachnée concert" msgstr "Arachnée concert" -#: agenda_culturel/models.py:1922 +#: agenda_culturel/models.py:1967 msgid "Le Rio" msgstr "Le Rio" -#: agenda_culturel/models.py:1925 +#: agenda_culturel/models.py:1970 msgid "simple" msgstr "simple" -#: agenda_culturel/models.py:1926 +#: agenda_culturel/models.py:1971 msgid "Headless Chromium" msgstr "chromium sans interface" -#: agenda_culturel/models.py:1927 +#: agenda_culturel/models.py:1972 msgid "Headless Chromium (pause)" msgstr "chromium sans interface (pause)" -#: agenda_culturel/models.py:1932 +#: agenda_culturel/models.py:1977 msgid "daily" msgstr "chaque jour" -#: agenda_culturel/models.py:1934 +#: agenda_culturel/models.py:1979 msgid "weekly" msgstr "chaque semaine" -#: agenda_culturel/models.py:1939 +#: agenda_culturel/models.py:1984 msgid "" "Recurrent import name. Be careful to choose a name that is easy to " "understand, as it will be public and displayed on the sites About page." @@ -858,151 +866,151 @@ msgstr "" "Nom de l'import récurrent. Attention à choisir un nom compréhensible, car il " "sera public, et affiché sur la page à propos du site." -#: agenda_culturel/models.py:1946 +#: agenda_culturel/models.py:1991 msgid "Processor" msgstr "Processeur" -#: agenda_culturel/models.py:1949 +#: agenda_culturel/models.py:1994 msgid "Downloader" msgstr "Téléchargeur" -#: agenda_culturel/models.py:1956 +#: agenda_culturel/models.py:2001 msgid "Import recurrence" msgstr "Récurrence d'import" -#: agenda_culturel/models.py:1963 +#: agenda_culturel/models.py:2008 msgid "Source" msgstr "Source" -#: agenda_culturel/models.py:1964 +#: agenda_culturel/models.py:2009 msgid "URL of the source document" msgstr "URL du document source" -#: agenda_culturel/models.py:1968 +#: agenda_culturel/models.py:2013 msgid "Browsable url" msgstr "URL navigable" -#: agenda_culturel/models.py:1970 +#: agenda_culturel/models.py:2015 msgid "URL of the corresponding document that will be shown to visitors." msgstr "URL correspondant au document et qui sera montrée aux visiteurs" -#: agenda_culturel/models.py:1979 +#: agenda_culturel/models.py:2024 msgid "Status of each imported event (published or draft)" msgstr "Status de chaque événement importé (publié ou brouillon)" -#: agenda_culturel/models.py:1984 +#: agenda_culturel/models.py:2029 msgid "Address for each imported event" msgstr "Adresse de chaque événement importé" -#: agenda_culturel/models.py:1991 +#: agenda_culturel/models.py:2036 msgid "Force location" msgstr "Focer la localisation" -#: agenda_culturel/models.py:1992 +#: agenda_culturel/models.py:2037 msgid "force location even if another is detected." msgstr "Forcer la localisation même si une autre a été détectée." -#: agenda_culturel/models.py:1998 +#: agenda_culturel/models.py:2043 msgid "Organiser" msgstr "Organisateur" -#: agenda_culturel/models.py:1999 +#: agenda_culturel/models.py:2044 msgid "Organiser of each imported event" msgstr "Organisateur de chaque événement importé" -#: agenda_culturel/models.py:2009 +#: agenda_culturel/models.py:2054 msgid "Category of each imported event" msgstr "Catégorie de chaque événement importé" -#: agenda_culturel/models.py:2017 +#: agenda_culturel/models.py:2062 msgid "Tags for each imported event" msgstr "Étiquettes de chaque événement importé" -#: agenda_culturel/models.py:2018 +#: agenda_culturel/models.py:2063 msgid "A list of tags that describe each imported event." msgstr "Une liste d'étiquettes décrivant chaque événement importé" -#: agenda_culturel/models.py:2047 +#: agenda_culturel/models.py:2092 msgid "Running" msgstr "En cours" -#: agenda_culturel/models.py:2048 +#: agenda_culturel/models.py:2093 msgid "Canceled" msgstr "Annulé" -#: agenda_culturel/models.py:2049 +#: agenda_culturel/models.py:2094 msgid "Success" msgstr "Succès" -#: agenda_culturel/models.py:2050 +#: agenda_culturel/models.py:2095 msgid "Failed" msgstr "Erreur" -#: agenda_culturel/models.py:2053 +#: agenda_culturel/models.py:2098 msgid "Batch importation" msgstr "Importation par lot" -#: agenda_culturel/models.py:2054 +#: agenda_culturel/models.py:2099 msgid "Batch importations" msgstr "Importations par lot" -#: agenda_culturel/models.py:2067 +#: agenda_culturel/models.py:2112 msgid "Reference to the recurrent import processing" msgstr "Référence du processus d'import récurrent" -#: agenda_culturel/models.py:2075 +#: agenda_culturel/models.py:2120 msgid "URL (if not recurrent import)" msgstr "URL (si pas d'import récurrent)" -#: agenda_culturel/models.py:2077 +#: agenda_culturel/models.py:2122 msgid "Source URL if no RecurrentImport is associated." msgstr "URL source si aucun import récurrent n'est associé" -#: agenda_culturel/models.py:2090 +#: agenda_culturel/models.py:2135 msgid "Error message" msgstr "Votre message" -#: agenda_culturel/models.py:2094 +#: agenda_culturel/models.py:2139 msgid "Number of collected events" msgstr "Nombre d'événements collectés" -#: agenda_culturel/models.py:2097 +#: agenda_culturel/models.py:2142 msgid "Number of imported events" msgstr "Nombre d'événements importés" -#: agenda_culturel/models.py:2100 +#: agenda_culturel/models.py:2145 msgid "Number of updated events" msgstr "Nombre d'événements mis à jour" -#: agenda_culturel/models.py:2103 +#: agenda_culturel/models.py:2148 msgid "Number of removed events" msgstr "Nombre d'événements supprimés" -#: agenda_culturel/models.py:2111 +#: agenda_culturel/models.py:2156 msgid "Weight" msgstr "Poids" -#: agenda_culturel/models.py:2112 +#: agenda_culturel/models.py:2157 msgid "The lower is the weight, the earlier the filter is applied" msgstr "Plus le poids est léger, plus le filtre sera appliqué tôt" -#: agenda_culturel/models.py:2119 +#: agenda_culturel/models.py:2164 msgid "Category applied to the event" msgstr "Catégorie appliquée à l'événement" -#: agenda_culturel/models.py:2124 +#: agenda_culturel/models.py:2169 msgid "Contained in the title" msgstr "Contenu dans le titre" -#: agenda_culturel/models.py:2125 +#: agenda_culturel/models.py:2170 msgid "Text contained in the event title" msgstr "Texte contenu dans le titre de l'événement" -#: agenda_culturel/models.py:2131 +#: agenda_culturel/models.py:2176 msgid "Exact title extract" msgstr "Extrait exact du titre" -#: agenda_culturel/models.py:2133 +#: agenda_culturel/models.py:2178 msgid "" "If checked, the extract will be searched for in the title using the exact " "form (capitals, accents)." @@ -1010,19 +1018,19 @@ msgstr "" "Si coché, l'extrait sera recherché dans le titre en utilisant la forme " "exacte (majuscules, accents)" -#: agenda_culturel/models.py:2139 +#: agenda_culturel/models.py:2184 msgid "Contained in the description" msgstr "Contenu dans la description" -#: agenda_culturel/models.py:2140 +#: agenda_culturel/models.py:2185 msgid "Text contained in the description" msgstr "Texte contenu dans la description" -#: agenda_culturel/models.py:2146 +#: agenda_culturel/models.py:2191 msgid "Exact description extract" msgstr "Extrait exact de description" -#: agenda_culturel/models.py:2148 +#: agenda_culturel/models.py:2193 msgid "" "If checked, the extract will be searched for in the description using the " "exact form (capitals, accents)." @@ -1030,19 +1038,19 @@ msgstr "" "Si coché, l'extrait sera recherché dans la description en utilisant la forme " "exacte (majuscules, accents)" -#: agenda_culturel/models.py:2154 +#: agenda_culturel/models.py:2199 msgid "Contained in the location" msgstr "Contenu dans la localisation" -#: agenda_culturel/models.py:2155 +#: agenda_culturel/models.py:2200 msgid "Text contained in the event location" msgstr "Texte contenu dans la localisation de l'événement" -#: agenda_culturel/models.py:2161 +#: agenda_culturel/models.py:2206 msgid "Exact location extract" msgstr "Extrait exact de localisation" -#: agenda_culturel/models.py:2163 +#: agenda_culturel/models.py:2208 msgid "" "If checked, the extract will be searched for in the location using the exact " "form (capitals, accents)." @@ -1050,15 +1058,15 @@ msgstr "" "Si coché, l'extrait sera recherché dans la localisation en utilisant la " "forme exacte (majuscules, accents)" -#: agenda_culturel/models.py:2171 +#: agenda_culturel/models.py:2216 msgid "Location from place" msgstr "Localisation depuis le lieu" -#: agenda_culturel/models.py:2180 +#: agenda_culturel/models.py:2225 msgid "Categorisation rule" msgstr "Règle de catégorisation" -#: agenda_culturel/models.py:2181 +#: agenda_culturel/models.py:2226 msgid "Categorisation rules" msgstr "Règles de catégorisation" @@ -1100,31 +1108,43 @@ msgstr "" "La mise à jour de l'événement a été mise en attente et sera effectuée sous " "peu." -#: agenda_culturel/views.py:315 +#: agenda_culturel/views.py:324 agenda_culturel/views.py:372 +msgid " A message has been sent to the person who proposed the event." +msgstr " Un message a été envoyé à la personne qui a proposé l'événement." + +#: agenda_culturel/views.py:325 msgid "The event has been successfully modified." msgstr "L'événement a été modifié avec succès." -#: agenda_culturel/views.py:367 +#: agenda_culturel/views.py:373 msgid "The event {} has been moderated with success." msgstr "L'événement {} a été modéré avec succès." -#: agenda_culturel/views.py:482 +#: agenda_culturel/views.py:489 msgid "The event has been successfully deleted." msgstr "L'événement a été supprimé avec succès." -#: agenda_culturel/views.py:524 +#: agenda_culturel/views.py:531 msgid "Comment" msgstr "Commentaire" -#: agenda_culturel/views.py:542 +#: agenda_culturel/views.py:551 +msgid "" +"The status has been successfully modified and a message has been sent to the " +"person who proposed the event." +msgstr "" +"Le status a été modifié avec succès et un message a été envoyé à la personne " +"qui a proposé l'événement." + +#: agenda_culturel/views.py:553 msgid "The status has been successfully modified." msgstr "Le status a été modifié avec succès." -#: agenda_culturel/views.py:576 +#: agenda_culturel/views.py:587 msgid "The event was created: {}." msgstr "L'événement a été créé: {}." -#: agenda_culturel/views.py:578 +#: agenda_culturel/views.py:589 msgid "" "The event has been submitted and will be published as soon as it has been " "validated by the moderation team." @@ -1132,86 +1152,90 @@ msgstr "" "L'événement a été soumis et sera publié dès qu'il aura été validé par " "l'équipe de modération." -#: agenda_culturel/views.py:591 +#: agenda_culturel/views.py:601 +msgid "A message has been sent to the person who proposed the initial event." +msgstr "Un message a été envoyé à la personne qui a proposé l'événement initial." + +#: agenda_culturel/views.py:605 msgid "during the creation process" msgstr "pendant le processus d'import" -#: agenda_culturel/views.py:682 agenda_culturel/views.py:746 +#: agenda_culturel/views.py:696 agenda_culturel/views.py:760 msgid "{} has not been submitted since its already known: {}." msgstr "{} n'a pas été soumis car il est déjà connu: {}." -#: agenda_culturel/views.py:687 agenda_culturel/views.py:752 +#: agenda_culturel/views.py:701 agenda_culturel/views.py:766 msgid "" "{} has not been submitted since its already known and currently into " "moderation process." msgstr "{} n'a pas été soumis car il est déjà connu et en cours de modération" -#: agenda_culturel/views.py:697 +#: agenda_culturel/views.py:711 msgid "Integrating {} url(s) into our import process." msgstr "Intégration de {} url(s) dans notre processus d'import." -#: agenda_culturel/views.py:759 +#: agenda_culturel/views.py:773 msgid "Integrating {} into our import process." msgstr "Intégration de {} dans notre processus d'import." -#: agenda_culturel/views.py:817 +#: agenda_culturel/views.py:831 msgid "Your message has been sent successfully." msgstr "Votre message a été envoyé avec succès." -#: agenda_culturel/views.py:845 +#: agenda_culturel/views.py:859 msgid "Reporting the event {} on {}" msgstr "Signaler l'événement {} du {}" -#: agenda_culturel/views.py:855 +#: agenda_culturel/views.py:869 msgid "The contact message has been successfully deleted." msgstr "Le message de contact a été supprimé avec succès." -#: agenda_culturel/views.py:869 +#: agenda_culturel/views.py:883 msgid "The contact message properties has been successfully modified." msgstr "Les propriétés du message de contact ont été modifié avec succès." -#: agenda_culturel/views.py:1038 +#: agenda_culturel/views.py:1052 msgid "Spam has been successfully deleted." msgstr "Le spam a été supprimé avec succès" -#: agenda_culturel/views.py:1161 +#: agenda_culturel/views.py:1175 msgid "The import has been run successfully." msgstr "L'import a été lancé avec succès" -#: agenda_culturel/views.py:1180 +#: agenda_culturel/views.py:1194 msgid "The import has been canceled." msgstr "L'import a été annulé" -#: agenda_culturel/views.py:1258 +#: agenda_culturel/views.py:1272 msgid "The recurrent import has been successfully modified." msgstr "L'import récurrent a été modifié avec succès." -#: agenda_culturel/views.py:1267 +#: agenda_culturel/views.py:1281 msgid "The recurrent import has been successfully deleted." msgstr "L'import récurrent a été supprimé avec succès" -#: agenda_culturel/views.py:1307 +#: agenda_culturel/views.py:1321 msgid "The import has been launched." msgstr "L'import a été lancé" -#: agenda_culturel/views.py:1329 +#: agenda_culturel/views.py:1343 msgid "Imports has been launched." msgstr "Les imports ont été lancés" -#: agenda_culturel/views.py:1391 +#: agenda_culturel/views.py:1405 msgid "Update successfully completed." msgstr "Mise à jour réalisée avec succès." -#: agenda_culturel/views.py:1452 +#: agenda_culturel/views.py:1466 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:1488 +#: agenda_culturel/views.py:1502 msgid "Events have been marked as unduplicated." msgstr "Les événements ont été marqués comme non dupliqués." -#: agenda_culturel/views.py:1502 agenda_culturel/views.py:1511 -#: agenda_culturel/views.py:1529 +#: agenda_culturel/views.py:1516 agenda_culturel/views.py:1525 +#: agenda_culturel/views.py:1543 msgid "" "The selected item is no longer included in the list of duplicates. Someone " "else has probably modified the list in the meantime." @@ -1219,23 +1243,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:1505 +#: agenda_culturel/views.py:1519 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:1520 +#: agenda_culturel/views.py:1534 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:1564 +#: agenda_culturel/views.py:1578 msgid "Cleaning up duplicates: {} item(s) fixed." msgstr "Nettoyage des dupliqués: {} élément(s) corrigé(s)." -#: agenda_culturel/views.py:1614 +#: agenda_culturel/views.py:1628 msgid "The event was successfully duplicated." msgstr "L'événement a été marqué dupliqué avec succès." -#: agenda_culturel/views.py:1622 +#: agenda_culturel/views.py:1636 msgid "" "The event has been successfully flagged as a duplicate. The moderation team " "will deal with your suggestion shortly." @@ -1243,32 +1267,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:1675 +#: agenda_culturel/views.py:1689 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:1684 +#: agenda_culturel/views.py:1698 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:1706 +#: agenda_culturel/views.py:1720 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:1713 +#: agenda_culturel/views.py:1727 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:1720 agenda_culturel/views.py:1773 +#: agenda_culturel/views.py:1734 agenda_culturel/views.py:1787 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:1759 +#: agenda_culturel/views.py:1773 msgid "" "The rules were successfully applied and 1 event with default category was " "categorised." @@ -1276,7 +1300,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:1766 +#: agenda_culturel/views.py:1780 msgid "" "The rules were successfully applied and {} events with default category were " "categorised." @@ -1284,58 +1308,58 @@ 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:1858 agenda_culturel/views.py:1920 -#: agenda_culturel/views.py:1958 +#: agenda_culturel/views.py:1872 agenda_culturel/views.py:1934 +#: agenda_culturel/views.py:1972 msgid "{} events have been updated." msgstr "{} événements ont été mis à jour." -#: agenda_culturel/views.py:1861 agenda_culturel/views.py:1922 -#: agenda_culturel/views.py:1961 +#: agenda_culturel/views.py:1875 agenda_culturel/views.py:1936 +#: agenda_culturel/views.py:1975 msgid "1 event has been updated." msgstr "1 événement a été mis à jour" -#: agenda_culturel/views.py:1863 agenda_culturel/views.py:1924 -#: agenda_culturel/views.py:1963 +#: agenda_culturel/views.py:1877 agenda_culturel/views.py:1938 +#: agenda_culturel/views.py:1977 msgid "No events have been modified." msgstr "Aucun événement n'a été modifié." -#: agenda_culturel/views.py:1872 +#: agenda_culturel/views.py:1886 msgid "The place has been successfully updated." msgstr "Le lieu a été modifié avec succès." -#: agenda_culturel/views.py:1881 +#: agenda_culturel/views.py:1895 msgid "The place has been successfully created." msgstr "Le lieu a été créé avec succès." -#: agenda_culturel/views.py:1946 +#: agenda_culturel/views.py:1960 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:1950 +#: agenda_culturel/views.py:1964 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:2052 +#: agenda_culturel/views.py:2066 msgid "The organisation has been successfully updated." msgstr "L'organisme a été modifié avec succès." -#: agenda_culturel/views.py:2061 +#: agenda_culturel/views.py:2075 msgid "The organisation has been successfully created." msgstr "L'organisme a été créé avec succès." -#: agenda_culturel/views.py:2078 +#: agenda_culturel/views.py:2092 msgid "The tag has been successfully updated." msgstr "L'étiquette a été modifiée avec succès." -#: agenda_culturel/views.py:2085 +#: agenda_culturel/views.py:2099 msgid "The tag has been successfully created." msgstr "L'étiquette a été créée avec succès." -#: agenda_culturel/views.py:2149 +#: agenda_culturel/views.py:2163 msgid "You have not modified the tag name." msgstr "Vous n'avez pas modifié le nom de l'étiquette." -#: agenda_culturel/views.py:2159 +#: agenda_culturel/views.py:2173 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 " @@ -1348,7 +1372,7 @@ msgstr "" "sera supprimée, et tous les événements associés à l'étiquette {} seront " "associés à l'étiquette {}." -#: agenda_culturel/views.py:2166 +#: agenda_culturel/views.py:2180 msgid "" "This tag {} is already in use. You can force renaming by checking the " "corresponding option." @@ -1356,14 +1380,14 @@ msgstr "" "Cette étiquette {} est déjà utilisée. Vous pouvez forcer le renommage en " "cochant l'option correspondante." -#: agenda_culturel/views.py:2200 +#: agenda_culturel/views.py:2214 msgid "The tag {} has been successfully renamed to {}." msgstr "L'étiquette {} a été renommée avec succès en {}." -#: agenda_culturel/views.py:2238 +#: agenda_culturel/views.py:2252 msgid "The tag {} has been successfully deleted." msgstr "L'événement {} a été supprimé avec succès." -#: agenda_culturel/views.py:2259 +#: agenda_culturel/views.py:2273 msgid "Cache successfully cleared." msgstr "Le cache a été vidé avec succès." diff --git a/src/agenda_culturel/models.py b/src/agenda_culturel/models.py index 2dc34be..e15f58f 100644 --- a/src/agenda_culturel/models.py +++ b/src/agenda_culturel/models.py @@ -14,6 +14,11 @@ from django.core.cache.utils import make_template_fragment_key from django.contrib.auth.models import User, AnonymousUser import emoji from django.core.files.storage import default_storage +from django.contrib.sites.models import Site +from django.core.mail import send_mail +from django.template.loader import render_to_string + + import uuid import hashlib @@ -939,7 +944,6 @@ class Event(models.Model): def download_missing_image(self): if self.local_image and not default_storage.exists(self.local_image.name): - logger.warning("on dl") self.download_image() self.save(update_fields=["local_image"]) @@ -1144,6 +1148,36 @@ class Event(models.Model): if not self.category or self.category.name == Category.default_name: CategorisationRule.apply_rules(self) + + def get_contributor_message(self): + msg = Message.objects.filter(related_event=self.pk, email__isnull=False, closed=False).first() + if msg is None: + msg = Message.objects.filter(related_event__in=self.other_versions.get_duplicated(), email__isnull=False, closed=False).first() + return msg + + + def notify_if_required(self, request): + if self.status != Event.STATUS.DRAFT: + message = self.get_contributor_message() + if message and not message.closed and message.email: + # send email + context = {"sitename": Site.objects.get_current(request).name, 'event_title': self.title } + if self.status == Event.STATUS.PUBLISHED: + context["url"] = request.build_absolute_uri(self.get_absolute_url()) + subject = _('Your event has been published') + body = render_to_string("agenda_culturel/emails/published.txt", context) + else: + subject = _('Your message has not been retained') + body = render_to_string("agenda_culturel/emails/retained.txt", context) + + send_mail(subject, body, None, [message.email]) + message.closed = True + message.save() + return True + + return False + + def save(self, *args, **kwargs): self.prepare_save() @@ -1177,6 +1211,10 @@ class Event(models.Model): # first save the current object super().save(*args, **kwargs) + # notify only if required (and request is known) + if "request" in kwargs: + self.notify_if_required(kwargs.get("request")) + # clear cache for is_auth in [False, True]: key = make_template_fragment_key("event_body", [is_auth, self]) @@ -1285,7 +1323,7 @@ class Event(models.Model): result = Event(**event_structure) result.add_pending_organisers(organisers) if email or comments: - result.set_message(Message(subject=_('during import process'), email=email, message=comments)) + result.set_message(Message(subject=_('during import process'), email=email, message=comments, closed=False)) return result diff --git a/src/agenda_culturel/templates/agenda_culturel/emails/published.txt b/src/agenda_culturel/templates/agenda_culturel/emails/published.txt new file mode 100644 index 0000000..41a7596 --- /dev/null +++ b/src/agenda_culturel/templates/agenda_culturel/emails/published.txt @@ -0,0 +1,9 @@ +Bonjour, + +Nous avons le plaisir de t'informer que l'événement « {{ event_title }} » que tu as proposé sur {{ sitename }} a été validé et publié par l'équipe de modération. +Tu peux dès maintenant le retrouver à l'adresse suivante : + - {{ url }} + +Merci de participer à l'amélioration de {{ sitename }}. N'hésites pas à continuer à contribuer en ajoutant de nouveaux événements, ça nous fait bien plaisir. + +L'équipe de modération. diff --git a/src/agenda_culturel/templates/agenda_culturel/emails/retained.txt b/src/agenda_culturel/templates/agenda_culturel/emails/retained.txt new file mode 100644 index 0000000..69749ef --- /dev/null +++ b/src/agenda_culturel/templates/agenda_culturel/emails/retained.txt @@ -0,0 +1,8 @@ +Bonjour, + +Nous avons la dure tâche de t'informer que l'événement « {{ event_title }} » que tu avais proposé sur {{ sitename }} n'a pas été retenu par l'équipe de modération. + +Nous te remercions pour cette proposition, et espérons qu'une prochaine fois, ta proposition correspondra à la ligne portée par {{ sitename }}. + +L'équipe de modération. + \ No newline at end of file diff --git a/src/agenda_culturel/templates/agenda_culturel/messages.html b/src/agenda_culturel/templates/agenda_culturel/messages.html index 257fcbf..e94438f 100644 --- a/src/agenda_culturel/templates/agenda_culturel/messages.html +++ b/src/agenda_culturel/templates/agenda_culturel/messages.html @@ -46,8 +46,8 @@ {{ obj.date }} {{ obj.subject }} - {% if obj.user %}{{ obj.user }}{% else %}{{ obj.name }}{% endif %} - {% if obj.related_event %}{{ obj.related_event.pk }}{% else %}/{% endif %} + {% if obj.user %}{{ obj.user }}{% else %}{% if obj.name %}{{ obj.name }}{% else %}-{% endif %}{% endif %} + {% if obj.related_event %}{{ obj.related_event.pk }}{% else %}-{% endif %} {% if obj.closed %}{% picto_from_name "check-square" "fermé" %}{% else %}{% picto_from_name "square" "ouvert" %}{% endif %} {% if obj.spam %}{% picto_from_name "check-square" "spam" %}{% else %}{% picto_from_name "square" "non spam" %}{% endif %} diff --git a/src/agenda_culturel/templates/agenda_culturel/single-event/event-single-inc.html b/src/agenda_culturel/templates/agenda_culturel/single-event/event-single-inc.html index c3c36e6..93ebecf 100644 --- a/src/agenda_culturel/templates/agenda_culturel/single-event/event-single-inc.html +++ b/src/agenda_culturel/templates/agenda_culturel/single-event/event-single-inc.html @@ -78,7 +78,7 @@ {% endif %} {% if perms.agenda_culturel.change_message %} {% if event.message_set.all.count > 0 %} -

Cet événement a fait l'objet {% if event.message_set.all.count == 1 %}d'un signalement{% else %}de signalements{% endif %} +

Cet événement a été l'objet {% if event.message_set.all.count == 1 %}d'un message{% else %}de messages{% endif %} {% for cm in event.message_set.all %} le {{ cm.date.date }} à {{ cm.date.time }}{% if not forloop.last %}, {% endif %} {% endfor %} diff --git a/src/agenda_culturel/views.py b/src/agenda_culturel/views.py index d765ecc..ec8c341 100644 --- a/src/agenda_culturel/views.py +++ b/src/agenda_culturel/views.py @@ -312,7 +312,6 @@ class EventUpdateView( model = Event permission_required = "agenda_culturel.change_event" form_class = EventForm - success_message = _("The event has been successfully modified.") def get_form_kwargs(self): kwargs = super().get_form_kwargs() @@ -321,8 +320,14 @@ class EventUpdateView( kwargs["is_simple_cloning"] = self.is_simple_cloning return kwargs + def get_success_message(self, cleaned_data): + txt = _(" A message has been sent to the person who proposed the event.") if hasattr(self, "with_msg") else "" + return mark_safe(_('The event has been successfully modified.') + txt) + + def form_valid(self, form): form.instance.set_processing_user(self.request.user) + self.with_message = form.instance.notify_if_required(self.request) return super().form_valid(form) def get_initial(self): @@ -364,7 +369,8 @@ class EventModerateView( form_class = EventModerateForm def get_success_message(self, cleaned_data): - return mark_safe(_('The event {} has been moderated with success.').format(self.object.get_absolute_url(), self.object.title)) + txt = _(" A message has been sent to the person who proposed the event.") if hasattr(self, "with_msg") else "" + return mark_safe(_('The event {} has been moderated with success.').format(self.object.get_absolute_url(), self.object.title) + txt) def is_moderate_next(self): @@ -424,6 +430,7 @@ class EventModerateView( form.instance.set_no_modification_date_changed() form.instance.set_in_moderation_process() form.instance.set_processing_user(self.request.user) + self.with_msg = form.instance.notify_if_required(self.request) return super().form_valid(form) def get_success_url(self): @@ -539,7 +546,11 @@ def change_status_event(request, pk, status): if request.method == "POST": event.status = Event.STATUS(status) event.save(update_fields=["status"]) - messages.success(request, _("The status has been successfully modified.")) + with_msg = event.notify_if_required(request) + if with_msg: + messages.success(request, _("The status has been successfully modified and a message has been sent to the person who proposed the event.")) + else: + messages.success(request, _("The status has been successfully modified.")) return HttpResponseRedirect(event.get_absolute_url()) @@ -586,14 +597,21 @@ class EventCreateView(SuccessMessageMixin, CreateView): if form.cleaned_data['cloning']: form.instance.set_in_moderation_process() - if form.cleaned_data["email"] or form.cleaned_data["comments"]: + if form.cleaned_data.get("email") or form.cleaned_data.get("comments"): form.instance.set_message( - Message(subject=_('during the creation process'), message=form.cleaned_data["comments"], email=form.cleaned_data["email"])) + Message(subject=_('during the creation process'), message=form.cleaned_data["comments"], email=form.cleaned_data["email"]), closed=False) form.instance.import_sources = None form.instance.set_processing_user(self.request.user) - return super().form_valid(form) + result = super().form_valid(form) + + if form.cleaned_data['cloning']: + with_msg = form.instance.notify_if_required(self.request) + if with_msg: + messages.success(self.request, _("A message has been sent to the person who proposed the initial event.")) + + return result