From 7397d0fbfa68ab5a2431a68c0f23c351eef1edee Mon Sep 17 00:00:00 2001 From: Jean-Marie Favreau Date: Tue, 15 Apr 2025 23:22:32 +0200 Subject: [PATCH] =?UTF-8?q?Am=C3=A9lioration=20de=20la=20d=C3=A9tection=20?= =?UTF-8?q?des=20=C3=A9v=C3=A9nements=20d=C3=A9j=C3=A0=20import=C3=A9s?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix #401 --- src/agenda_culturel/celery.py | 2 +- src/agenda_culturel/import_tasks/extractor.py | 17 +- .../generic_extractors/fbevent.py | 6 +- .../locale/fr/LC_MESSAGES/django.po | 706 +++++++++--------- src/agenda_culturel/models.py | 24 + src/agenda_culturel/views.py | 84 ++- 6 files changed, 442 insertions(+), 397 deletions(-) diff --git a/src/agenda_culturel/celery.py b/src/agenda_culturel/celery.py index c022b02..4478e57 100644 --- a/src/agenda_culturel/celery.py +++ b/src/agenda_culturel/celery.py @@ -471,7 +471,7 @@ def import_events_from_url( ) # clean url - url = Extractor.clean_url(url) + url = Extractor.clean_url_default_extractors(url) # we check if the url is known existing = None if force else Event.objects.filter(uuids__contains=[url]) diff --git a/src/agenda_culturel/import_tasks/extractor.py b/src/agenda_culturel/import_tasks/extractor.py index 29fbf76..f9c7bcc 100644 --- a/src/agenda_culturel/import_tasks/extractor.py +++ b/src/agenda_culturel/import_tasks/extractor.py @@ -296,17 +296,6 @@ class Extractor(ABC): else: return {"header": self.header, "events": self.events} - def clean_url(url): - from .generic_extractors.fbevent import ( - CExtractor as FacebookEventExtractor, - ) - from .generic_extractors.ical import ICALExtractor - - result = url - for e in [ICALExtractor, FacebookEventExtractor]: - result = e.clean_url(result) - return result - def get_default_extractors(single_event=False): from .generic_extractors.fbevent import ( CExtractor as FacebookEventExtractor, @@ -341,6 +330,12 @@ class Extractor(ABC): return True return False + def clean_url_default_extractors(url): + for e in Extractor.get_default_extractors(True): + if e.is_known_url(url): + return e.clean_url(url) + return url + # A class that only produce a not found event class EventNotFoundExtractor(Extractor): diff --git a/src/agenda_culturel/import_tasks/generic_extractors/fbevent.py b/src/agenda_culturel/import_tasks/generic_extractors/fbevent.py index 7d18d99..ac4b5c9 100644 --- a/src/agenda_culturel/import_tasks/generic_extractors/fbevent.py +++ b/src/agenda_culturel/import_tasks/generic_extractors/fbevent.py @@ -227,7 +227,7 @@ class FacebookEvent: class CExtractor(Extractor): - pattern = r'^https?://(?:www\.|m\.)?facebook\.com/events/(\d+)(?:/(\d+))?(?:/([a-zA-Z0-9\-]+))?/?$' + def __init__(self): super().__init__() self.has_2nd_method = True @@ -300,7 +300,9 @@ class CExtractor(Extractor): def is_known_url(url, include_links=True): - if re.match(CExtractor.pattern, url): + u = urlparse(url) + + if "/events/" in u.path and u.netloc.endswith("facebook.com"): return True if include_links: diff --git a/src/agenda_culturel/locale/fr/LC_MESSAGES/django.po b/src/agenda_culturel/locale/fr/LC_MESSAGES/django.po index b192eb2..55b3a74 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: 2025-04-12 22:04+0200\n" +"POT-Creation-Date: 2025-04-15 23:20+0200\n" "PO-Revision-Date: 2023-10-29 14:16+0000\n" "Last-Translator: Jean-Marie Favreau \n" "Language-Team: Jean-Marie Favreau \n" @@ -142,12 +142,12 @@ msgstr "dernier créé d'abord" msgid "Imported from" msgstr "Importé depuis" -#: agenda_culturel/filters.py:470 agenda_culturel/models.py:875 -#: agenda_culturel/models.py:3000 +#: agenda_culturel/filters.py:470 agenda_culturel/models.py:872 +#: agenda_culturel/models.py:3023 msgid "Status" msgstr "Status" -#: agenda_culturel/filters.py:471 agenda_culturel/models.py:2763 +#: agenda_culturel/filters.py:471 agenda_culturel/models.py:2786 msgid "Closed" msgstr "Fermé" @@ -156,7 +156,7 @@ msgid "Open" msgstr "Ouvert" #: agenda_culturel/filters.py:475 agenda_culturel/filters.py:476 -#: agenda_culturel/models.py:2757 +#: agenda_culturel/models.py:2780 msgid "Spam" msgstr "Spam" @@ -164,7 +164,7 @@ msgstr "Spam" msgid "Non spam" msgstr "Non spam" -#: agenda_culturel/filters.py:481 agenda_culturel/models.py:2778 +#: agenda_culturel/filters.py:481 agenda_culturel/models.py:2801 msgid "Type" msgstr "Type" @@ -195,11 +195,11 @@ msgstr "" msgid "Your email" msgstr "Votre adresse email" -#: agenda_culturel/forms.py:168 agenda_culturel/models.py:2745 +#: agenda_culturel/forms.py:168 agenda_culturel/models.py:2768 msgid "Your email address" msgstr "Votre adresse email" -#: agenda_culturel/forms.py:174 agenda_culturel/models.py:2770 +#: agenda_culturel/forms.py:174 agenda_culturel/models.py:2793 msgid "Comments" msgstr "Commentaires" @@ -214,24 +214,24 @@ 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:210 agenda_culturel/models.py:315 -#: agenda_culturel/models.py:883 agenda_culturel/models.py:2924 -#: agenda_culturel/models.py:3035 +#: agenda_culturel/forms.py:210 agenda_culturel/models.py:312 +#: agenda_culturel/models.py:880 agenda_culturel/models.py:2947 +#: agenda_culturel/models.py:3058 msgid "Category" msgstr "Catégorie" #: agenda_culturel/forms.py:216 agenda_culturel/forms.py:249 #: agenda_culturel/forms.py:295 agenda_culturel/forms.py:479 -#: agenda_culturel/models.py:369 agenda_culturel/models.py:1000 +#: agenda_culturel/models.py:366 agenda_culturel/models.py:997 msgid "Tags" msgstr "Étiquettes" #: agenda_culturel/forms.py:224 agenda_culturel/forms.py:644 -#: agenda_culturel/models.py:1130 +#: agenda_culturel/models.py:1127 msgid "Event" msgstr "Événement" -#: agenda_culturel/forms.py:274 agenda_culturel/models.py:71 +#: agenda_culturel/forms.py:274 agenda_culturel/models.py:68 msgid "The '/' character is not allowed." msgstr "Le caractère '/' n'est pas autorisé." @@ -270,13 +270,13 @@ msgstr "Cet événement est récurrent" msgid "Details" msgstr "Détails" -#: agenda_culturel/forms.py:385 agenda_culturel/models.py:912 -#: agenda_culturel/models.py:2899 +#: agenda_culturel/forms.py:385 agenda_culturel/models.py:909 +#: agenda_culturel/models.py:2922 msgid "Location" msgstr "Localisation" -#: agenda_culturel/forms.py:390 agenda_culturel/models.py:113 -#: agenda_culturel/models.py:956 +#: agenda_culturel/forms.py:390 agenda_culturel/models.py:110 +#: agenda_culturel/models.py:953 msgid "Illustration" msgstr "Illustration" @@ -350,8 +350,8 @@ msgstr "Valeur de la version sélectionnée" msgid "Apply category {} to the event {}" msgstr "Appliquer la catégorie {} à l'événement {}" -#: agenda_culturel/forms.py:870 agenda_culturel/models.py:700 -#: agenda_culturel/models.py:3087 +#: agenda_culturel/forms.py:870 agenda_culturel/models.py:697 +#: agenda_culturel/models.py:3110 msgid "Place" msgstr "Lieu" @@ -373,7 +373,7 @@ msgstr "" msgid "Header" msgstr "Entête" -#: agenda_culturel/forms.py:927 agenda_culturel/models.py:662 +#: agenda_culturel/forms.py:927 agenda_culturel/models.py:659 msgid "Address" msgstr "Adresse" @@ -389,7 +389,7 @@ msgstr "Informations" msgid "Add a comment" msgstr "Ajouter un commentaire" -#: agenda_culturel/forms.py:1013 agenda_culturel/models.py:3188 +#: agenda_culturel/forms.py:1013 agenda_culturel/models.py:3211 msgid "Period type" msgstr "Type de période" @@ -413,7 +413,7 @@ msgstr "Erreur lors de l'affichage du bouton cookie : " msgid "Error while clicking on the cookie button to be visible: " msgstr "Erreur lors du clic sur le bouton cookie pour être visible : " -#: agenda_culturel/import_tasks/generic_extractors/fbevent.py:342 +#: agenda_culturel/import_tasks/generic_extractors/fbevent.py:344 #: agenda_culturel/import_tasks/generic_extractors/fbevents.py:122 msgid "Cannot get Facebook event from {}" msgstr "Impossible de récupérer un événement Facebook depuis {}" @@ -426,67 +426,67 @@ msgstr "" "la page n'était pas encore peuplée des événements, le temps de chargement a " "sans doute été trop court" -#: agenda_culturel/models.py:66 +#: agenda_culturel/models.py:63 msgid "mean" msgstr "moyenne" -#: agenda_culturel/models.py:66 +#: agenda_culturel/models.py:63 msgid "median" msgstr "médiane" -#: agenda_culturel/models.py:66 +#: agenda_culturel/models.py:63 msgid "maximum" msgstr "maximum" -#: agenda_culturel/models.py:66 +#: agenda_culturel/models.py:63 msgid "minimum" msgstr "minimum" -#: agenda_culturel/models.py:66 +#: agenda_culturel/models.py:63 msgid "stdev" msgstr "écart-type" -#: agenda_culturel/models.py:76 +#: agenda_culturel/models.py:73 msgid "Site name" msgstr "Nom du site" -#: agenda_culturel/models.py:79 +#: agenda_culturel/models.py:76 msgid "Site url" msgstr "URL du site" -#: agenda_culturel/models.py:82 +#: agenda_culturel/models.py:79 msgid "Site description" msgstr "Description du site" -#: agenda_culturel/models.py:88 +#: agenda_culturel/models.py:85 msgid "Keywords in html header" msgstr "Mots-clés dans l'entête html" -#: agenda_culturel/models.py:93 +#: agenda_culturel/models.py:90 msgid "Description in html header" msgstr "Description dans l'entête html" -#: agenda_culturel/models.py:98 +#: agenda_culturel/models.py:95 msgid "Google site verification value" msgstr "Valeur de vérification de site Google" -#: agenda_culturel/models.py:105 +#: agenda_culturel/models.py:102 msgid "Microsoft (bing) site verification value" msgstr "Valeur de vérification de site Microsoft (bing)" -#: agenda_culturel/models.py:119 +#: agenda_culturel/models.py:116 msgid "Illustration (development version)" msgstr "Illustration (version de développement)" -#: agenda_culturel/models.py:152 agenda_culturel/models.py:155 +#: agenda_culturel/models.py:149 agenda_culturel/models.py:152 msgid "Site Configuration" msgstr "Configuration du site" -#: agenda_culturel/models.py:166 +#: agenda_culturel/models.py:163 msgid "Expert moderation user" msgstr "Utilisateur expert en modération" -#: agenda_culturel/models.py:168 +#: agenda_culturel/models.py:165 msgid "" "This user is an expert in moderation, and the interface features additional " "functionalities." @@ -494,102 +494,102 @@ msgstr "" "Cet utilisateur est un expert en modération, et l'interface comporte des " "fonctionnalités additionnelles." -#: agenda_culturel/models.py:174 agenda_culturel/models.py:178 +#: agenda_culturel/models.py:171 agenda_culturel/models.py:175 msgid "User profile" msgstr "" -#: agenda_culturel/models.py:175 +#: agenda_culturel/models.py:172 msgid "User profiles" msgstr "" -#: agenda_culturel/models.py:198 agenda_culturel/models.py:245 -#: agenda_culturel/models.py:324 agenda_culturel/models.py:619 -#: agenda_culturel/models.py:660 agenda_culturel/models.py:766 -#: agenda_culturel/models.py:2737 agenda_culturel/models.py:2849 +#: agenda_culturel/models.py:195 agenda_culturel/models.py:242 +#: agenda_culturel/models.py:321 agenda_culturel/models.py:616 +#: agenda_culturel/models.py:657 agenda_culturel/models.py:763 +#: agenda_culturel/models.py:2760 agenda_culturel/models.py:2872 msgid "Name" msgstr "Nom" -#: agenda_culturel/models.py:199 agenda_culturel/models.py:245 +#: agenda_culturel/models.py:196 agenda_culturel/models.py:242 msgid "Category name" msgstr "Nom de la catégorie" -#: agenda_culturel/models.py:204 +#: agenda_culturel/models.py:201 msgid "Content" msgstr "Contenu" -#: agenda_culturel/models.py:205 +#: agenda_culturel/models.py:202 msgid "Text as shown to the visitors" msgstr "Texte tel que présenté aux visiteureuses" -#: agenda_culturel/models.py:209 +#: agenda_culturel/models.py:206 msgid "URL path" msgstr "Chemin URL" -#: agenda_culturel/models.py:210 +#: agenda_culturel/models.py:207 msgid "URL path where the content is included." msgstr "Chemin URL où le contenu est présent." -#: agenda_culturel/models.py:214 +#: agenda_culturel/models.py:211 msgid "Static content" msgstr "Contenu statique" -#: agenda_culturel/models.py:215 +#: agenda_culturel/models.py:212 msgid "Static contents" msgstr "Contenus statiques" -#: agenda_culturel/models.py:251 +#: agenda_culturel/models.py:248 msgid "Color" msgstr "Couleur" -#: agenda_culturel/models.py:252 +#: agenda_culturel/models.py:249 msgid "Color used as background for the category" msgstr "Couleur utilisée comme fond de la catégorie" -#: agenda_culturel/models.py:258 +#: agenda_culturel/models.py:255 msgid "Pictogram" msgstr "Pictogramme" -#: agenda_culturel/models.py:259 +#: agenda_culturel/models.py:256 msgid "Pictogram of the category (svg format)" msgstr "Pictogramme de la catégorie (format svg)" -#: agenda_culturel/models.py:266 +#: agenda_culturel/models.py:263 msgid "Position for ordering categories" msgstr "Position pour ordonner les catégories" -#: agenda_culturel/models.py:316 +#: agenda_culturel/models.py:313 msgid "Categories" msgstr "Catégories" -#: agenda_culturel/models.py:325 +#: agenda_culturel/models.py:322 msgid "Tag name" msgstr "Nom de l'étiquette" -#: agenda_culturel/models.py:332 agenda_culturel/models.py:683 -#: agenda_culturel/models.py:782 agenda_culturel/models.py:939 +#: agenda_culturel/models.py:329 agenda_culturel/models.py:680 +#: agenda_culturel/models.py:779 agenda_culturel/models.py:936 msgid "Description" msgstr "Description" -#: agenda_culturel/models.py:333 +#: agenda_culturel/models.py:330 msgid "Description of the tag" msgstr "Description de l'étiquette" -#: agenda_culturel/models.py:339 agenda_culturel/models.py:2704 -#: agenda_culturel/models.py:2751 +#: agenda_culturel/models.py:336 agenda_culturel/models.py:2727 +#: agenda_culturel/models.py:2774 msgid "Message" msgstr "Message" -#: agenda_culturel/models.py:341 +#: agenda_culturel/models.py:338 msgid "Message displayed to the user on each event associated with this tag." msgstr "" "Message affiché à l'utilisateur sur chaque événement associé à cette " "étiquette." -#: agenda_culturel/models.py:348 +#: agenda_culturel/models.py:345 msgid "Principal" msgstr "Principal" -#: agenda_culturel/models.py:350 +#: agenda_culturel/models.py:347 msgid "" "This tag is highlighted as a main tag for visitors, particularly in the " "filter." @@ -597,91 +597,91 @@ msgstr "" "Cette étiquette est mise en avant comme étiquette principale pour les " "visiteurs, en particulier dans le filtre." -#: agenda_culturel/models.py:356 +#: agenda_culturel/models.py:353 msgid "In excluded suggestions" msgstr "Dans les suggestions d'exclusion" -#: agenda_culturel/models.py:357 +#: agenda_culturel/models.py:354 msgid "This tag will be part of the excluded suggestions." msgstr "Cette étiquette fera partie des suggestions d'exclusion." -#: agenda_culturel/models.py:362 +#: agenda_culturel/models.py:359 msgid "In included suggestions" msgstr "Dans les suggestions d'inclusion." -#: agenda_culturel/models.py:363 +#: agenda_culturel/models.py:360 msgid "This tag will be part of the included suggestions." msgstr "Cette étiquette fera partie des suggestions d'inclusion." -#: agenda_culturel/models.py:368 +#: agenda_culturel/models.py:365 msgid "Tag" msgstr "Étiquette" -#: agenda_culturel/models.py:457 +#: agenda_culturel/models.py:454 msgid "Suggestions" msgstr "Suggestions" -#: agenda_culturel/models.py:458 +#: agenda_culturel/models.py:455 msgid "Others" msgstr "Autres" -#: agenda_culturel/models.py:471 +#: agenda_culturel/models.py:468 msgid "Representative event" msgstr "Événement représentatif" -#: agenda_culturel/models.py:473 +#: agenda_culturel/models.py:470 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:481 agenda_culturel/models.py:482 +#: agenda_culturel/models.py:478 agenda_culturel/models.py:479 msgid "Duplicated events" msgstr "Événements dupliqués" -#: agenda_culturel/models.py:620 +#: agenda_culturel/models.py:617 msgid "Name of the location" msgstr "Nom de la position" -#: agenda_culturel/models.py:631 +#: agenda_culturel/models.py:628 msgid "Main" msgstr "Principale" -#: agenda_culturel/models.py:633 +#: agenda_culturel/models.py:630 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:638 +#: agenda_culturel/models.py:635 msgid "Suggested distance (km)" msgstr "" -#: agenda_culturel/models.py:640 +#: agenda_culturel/models.py:637 msgid "" "If this distance is given, this location is part of the suggested filters." msgstr "" -#: agenda_culturel/models.py:649 +#: agenda_culturel/models.py:646 msgid "Reference location" msgstr "Position de référence" -#: agenda_culturel/models.py:650 +#: agenda_culturel/models.py:647 msgid "Reference locations" msgstr "Positions de référence" -#: agenda_culturel/models.py:660 +#: agenda_culturel/models.py:657 msgid "Name of the place" msgstr "Nom du lieu" -#: agenda_culturel/models.py:663 +#: agenda_culturel/models.py:660 msgid "Address of this place (without city name)" msgstr "Adresse de ce lieu (sans le nom de la ville)" -#: agenda_culturel/models.py:668 +#: agenda_culturel/models.py:665 msgid "Postcode" msgstr "Code postal" -#: agenda_culturel/models.py:670 +#: agenda_culturel/models.py:667 msgid "" "The post code is not displayed, but makes it easier to find an address when " "you enter it." @@ -689,23 +689,23 @@ msgstr "" "Le code postal ne sera pas affiché, mais facilite la recherche d'adresse au " "moment de la saisie." -#: agenda_culturel/models.py:675 +#: agenda_culturel/models.py:672 msgid "City" msgstr "Ville" -#: agenda_culturel/models.py:675 +#: agenda_culturel/models.py:672 msgid "City name" msgstr "Nom de la ville" -#: agenda_culturel/models.py:684 +#: agenda_culturel/models.py:681 msgid "Description of the place, including accessibility." msgstr "Description du lieu, inclus l'accessibilité." -#: agenda_culturel/models.py:691 +#: agenda_culturel/models.py:688 msgid "Alternative names" msgstr "Noms alternatifs" -#: agenda_culturel/models.py:693 +#: agenda_culturel/models.py:690 msgid "" "Alternative names or addresses used to match a place with the free-form " "location of an event." @@ -713,31 +713,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:701 +#: agenda_culturel/models.py:698 msgid "Places" msgstr "Lieux" -#: agenda_culturel/models.py:767 +#: agenda_culturel/models.py:764 msgid "Organisation name" msgstr "Nom de l'organisme" -#: agenda_culturel/models.py:774 +#: agenda_culturel/models.py:771 msgid "Website" msgstr "Site internet" -#: agenda_culturel/models.py:775 +#: agenda_culturel/models.py:772 msgid "Website of the organisation" msgstr "Site internet de l'organisme" -#: agenda_culturel/models.py:783 +#: agenda_culturel/models.py:780 msgid "Description of the organisation." msgstr "Description de l'organisme" -#: agenda_culturel/models.py:790 +#: agenda_culturel/models.py:787 msgid "Principal place" msgstr "Lieu principal" -#: agenda_culturel/models.py:792 +#: agenda_culturel/models.py:789 msgid "" "Place mainly associated with this organizer. Mainly used if there is a " "similarity in the name, to avoid redundant displays." @@ -745,75 +745,75 @@ msgstr "" "Lieu principalement associé à cette organisation. Principalement utilisé " "s'il y a une similarité de nom, pour éviter les affichages redondants." -#: agenda_culturel/models.py:800 +#: agenda_culturel/models.py:797 msgid "Organisation" msgstr "Organisme" -#: agenda_culturel/models.py:801 +#: agenda_culturel/models.py:798 msgid "Organisations" msgstr "Organismes" -#: agenda_culturel/models.py:812 agenda_culturel/models.py:2894 +#: agenda_culturel/models.py:809 agenda_culturel/models.py:2917 msgid "Published" msgstr "Publié" -#: agenda_culturel/models.py:813 +#: agenda_culturel/models.py:810 msgid "Draft" msgstr "Brouillon" -#: agenda_culturel/models.py:814 +#: agenda_culturel/models.py:811 msgid "Trash" msgstr "Corbeille" -#: agenda_culturel/models.py:824 +#: agenda_culturel/models.py:821 msgid "Author currently editing/moderating the event" msgstr "" -#: agenda_culturel/models.py:834 +#: agenda_culturel/models.py:831 msgid "Author of the event creation" msgstr "Auteur de la création de l'événement" -#: agenda_culturel/models.py:843 +#: agenda_culturel/models.py:840 msgid "Author of the last importation" msgstr "Auteur de la dernière importation" -#: agenda_culturel/models.py:852 +#: agenda_culturel/models.py:849 msgid "Author of the last modification" msgstr "Auteur de la dernière modification" -#: agenda_culturel/models.py:861 +#: agenda_culturel/models.py:858 msgid "Author of the last moderation" msgstr "Auteur de la dernière modération" -#: agenda_culturel/models.py:872 +#: agenda_culturel/models.py:869 msgid "Title" msgstr "Titre" -#: agenda_culturel/models.py:889 agenda_culturel/models.py:3173 +#: agenda_culturel/models.py:886 agenda_culturel/models.py:3196 msgid "Start day" msgstr "Date de début" -#: agenda_culturel/models.py:891 +#: agenda_culturel/models.py:888 msgid "Start time" msgstr "Heure de début" -#: agenda_culturel/models.py:897 agenda_culturel/models.py:3174 +#: agenda_culturel/models.py:894 agenda_culturel/models.py:3197 msgid "End day" msgstr "Date de fin" -#: agenda_culturel/models.py:901 +#: agenda_culturel/models.py:898 msgid "End time" msgstr "Heure de fin" -#: agenda_culturel/models.py:904 +#: agenda_culturel/models.py:901 msgid "Recurrence" msgstr "Récurrence" -#: agenda_culturel/models.py:918 +#: agenda_culturel/models.py:915 msgid "Location (free form)" msgstr "Localisation (forme libre)" -#: agenda_culturel/models.py:920 +#: agenda_culturel/models.py:917 msgid "" "Address of the event in case its not available in the already known places " "(free form)" @@ -821,11 +821,11 @@ msgstr "" "Adresse d'un événement si elle n'est pas déjà présente dans la liste des " "lieux disponibles (forme libre)" -#: agenda_culturel/models.py:929 +#: agenda_culturel/models.py:926 msgid "Local event" msgstr "Événement de portée locale" -#: agenda_culturel/models.py:931 +#: agenda_culturel/models.py:928 msgid "" "If the event is a local event, it will not be proposed by default in daily, " "weekly or monthly views, unless the user has explicitly indicated that he " @@ -835,11 +835,11 @@ msgstr "" "les vues quotidiennes, hebdomadaires ou mensuelles, sauf si l'utilisateur a " "explicitement indiqué qu'il souhaite voir ces événements." -#: agenda_culturel/models.py:947 +#: agenda_culturel/models.py:944 msgid "Organisers" msgstr "Organisations" -#: agenda_culturel/models.py:949 +#: agenda_culturel/models.py:946 msgid "" "list of event organisers. Organizers will only be displayed if one of them " "does not normally use the venue." @@ -847,112 +847,112 @@ msgstr "" "Liste des organisations de l'événements. Les organisations seront affichés " "uniquement si au moins un d'entre eux n'utilise pas habituellement le lieu." -#: agenda_culturel/models.py:963 +#: agenda_culturel/models.py:960 msgid "Illustration (URL)" msgstr "Illustration (URL)" -#: agenda_culturel/models.py:964 +#: agenda_culturel/models.py:961 msgid "External URL of the illustration image" msgstr "URL externe de l'image illustrative" -#: agenda_culturel/models.py:970 +#: agenda_culturel/models.py:967 msgid "Illustration description" msgstr "Description de l'illustration" -#: agenda_culturel/models.py:971 +#: agenda_culturel/models.py:968 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:979 +#: agenda_culturel/models.py:976 msgid "Importation source" msgstr "Source d'importation" -#: agenda_culturel/models.py:980 +#: agenda_culturel/models.py:977 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:986 +#: agenda_culturel/models.py:983 msgid "UUIDs" msgstr "UUIDs" -#: agenda_culturel/models.py:987 +#: agenda_culturel/models.py:984 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:993 +#: agenda_culturel/models.py:990 msgid "Online sources or ticketing" msgstr "Sources en ligne ou billetterie" -#: agenda_culturel/models.py:1007 +#: agenda_culturel/models.py:1004 msgid "Other versions" msgstr "" -#: agenda_culturel/models.py:1131 +#: agenda_culturel/models.py:1128 msgid "Events" msgstr "Événements" -#: agenda_culturel/models.py:1292 +#: agenda_culturel/models.py:1289 msgid "recurrent import" msgstr "import récurrent" -#: agenda_culturel/models.py:1294 +#: agenda_culturel/models.py:1291 msgid "a non authenticated user" msgstr "un utilisateur non connecté" -#: agenda_culturel/models.py:1786 +#: agenda_culturel/models.py:1807 msgid "Your event has been published" msgstr "Ton événement a été publié" -#: agenda_culturel/models.py:1791 +#: agenda_culturel/models.py:1812 msgid "Your message has not been retained" msgstr "Ton événement n'a pas été retenu" -#: agenda_culturel/models.py:1874 agenda_culturel/models.py:2701 +#: agenda_culturel/models.py:1895 agenda_culturel/models.py:2724 msgid "Warning" msgstr "Warning" -#: agenda_culturel/models.py:1876 agenda_culturel/models.py:1982 +#: agenda_culturel/models.py:1897 agenda_culturel/models.py:2003 msgid "the date has not been imported correctly." msgstr "la date n'a pas été importée correctement." -#: agenda_culturel/models.py:1964 +#: agenda_culturel/models.py:1985 msgid "during import process" msgstr "pendant le processus d'import" -#: agenda_culturel/models.py:1980 agenda_culturel/models.py:1990 -#: agenda_culturel/models.py:2001 +#: agenda_culturel/models.py:2001 agenda_culturel/models.py:2011 +#: agenda_culturel/models.py:2022 msgid "warning" msgstr "attention" -#: agenda_culturel/models.py:1992 +#: agenda_culturel/models.py:2013 msgid "the title has not been imported correctly." msgstr "le titre n'a pas été importé correctement." -#: agenda_culturel/models.py:2004 +#: agenda_culturel/models.py:2025 msgid "The import was unable to find an event in the page." msgstr "L'import a été incapable de trouver un événement dans la page." -#: agenda_culturel/models.py:2356 +#: agenda_culturel/models.py:2379 msgid "Updated field(s): " msgstr "Champ(s) mis à jour: " -#: agenda_culturel/models.py:2360 +#: agenda_culturel/models.py:2383 msgid "Update" msgstr "Mise à jour" -#: agenda_culturel/models.py:2361 +#: agenda_culturel/models.py:2384 msgid "update process" msgstr "processus de mise à jour" -#: agenda_culturel/models.py:2430 +#: agenda_culturel/models.py:2453 msgid "Import" msgstr "Import" -#: agenda_culturel/models.py:2431 +#: agenda_culturel/models.py:2454 msgid "import process" msgstr "processus d'import" -#: agenda_culturel/models.py:2433 +#: agenda_culturel/models.py:2456 msgid "" "The duration of the event is a little too long for direct publication. " "Moderators can choose to publish it or not." @@ -960,199 +960,199 @@ 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:2692 +#: agenda_culturel/models.py:2715 msgid "From contributor" msgstr "D'un·e contributeurice" -#: agenda_culturel/models.py:2693 +#: agenda_culturel/models.py:2716 msgid "Import process" msgstr "Processus d'import" -#: agenda_culturel/models.py:2694 +#: agenda_culturel/models.py:2717 msgid "Update process" msgstr "Processus de mise à jour" -#: agenda_culturel/models.py:2695 +#: agenda_culturel/models.py:2718 msgid "Contact form" msgstr "Formulaire de contact" -#: agenda_culturel/models.py:2696 +#: agenda_culturel/models.py:2719 msgid "Event report" msgstr "Signalemet d'événement" -#: agenda_culturel/models.py:2699 +#: agenda_culturel/models.py:2722 msgid "From contributor (without message)" msgstr "D'un·e contributeurice (sans message)" -#: agenda_culturel/models.py:2705 +#: agenda_culturel/models.py:2728 msgid "Messages" msgstr "Messages" -#: agenda_culturel/models.py:2714 +#: agenda_culturel/models.py:2737 msgid "Subject" msgstr "Sujet" -#: agenda_culturel/models.py:2715 +#: agenda_culturel/models.py:2738 msgid "The subject of your message" msgstr "Sujet de votre message" -#: agenda_culturel/models.py:2721 +#: agenda_culturel/models.py:2744 msgid "Related event" msgstr "Événement associé" -#: agenda_culturel/models.py:2722 +#: agenda_culturel/models.py:2745 msgid "The message is associated with this event." msgstr "Le message est associé à cet événement." -#: agenda_culturel/models.py:2730 +#: agenda_culturel/models.py:2753 msgid "Author of the message" msgstr "Auteur du message" -#: agenda_culturel/models.py:2738 +#: agenda_culturel/models.py:2761 msgid "Your name" msgstr "Votre nom" -#: agenda_culturel/models.py:2744 +#: agenda_culturel/models.py:2767 msgid "Email address" msgstr "Adresse email" -#: agenda_culturel/models.py:2751 +#: agenda_culturel/models.py:2774 msgid "Your message" msgstr "Votre message" -#: agenda_culturel/models.py:2758 +#: agenda_culturel/models.py:2781 msgid "This message is a spam." msgstr "Ce message est un spam." -#: agenda_culturel/models.py:2765 +#: agenda_culturel/models.py:2788 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:2771 +#: agenda_culturel/models.py:2794 msgid "Comments on the message from the moderation team" msgstr "Commentaires sur ce message par l'équipe de modération" -#: agenda_culturel/models.py:2804 agenda_culturel/models.py:2982 +#: agenda_culturel/models.py:2827 agenda_culturel/models.py:3005 msgid "Recurrent import" msgstr "Import récurrent" -#: agenda_culturel/models.py:2805 +#: agenda_culturel/models.py:2828 msgid "Recurrent imports" msgstr "Imports récurrents" -#: agenda_culturel/models.py:2809 +#: agenda_culturel/models.py:2832 msgid "ical" msgstr "ical" -#: agenda_culturel/models.py:2810 +#: agenda_culturel/models.py:2833 msgid "ical no busy" msgstr "ical sans busy" -#: agenda_culturel/models.py:2811 +#: agenda_culturel/models.py:2834 msgid "ical no VC" msgstr "ical sans VC" -#: agenda_culturel/models.py:2812 +#: agenda_culturel/models.py:2835 msgid "ical naive timezone" msgstr "ical timezone naïve" -#: agenda_culturel/models.py:2813 +#: agenda_culturel/models.py:2836 msgid "lacoope.org" msgstr "lacoope.org" -#: agenda_culturel/models.py:2814 +#: agenda_culturel/models.py:2837 msgid "la comédie" msgstr "la comédie" -#: agenda_culturel/models.py:2815 +#: agenda_culturel/models.py:2838 msgid "le fotomat" msgstr "le fotomat" -#: agenda_culturel/models.py:2816 +#: agenda_culturel/models.py:2839 msgid "la puce à l'oreille" msgstr "la puce à loreille" -#: agenda_culturel/models.py:2817 +#: agenda_culturel/models.py:2840 msgid "Plugin wordpress MEC" msgstr "Plugin wordpress MEC" -#: agenda_culturel/models.py:2818 +#: agenda_culturel/models.py:2841 msgid "Événements d'une page FB" msgstr "Événements d'une page FB" -#: agenda_culturel/models.py:2819 +#: agenda_culturel/models.py:2842 msgid "Billetterie Clermont-Ferrand" msgstr "" -#: agenda_culturel/models.py:2820 +#: agenda_culturel/models.py:2843 msgid "Arachnée concert" msgstr "Arachnée concert" -#: agenda_culturel/models.py:2821 +#: agenda_culturel/models.py:2844 msgid "Le Rio" msgstr "Le Rio" -#: agenda_culturel/models.py:2822 +#: agenda_culturel/models.py:2845 msgid "La Raymonde" msgstr "La Raymone" -#: agenda_culturel/models.py:2823 +#: agenda_culturel/models.py:2846 msgid "Agenda apidae tourisme" msgstr "Agenda apidae tourisme" -#: agenda_culturel/models.py:2824 +#: agenda_culturel/models.py:2847 msgid "Agenda iguana (médiathèques)" msgstr "Agenda iguana (médiathèques)" -#: agenda_culturel/models.py:2825 +#: agenda_culturel/models.py:2848 msgid "Mille formes" msgstr "Mille Formes" -#: agenda_culturel/models.py:2826 +#: agenda_culturel/models.py:2849 msgid "Les Amis du Temps des Cerises" msgstr "Les Amis du Temps des Cerises" -#: agenda_culturel/models.py:2827 +#: agenda_culturel/models.py:2850 msgid "Mobilizon" msgstr "Mobilizon" -#: agenda_culturel/models.py:2828 +#: agenda_culturel/models.py:2851 msgid "Le caméléon" msgstr "" -#: agenda_culturel/models.py:2829 +#: agenda_culturel/models.py:2852 msgid "Echosciences" msgstr "" -#: agenda_culturel/models.py:2830 +#: agenda_culturel/models.py:2853 msgid "Hello Asso" msgstr "Hello Asso" -#: agenda_culturel/models.py:2833 +#: agenda_culturel/models.py:2856 msgid "simple" msgstr "simple" -#: agenda_culturel/models.py:2834 +#: agenda_culturel/models.py:2857 msgid "Headless Chromium" msgstr "chromium sans interface" -#: agenda_culturel/models.py:2837 +#: agenda_culturel/models.py:2860 msgid "Headless Chromium (pause)" msgstr "chromium sans interface (pause)" -#: agenda_culturel/models.py:2843 +#: agenda_culturel/models.py:2866 msgid "daily" msgstr "chaque jour" -#: agenda_culturel/models.py:2845 +#: agenda_culturel/models.py:2868 msgid "weekly" msgstr "chaque semaine" -#: agenda_culturel/models.py:2846 +#: agenda_culturel/models.py:2869 msgid "never" msgstr "jamais" -#: agenda_culturel/models.py:2851 +#: agenda_culturel/models.py:2874 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." @@ -1160,151 +1160,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:2858 +#: agenda_culturel/models.py:2881 msgid "Processor" msgstr "Processeur" -#: agenda_culturel/models.py:2864 +#: agenda_culturel/models.py:2887 msgid "Downloader" msgstr "Téléchargeur" -#: agenda_culturel/models.py:2871 +#: agenda_culturel/models.py:2894 msgid "Import recurrence" msgstr "Récurrence d'import" -#: agenda_culturel/models.py:2878 +#: agenda_culturel/models.py:2901 msgid "Source" msgstr "Source" -#: agenda_culturel/models.py:2879 +#: agenda_culturel/models.py:2902 msgid "URL of the source document" msgstr "URL du document source" -#: agenda_culturel/models.py:2884 +#: agenda_culturel/models.py:2907 msgid "Browsable url" msgstr "URL navigable" -#: agenda_culturel/models.py:2886 +#: agenda_culturel/models.py:2909 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:2895 +#: agenda_culturel/models.py:2918 msgid "Status of each imported event (published or draft)" msgstr "Status de chaque événement importé (publié ou brouillon)" -#: agenda_culturel/models.py:2900 +#: agenda_culturel/models.py:2923 msgid "Address for each imported event" msgstr "Adresse de chaque événement importé" -#: agenda_culturel/models.py:2907 +#: agenda_culturel/models.py:2930 msgid "Force location" msgstr "Focer la localisation" -#: agenda_culturel/models.py:2908 +#: agenda_culturel/models.py:2931 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:2914 +#: agenda_culturel/models.py:2937 msgid "Organiser" msgstr "Organisation" -#: agenda_culturel/models.py:2915 +#: agenda_culturel/models.py:2938 msgid "Organiser of each imported event" msgstr "Organisme à l'origine de chaque événement importé" -#: agenda_culturel/models.py:2925 +#: agenda_culturel/models.py:2948 msgid "Category of each imported event" msgstr "Catégorie de chaque événement importé" -#: agenda_culturel/models.py:2933 +#: agenda_culturel/models.py:2956 msgid "Tags for each imported event" msgstr "Étiquettes de chaque événement importé" -#: agenda_culturel/models.py:2934 +#: agenda_culturel/models.py:2957 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:2963 +#: agenda_culturel/models.py:2986 msgid "Running" msgstr "En cours" -#: agenda_culturel/models.py:2964 +#: agenda_culturel/models.py:2987 msgid "Canceled" msgstr "Annulé" -#: agenda_culturel/models.py:2965 +#: agenda_culturel/models.py:2988 msgid "Success" msgstr "Succès" -#: agenda_culturel/models.py:2966 +#: agenda_culturel/models.py:2989 msgid "Failed" msgstr "Erreur" -#: agenda_culturel/models.py:2969 +#: agenda_culturel/models.py:2992 msgid "Batch importation" msgstr "Importation par lot" -#: agenda_culturel/models.py:2970 +#: agenda_culturel/models.py:2993 msgid "Batch importations" msgstr "Importations par lot" -#: agenda_culturel/models.py:2983 +#: agenda_culturel/models.py:3006 msgid "Reference to the recurrent import processing" msgstr "Référence du processus d'import récurrent" -#: agenda_culturel/models.py:2991 +#: agenda_culturel/models.py:3014 msgid "URL (if not recurrent import)" msgstr "URL (si pas d'import récurrent)" -#: agenda_culturel/models.py:2992 +#: agenda_culturel/models.py:3015 msgid "Source URL if no RecurrentImport is associated." msgstr "URL source si aucun import récurrent n'est associé" -#: agenda_culturel/models.py:3007 +#: agenda_culturel/models.py:3030 msgid "Error message" msgstr "Votre message" -#: agenda_culturel/models.py:3011 +#: agenda_culturel/models.py:3034 msgid "Number of collected events" msgstr "Nombre d'événements collectés" -#: agenda_culturel/models.py:3014 +#: agenda_culturel/models.py:3037 msgid "Number of imported events" msgstr "Nombre d'événements importés" -#: agenda_culturel/models.py:3017 +#: agenda_culturel/models.py:3040 msgid "Number of updated events" msgstr "Nombre d'événements mis à jour" -#: agenda_culturel/models.py:3020 +#: agenda_culturel/models.py:3043 msgid "Number of removed events" msgstr "Nombre d'événements supprimés" -#: agenda_culturel/models.py:3028 +#: agenda_culturel/models.py:3051 msgid "Weight" msgstr "Poids" -#: agenda_culturel/models.py:3029 +#: agenda_culturel/models.py:3052 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:3036 +#: agenda_culturel/models.py:3059 msgid "Category applied to the event" msgstr "Catégorie appliquée à l'événement" -#: agenda_culturel/models.py:3041 +#: agenda_culturel/models.py:3064 msgid "Contained in the title" msgstr "Contenu dans le titre" -#: agenda_culturel/models.py:3042 +#: agenda_culturel/models.py:3065 msgid "Text contained in the event title" msgstr "Texte contenu dans le titre de l'événement" -#: agenda_culturel/models.py:3048 +#: agenda_culturel/models.py:3071 msgid "Exact title extract" msgstr "Extrait exact du titre" -#: agenda_culturel/models.py:3050 +#: agenda_culturel/models.py:3073 msgid "" "If checked, the extract will be searched for in the title using the exact " "form (capitals, accents)." @@ -1312,19 +1312,19 @@ msgstr "" "Si coché, l'extrait sera recherché dans le titre en utilisant la forme " "exacte (majuscules, accents)" -#: agenda_culturel/models.py:3056 +#: agenda_culturel/models.py:3079 msgid "Contained in the description" msgstr "Contenu dans la description" -#: agenda_culturel/models.py:3057 +#: agenda_culturel/models.py:3080 msgid "Text contained in the description" msgstr "Texte contenu dans la description" -#: agenda_culturel/models.py:3063 +#: agenda_culturel/models.py:3086 msgid "Exact description extract" msgstr "Extrait exact de description" -#: agenda_culturel/models.py:3065 +#: agenda_culturel/models.py:3088 msgid "" "If checked, the extract will be searched for in the description using the " "exact form (capitals, accents)." @@ -1332,19 +1332,19 @@ msgstr "" "Si coché, l'extrait sera recherché dans la description en utilisant la forme " "exacte (majuscules, accents)" -#: agenda_culturel/models.py:3071 +#: agenda_culturel/models.py:3094 msgid "Contained in the location" msgstr "Contenu dans la localisation" -#: agenda_culturel/models.py:3072 +#: agenda_culturel/models.py:3095 msgid "Text contained in the event location" msgstr "Texte contenu dans la localisation de l'événement" -#: agenda_culturel/models.py:3078 +#: agenda_culturel/models.py:3101 msgid "Exact location extract" msgstr "Extrait exact de localisation" -#: agenda_culturel/models.py:3080 +#: agenda_culturel/models.py:3103 msgid "" "If checked, the extract will be searched for in the location using the exact " "form (capitals, accents)." @@ -1352,51 +1352,51 @@ msgstr "" "Si coché, l'extrait sera recherché dans la localisation en utilisant la " "forme exacte (majuscules, accents)" -#: agenda_culturel/models.py:3088 +#: agenda_culturel/models.py:3111 msgid "Location from place" msgstr "Localisation depuis le lieu" -#: agenda_culturel/models.py:3097 +#: agenda_culturel/models.py:3120 msgid "Categorisation rule" msgstr "Règle de catégorisation" -#: agenda_culturel/models.py:3098 +#: agenda_culturel/models.py:3121 msgid "Categorisation rules" msgstr "Règles de catégorisation" -#: agenda_culturel/models.py:3172 +#: agenda_culturel/models.py:3195 msgid "Period name" msgstr "Nom de la période" -#: agenda_culturel/models.py:3177 +#: agenda_culturel/models.py:3200 msgid "Special period" msgstr "Période remarquable" -#: agenda_culturel/models.py:3178 +#: agenda_culturel/models.py:3201 msgid "Special periods" msgstr "Périodes remarquables" -#: agenda_culturel/models.py:3184 +#: agenda_culturel/models.py:3207 msgid "public holidays" msgstr "Jour férié" -#: agenda_culturel/models.py:3185 +#: agenda_culturel/models.py:3208 msgid "school vacations" msgstr "Vacances scolaires" -#: agenda_culturel/models.py:3203 +#: agenda_culturel/models.py:3226 msgid "The end date must be after or equal to the start date." msgstr "La date de fin doit être après ou identique à la date de début." -#: agenda_culturel/models.py:3211 +#: agenda_culturel/models.py:3234 msgid " on " msgstr " du " -#: agenda_culturel/models.py:3214 +#: agenda_culturel/models.py:3237 msgid " from " msgstr " du " -#: agenda_culturel/models.py:3214 +#: agenda_culturel/models.py:3237 msgid " to " msgstr " au " @@ -1404,43 +1404,43 @@ msgstr " au " msgid "French" msgstr "français" -#: agenda_culturel/views.py:175 +#: agenda_culturel/views.py:176 msgid "Recurrent import name" msgstr "Nome de l'import récurrent" -#: agenda_culturel/views.py:176 +#: agenda_culturel/views.py:177 msgid "Add another" msgstr "Ajouter un autre" -#: agenda_culturel/views.py:177 +#: agenda_culturel/views.py:178 msgid "Browse..." msgstr "Naviguer..." -#: agenda_culturel/views.py:178 +#: agenda_culturel/views.py:179 msgid "No file selected." msgstr "Pas de fichier sélectionné." -#: agenda_culturel/views.py:196 +#: agenda_culturel/views.py:197 msgid ": error 500" msgstr ": erreur 500" -#: agenda_culturel/views.py:197 +#: agenda_culturel/views.py:198 msgid "An internal error has occurred on site {} at address {}." msgstr "Une erreur interne s'est produite sur le site {} à l'adresse {}." -#: agenda_culturel/views.py:236 +#: agenda_culturel/views.py:237 msgid "Moderation rules" msgstr "Règles de modération" -#: agenda_culturel/views.py:245 +#: agenda_culturel/views.py:246 msgid "Import requirements" msgstr "Besoins pour l'import" -#: agenda_culturel/views.py:451 +#: agenda_culturel/views.py:452 msgid "The static content has been successfully updated." msgstr "Le contenu statique a été modifié avec succès." -#: agenda_culturel/views.py:462 +#: agenda_culturel/views.py:463 msgid "" "The event cannot be updated because the import process is not available for " "the referenced sources." @@ -1448,21 +1448,21 @@ msgstr "" "La mise à jour de l'événement n'est pas possible car le processus d'import " "n'est pas disponible pour les sources référencées." -#: agenda_culturel/views.py:475 +#: agenda_culturel/views.py:476 msgid "The event update has been queued and will be completed shortly." msgstr "" "La mise à jour de l'événement a été mise en attente et sera effectuée sous " "peu." -#: agenda_culturel/views.py:504 agenda_culturel/views.py:588 +#: agenda_culturel/views.py:505 agenda_culturel/views.py:589 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:508 +#: agenda_culturel/views.py:509 msgid "The event has been successfully modified." msgstr "L'événement a été modifié avec succès." -#: agenda_culturel/views.py:532 +#: agenda_culturel/views.py:533 msgid "" "Changes will be visible on a local copy of the event. The version identical " "to the imported source will be hidden." @@ -1470,19 +1470,19 @@ msgstr "" "Les modifications seront visibles sur une copie locale de l'événement. La " "version fidèle à la source importée sera masquée." -#: agenda_culturel/views.py:593 +#: agenda_culturel/views.py:594 msgid "The event {} has been moderated with success." msgstr "L'événement {} a été modéré avec succès." -#: agenda_culturel/views.py:742 +#: agenda_culturel/views.py:743 msgid "The event has been successfully deleted." msgstr "L'événement a été supprimé avec succès." -#: agenda_culturel/views.py:822 +#: agenda_culturel/views.py:823 msgid "Comment" msgstr "Commentaire" -#: agenda_culturel/views.py:846 +#: agenda_culturel/views.py:847 msgid "" "The status has been successfully modified and a message has been sent to the " "person who proposed the event." @@ -1490,11 +1490,23 @@ 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:850 +#: agenda_culturel/views.py:851 msgid "The status has been successfully modified." msgstr "Le status a été modifié avec succès." -#: agenda_culturel/views.py:871 +#: agenda_culturel/views.py:879 agenda_culturel/views.py:1091 +#: agenda_culturel/views.py:1160 +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 actuellement en cours de modération." + +#: agenda_culturel/views.py:889 agenda_culturel/views.py:1082 +#: agenda_culturel/views.py:1151 +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:899 msgid "" "This type of address is known to the calendar, so an automatic import is " "proposed." @@ -1502,7 +1514,7 @@ msgstr "" "Ce type d'adresse est connue du calendrier, alors un import automatique est " "proposé." -#: agenda_culturel/views.py:876 +#: agenda_culturel/views.py:912 msgid "" "This type of address is unknown to the agenda. As a logged-in user, you can " "still try to import the event, which may work if the page contains a google " @@ -1514,7 +1526,7 @@ msgstr "" "lorsque la page contient un lien google agenda par exemple. Dans le doute, " "privilégie une saisie manuelle." -#: agenda_culturel/views.py:879 +#: agenda_culturel/views.py:923 msgid "" "This type of address is unknown to the calendar, so we suggest that you " "enter the information for the event you wish to import, in addition to the " @@ -1524,11 +1536,11 @@ msgstr "" "informations de l'événement que tu souhaites importer, pour compléter " "l'adresse que tu nous as donnée." -#: agenda_culturel/views.py:916 +#: agenda_culturel/views.py:959 msgid "The event was created: {}." msgstr "L'événement a été créé: {}." -#: agenda_culturel/views.py:922 +#: agenda_culturel/views.py:965 msgid "" "The event has been submitted and will be published as soon as it has been " "validated by the moderation team." @@ -1536,99 +1548,89 @@ 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:936 +#: agenda_culturel/views.py:979 msgid "during the creation process" msgstr "pendant le processus d'import" -#: agenda_culturel/views.py:959 +#: agenda_culturel/views.py:1002 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:1052 agenda_culturel/views.py:1121 -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:1061 agenda_culturel/views.py:1130 -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:1073 +#: agenda_culturel/views.py:1103 msgid "Integrating {} url(s) into our import process." msgstr "Intégration de {} url(s) dans notre processus d'import." -#: agenda_culturel/views.py:1139 +#: agenda_culturel/views.py:1169 msgid "Integrating {} into our import process." msgstr "Intégration de {} dans notre processus d'import." -#: agenda_culturel/views.py:1261 +#: agenda_culturel/views.py:1291 msgid "Your message has been sent successfully." msgstr "Votre message a été envoyé avec succès." -#: agenda_culturel/views.py:1294 +#: agenda_culturel/views.py:1324 msgid "Reporting the event {} on {}" msgstr "Signaler l'événement {} du {}" -#: agenda_culturel/views.py:1304 +#: agenda_culturel/views.py:1334 msgid "The contact message has been successfully deleted." msgstr "Le message de contact a été supprimé avec succès." -#: agenda_culturel/views.py:1320 +#: agenda_culturel/views.py:1350 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:1498 +#: agenda_culturel/views.py:1528 msgid "Spam has been successfully deleted." msgstr "Le spam a été supprimé avec succès" -#: agenda_culturel/views.py:1675 +#: agenda_culturel/views.py:1705 msgid "The import has been run successfully." msgstr "L'import a été lancé avec succès" -#: agenda_culturel/views.py:1697 +#: agenda_culturel/views.py:1727 msgid "The import has been canceled." msgstr "L'import a été annulé" -#: agenda_culturel/views.py:1720 +#: agenda_culturel/views.py:1750 msgid "The orphan event update has been launched." msgstr "La mise à jour de l'événement orphelin a été lancée." -#: agenda_culturel/views.py:1816 +#: agenda_culturel/views.py:1846 msgid "The recurrent import has been successfully modified." msgstr "L'import récurrent a été modifié avec succès." -#: agenda_culturel/views.py:1828 +#: agenda_culturel/views.py:1858 msgid "The recurrent import has been successfully deleted." msgstr "L'import récurrent a été supprimé avec succès" -#: agenda_culturel/views.py:1874 +#: agenda_culturel/views.py:1904 msgid "The import has been launched." msgstr "L'import a été lancé" -#: agenda_culturel/views.py:1901 +#: agenda_culturel/views.py:1931 msgid "Imports has been launched." msgstr "Les imports ont été lancés" -#: agenda_culturel/views.py:1923 +#: agenda_culturel/views.py:1953 msgid "Facebook imports has been launched." msgstr "Les imports Facebook ont été lancés" -#: agenda_culturel/views.py:1986 +#: agenda_culturel/views.py:2016 msgid "Update successfully completed." msgstr "Mise à jour réalisée avec succès." -#: agenda_culturel/views.py:2054 +#: agenda_culturel/views.py:2084 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:2091 +#: agenda_culturel/views.py:2121 msgid "Events have been marked as unduplicated." msgstr "Les événements ont été marqués comme non dupliqués." -#: agenda_culturel/views.py:2108 agenda_culturel/views.py:2125 -#: agenda_culturel/views.py:2154 +#: agenda_culturel/views.py:2138 agenda_culturel/views.py:2155 +#: agenda_culturel/views.py:2184 msgid "" "The selected item is no longer included in the list of duplicates. Someone " "else has probably modified the list in the meantime." @@ -1636,23 +1638,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:2115 +#: agenda_culturel/views.py:2145 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:2140 +#: agenda_culturel/views.py:2170 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:2190 +#: agenda_culturel/views.py:2220 msgid "Cleaning up duplicates: {} item(s) fixed." msgstr "Nettoyage des dupliqués: {} élément(s) corrigé(s)." -#: agenda_culturel/views.py:2239 +#: agenda_culturel/views.py:2269 msgid "The event was successfully duplicated." msgstr "L'événement a été marqué dupliqué avec succès." -#: agenda_culturel/views.py:2247 +#: agenda_culturel/views.py:2277 msgid "" "The event has been successfully flagged as a duplicate. The moderation team " "will deal with your suggestion shortly." @@ -1660,32 +1662,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:2309 +#: agenda_culturel/views.py:2339 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:2321 +#: agenda_culturel/views.py:2351 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:2343 +#: agenda_culturel/views.py:2373 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:2350 +#: agenda_culturel/views.py:2380 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:2357 agenda_culturel/views.py:2421 +#: agenda_culturel/views.py:2387 agenda_culturel/views.py:2451 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:2407 +#: agenda_culturel/views.py:2437 msgid "" "The rules were successfully applied and 1 event with default category was " "categorised." @@ -1693,7 +1695,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:2414 +#: agenda_culturel/views.py:2444 msgid "" "The rules were successfully applied and {} events with default category were " "categorised." @@ -1701,59 +1703,59 @@ 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:2520 agenda_culturel/views.py:2582 -#: agenda_culturel/views.py:2626 +#: agenda_culturel/views.py:2554 agenda_culturel/views.py:2621 +#: agenda_culturel/views.py:2665 msgid "{} events have been updated." msgstr "{} événements ont été mis à jour." -#: agenda_culturel/views.py:2523 agenda_culturel/views.py:2584 -#: agenda_culturel/views.py:2629 +#: agenda_culturel/views.py:2557 agenda_culturel/views.py:2623 +#: agenda_culturel/views.py:2668 msgid "1 event has been updated." msgstr "1 événement a été mis à jour" -#: agenda_culturel/views.py:2525 agenda_culturel/views.py:2586 -#: agenda_culturel/views.py:2631 +#: agenda_culturel/views.py:2559 agenda_culturel/views.py:2625 +#: agenda_culturel/views.py:2670 msgid "No events have been modified." msgstr "Aucun événement n'a été modifié." -#: agenda_culturel/views.py:2534 +#: agenda_culturel/views.py:2568 msgid "The place has been successfully updated." msgstr "Le lieu a été modifié avec succès." -#: agenda_culturel/views.py:2543 +#: agenda_culturel/views.py:2577 msgid "The place has been successfully created." msgstr "Le lieu a été créé avec succès." -#: agenda_culturel/views.py:2611 +#: agenda_culturel/views.py:2650 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:2618 +#: agenda_culturel/views.py:2657 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:2745 +#: agenda_culturel/views.py:2784 msgid "The organisation has been successfully updated." msgstr "L'organisme a été modifié avec succès." -#: agenda_culturel/views.py:2752 +#: agenda_culturel/views.py:2791 msgid "The organisation has been successfully created." msgstr "L'organisme a été créé avec succès." -#: agenda_culturel/views.py:2771 +#: agenda_culturel/views.py:2810 msgid "The tag has been successfully updated." msgstr "L'étiquette a été modifiée avec succès." -#: agenda_culturel/views.py:2778 +#: agenda_culturel/views.py:2817 msgid "The tag has been successfully created." msgstr "L'étiquette a été créée avec succès." -#: agenda_culturel/views.py:2878 +#: agenda_culturel/views.py:2917 msgid "You have not modified the tag name." msgstr "Vous n'avez pas modifié le nom de l'étiquette." -#: agenda_culturel/views.py:2893 +#: agenda_culturel/views.py:2932 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 " @@ -1766,7 +1768,7 @@ msgstr "" "sera supprimée, et tous les événements associés à l'étiquette {} seront " "associés à l'étiquette {}." -#: agenda_culturel/views.py:2907 +#: agenda_culturel/views.py:2946 msgid "" "This tag {} is already in use. You can force renaming by checking the " "corresponding option." @@ -1774,55 +1776,55 @@ msgstr "" "Cette étiquette {} est déjà utilisée. Vous pouvez forcer le renommage en " "cochant l'option correspondante." -#: agenda_culturel/views.py:2940 +#: agenda_culturel/views.py:2979 msgid "The tag {} has been successfully renamed to {}." msgstr "L'étiquette {} a été renommée avec succès en {}." -#: agenda_culturel/views.py:2982 +#: agenda_culturel/views.py:3021 msgid "The tag {} has been successfully deleted." msgstr "L'événement {} a été supprimé avec succès." -#: agenda_culturel/views.py:3129 +#: agenda_culturel/views.py:3168 msgid "Cache successfully cleared." msgstr "Le cache a été vidé avec succès." -#: agenda_culturel/views.py:3149 +#: agenda_culturel/views.py:3188 msgid "Your user profile has been successfully modified." msgstr "Votre profil utilisateur a été modifié avec succès." -#: agenda_culturel/views.py:3167 +#: agenda_culturel/views.py:3206 msgid "The special period has been successfully created." msgstr "La période remarquable a été créée avec succès." -#: agenda_culturel/views.py:3188 +#: agenda_culturel/views.py:3227 msgid "The special period has been successfully deleted." msgstr "La période remarquable a été supprimée avec succès." -#: agenda_culturel/views.py:3199 +#: agenda_culturel/views.py:3238 msgid "The special period has been successfully updated." msgstr "La période remarquable a été modifiée avec succès." -#: agenda_culturel/views.py:3216 +#: agenda_culturel/views.py:3255 #, python-format msgid "%(nb_created)d interval inserted." msgid_plural "%(nb_created)d intervals inserted." msgstr[0] "%(nb_created)d intervalle inséré." msgstr[1] "%(nb_created)d intervalles insérés." -#: agenda_culturel/views.py:3227 +#: agenda_culturel/views.py:3266 #, python-format msgid "%(nb_overlap)d insersion was not possible due to overlap." msgid_plural "%(nb_overlap)d insersion were not possible due to overlap." msgstr[0] "%(nb_overlap)d insersion impossible à cause d'une intersection." msgstr[1] "%(nb_overlap)d insersions impossibles à cause d'une intersection." -#: agenda_culturel/views.py:3238 +#: agenda_culturel/views.py:3277 #, python-format msgid "%(nb_error)d error while reading ical file." msgid_plural "%(nb_error)d error while reading ical file." msgstr[0] "%(nb_error)d erreur pendant la lecture du fichier ical." msgstr[1] "%(nb_error)d erreurs pendant la lecture du fichier ical." -#: agenda_culturel/views.py:3246 +#: agenda_culturel/views.py:3285 msgid "Error during file reading: {}" msgstr "Erreur pendant la lecture du fichier: {}" diff --git a/src/agenda_culturel/models.py b/src/agenda_culturel/models.py index 9bce903..81cf1c0 100644 --- a/src/agenda_culturel/models.py +++ b/src/agenda_culturel/models.py @@ -1487,6 +1487,30 @@ class Event(models.Model): ] return [nb_not_moderated[x : x + 7] for x in range(0, len(nb_not_moderated), 7)] + def is_know_url_get_visible_event(url, auth): + evs = Event.objects.filter(uuids__contains=[url]) + if auth: + e = evs.first() + if e is not None: + if e.is_representative(): + return e + else: + return e.other_versions.representative + else: + return False + else: + e_all = evs.exists() + if not e_all: + return False + else: + e = evs.first() + if e is not None: + if not e.is_representative(): + e = e.other_versions.representative + return e if e.status == Event.STATUS.PUBLISHED else True + else: + return False + def nb_draft_events(): return Event.objects.filter(status=Event.STATUS.DRAFT).count() diff --git a/src/agenda_culturel/views.py b/src/agenda_culturel/views.py index 09d7b54..70efbbe 100644 --- a/src/agenda_culturel/views.py +++ b/src/agenda_culturel/views.py @@ -869,15 +869,48 @@ def import_event_proxy(request): if form.is_valid(): url = form.cleaned_data["url"] if Extractor.is_known_url_default_extractors(url): - messages.info( - request, - _( - "This type of address is known to the calendar, so an automatic import is proposed." - ), - ) - return HttpResponseRedirect( - reverse_lazy("add_event_url") + "?url=" + quote(url) + c_url = Extractor.clean_url_default_extractors(url) + + ex = Event.is_know_url_get_visible_event( + c_url, request.user.is_authenticated ) + if ex is True: + messages.info( + request, + _( + "{} has not been submitted since it" + "s already known and currently into moderation process." + ).format(c_url), + ) + return HttpResponseRedirect(reverse_lazy("home")) + elif isinstance(ex, Event): + messages.info( + request, + mark_safe( + _( + "{} has not been submitted since it" + "s already known: {}." + ).format( + c_url, + '' + + escape(ex.title) + + "", + ) + ), + ) + return HttpResponseRedirect(ex.get_absolute_url()) + else: + messages.info( + request, + _( + "This type of address is known to the calendar, so an automatic import is proposed." + ), + ) + return HttpResponseRedirect( + reverse_lazy("add_event_url") + "?url=" + quote(c_url) + ) else: manual = reverse_lazy("add_event_details") + "?url=" + quote(url) if request.user.is_authenticated: @@ -995,43 +1028,32 @@ class URLEventEvaluation: self.url = form.cleaned_data.get("url") self.event = None if self.url is not None: - self.url = Extractor.clean_url(self.url) + self.url = Extractor.clean_url_default_extractors(self.url) + print(self.url) # we check if the url is known - self.existing = Event.objects.filter(uuids__contains=[self.url]) - # if it's unknown - if len(self.existing) == 0: - self.existing = None + self.existing = Event.is_know_url_get_visible_event( + self.url, is_authenticated + ) + if self.existing is False: self.cat = form.cleaned_data.get("category") if self.cat is not None: self.cat = self.cat.name self.tags = form.cleaned_data.get("tags") - else: - published = [ - e for e in self.existing if e.status == Event.STATUS.PUBLISHED - ] - - if self.is_authenticated or len(published) > 1: - self.event = ( - published[0] if len(published) > 1 else self.existing[0] - ) - else: - self.event = None - def exists(self): return self.url is not None def is_new(self): - return self.exists() and self.existing is None + return self.exists() and self.existing is False def is_event_visible(self): - return self.event is not None + return isinstance(self.existing, Event) def get_event(self): - if self.event is None: - return None + if isinstance(self.existing, Event): + return self.existing else: - return self.event + return None def get_link(self): e = self.get_event() @@ -1130,7 +1152,7 @@ def import_from_url(request): # if the form is valid if form.is_valid(): uc = URLEventEvaluation(form, request.user.is_authenticated) - + print(uc.exists(), uc.is_new(), uc.event) if uc.exists() and not uc.is_new(): if uc.is_event_visible(): messages.info(