From c52f53aed91004ee927a58d10350c7ad44478bd8 Mon Sep 17 00:00:00 2001 From: Roman Kysil Date: Wed, 27 Nov 2024 12:25:15 +0100 Subject: [PATCH] bookings global export, extended filters (#219) * Intermediate commit * Doc * created control * Readme * Readme * Readme * Additional try/except * Additional try/except * Locales * Fix grammar * Locales --- CHANGES.rst | 3 +- README.rst | 10 +- .../prenotazioni/browser/bookings_export.py | 131 ++++++++++++--- .../en/LC_MESSAGES/redturtle.prenotazioni.po | 147 ++++++++++++----- .../it/LC_MESSAGES/redturtle.prenotazioni.po | 102 +++++++----- .../locales/redturtle.prenotazioni.pot | 156 +++++++++++++----- 6 files changed, 393 insertions(+), 156 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index 797c494c..238e89d0 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -5,7 +5,8 @@ Changelog 2.8.1 (unreleased) ------------------ -- Nothing changed yet. +- Extend bookings-export filters. + [folix-01] 2.8.0 (2024-11-26) diff --git a/README.rst b/README.rst index a29e842f..eca1332b 100644 --- a/README.rst +++ b/README.rst @@ -798,10 +798,16 @@ The script is located at src/redturtle/prenotazioni/scripts/notify_upcoming_book @@bookings-export ----------------- -Export bookings by passed **date** in ISO format or today by default. +All the time parameters below are ISO formatted datetime strings + +- **booking_start_from** - booking start from range. +- **booking_start_to** - booking start to range. +- **booking_creation_from** - booking created from range. +- **booking_creation_to** - bookking createtd to range +- **path** - booking folder path (es: "/Plone/booking_folder") Example:: - curl -i http://localhost:8080/Plone/@@bookings-export?date=2024-06-21 + curl -i http://localhost:8080/Plone/@@bookings-export?booking_start_from=2023-10-22T12:27:18 Response:: Binary csv file diff --git a/src/redturtle/prenotazioni/browser/bookings_export.py b/src/redturtle/prenotazioni/browser/bookings_export.py index 21940658..c9b794d5 100644 --- a/src/redturtle/prenotazioni/browser/bookings_export.py +++ b/src/redturtle/prenotazioni/browser/bookings_export.py @@ -16,7 +16,11 @@ class BookingsExport(BrowserView): filename = "Bookings_export" - date = None + booking_start_from = None + booking_start_to = None + booking_creation_from = None + booking_creation_to = None + path = None @property def csv_fields(self): @@ -49,25 +53,62 @@ def csv_fields(self): def csv_filename(self): """Return a filename for this csv""" - return "%s-%s.csv" % (self.filename, self.date.date().isoformat()) + return "%s_%s.csv" % ( + self.filename, + self.booking_start_from.date().isoformat() + + "-" + + self.booking_start_to.date().isoformat(), + ) @property def brains(self): + created = (self.booking_creation_from or self.booking_creation_to) and { + "query": (self.booking_creation_from and self.booking_creation_to) + and ( + get_default_timezone(True).localize(self.booking_creation_from), + get_default_timezone(True).localize(self.booking_creation_to), + ) + or self.booking_creation_from + and get_default_timezone(True).localize(self.booking_creation_from) + or self.booking_creation_to + and get_default_timezone(True).localize(self.booking_creation_to), + "range": (self.booking_creation_from and self.booking_creation_to) + and "min:max" + or self.booking_creation_from + and "min" + or self.booking_creation_to + and "max", + } - return api.portal.get_tool("portal_catalog").unrestrictedSearchResults( - portal_type="Prenotazione", - Date={ - "query": ( - get_default_timezone(True).localize(self.date), - get_default_timezone(True).localize( - self.date.replace(hour=23, minute=59) + if created: + return api.portal.get_tool("portal_catalog").unrestrictedSearchResults( + portal_type="Prenotazione", + Date={ + "query": ( + get_default_timezone(True).localize(self.booking_start_from), + get_default_timezone(True).localize(self.booking_start_to), ), - ), - "range": "min:max", - }, - review_state="confirmed", - sort_on="Date", - ) + "range": "min:max", + }, + review_state="confirmed", + sort_on="Date", + path=self.path and {"query": self.path} or "", + created=created, + ) + else: + return api.portal.get_tool("portal_catalog").unrestrictedSearchResults( + portal_type="Prenotazione", + Date={ + "query": ( + get_default_timezone(True).localize(self.booking_start_from), + get_default_timezone(True).localize(self.booking_start_to), + ), + "range": "min:max", + }, + review_state="confirmed", + sort_on="Date", + path=self.path and {"query": self.path} or "", + ) def setHeader(self, *args): """ @@ -145,19 +186,65 @@ def get_csv(self): return buffer.getvalue().encode("utf-8") def __call__(self): - date = self.request.get("date") + booking_start_from = self.request.get("booking_start_from") + booking_start_to = self.request.get("booking_start_to") + booking_creation_from = self.request.get("booking_creation_from") + booking_creation_to = self.request.get("booking_creation_to") + self.path = self.request.get("booking_folder_path") + + if not booking_start_from: + self.booking_start_from = datetime.datetime.now().replace( + hour=0, minute=0, second=0, microsecond=0 + ) + + else: + try: + self.booking_start_from = datetime.datetime.fromisoformat( + booking_start_from + ) + except ValueError: + raise BadRequest( + api.portal_translate(_("Badly composed `booking_start_from` value")) + ) - if not date: - self.date = datetime.datetime.combine( - datetime.date.today(), datetime.datetime.min.time() + if not booking_start_to: + self.booking_start_to = datetime.datetime.now().replace( + hour=23, minute=59, second=0, microsecond=0 ) else: try: - self.date = datetime.datetime.combine( - datetime.date.fromisoformat(date), datetime.datetime.min.time() + self.booking_start_to = datetime.datetime.fromisoformat( + booking_start_to + ) + except ValueError: + raise BadRequest( + api.portal_translate(_("Badly composed `booking_start_to` value")) + ) + + if booking_creation_from: + try: + self.booking_creation_from = datetime.datetime.fromisoformat( + booking_creation_from ) except ValueError: - raise BadRequest(_("Bad date format passed")) + raise BadRequest( + api.portal_translate( + _("Badly composed `booking_creation_from` value") + ) + ) + + if booking_creation_to: + try: + self.booking_creation_to = datetime.datetime.fromisoformat( + booking_creation_to + ) + except ValueError: + raise BadRequest( + api.portal_translate( + _("Badly composed `booking_creation_to` value") + ) + ) + self.setHeader( "Content-Disposition", "attachment;filename=%s" % self.csv_filename ) diff --git a/src/redturtle/prenotazioni/locales/en/LC_MESSAGES/redturtle.prenotazioni.po b/src/redturtle/prenotazioni/locales/en/LC_MESSAGES/redturtle.prenotazioni.po index de35c4ec..fae5aa09 100644 --- a/src/redturtle/prenotazioni/locales/en/LC_MESSAGES/redturtle.prenotazioni.po +++ b/src/redturtle/prenotazioni/locales/en/LC_MESSAGES/redturtle.prenotazioni.po @@ -1,7 +1,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2024-08-19 10:07+0000\n" +"POT-Creation-Date: 2024-11-27 11:24+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI +ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -31,6 +31,15 @@ msgstr "" msgid "Add" msgstr "" +#: redturtle/prenotazioni/restapi/services/booking/add.py:199 +#: redturtle/prenotazioni/restapi/services/booking/update.py:57 +msgid "Additional field '${additional_field_name}' is missing." +msgstr "" + +#: redturtle/prenotazioni/restapi/services/booking/add.py:216 +msgid "Additional field '${additional_field_name}' value is missing." +msgstr "" + #: redturtle/prenotazioni/content/prenotazioni_folder.py:444 #: redturtle/prenotazioni/content/validators.py:222 msgid "Afternoon start should not be greater than end." @@ -44,8 +53,20 @@ msgstr "" msgid "Attention" msgstr "" -#: redturtle/prenotazioni/browser/bookings_export.py:160 -msgid "Bad date format passed" +#: redturtle/prenotazioni/browser/bookings_export.py:232 +msgid "Badly composed `booking_creation_from` value" +msgstr "" + +#: redturtle/prenotazioni/browser/bookings_export.py:244 +msgid "Badly composed `booking_creation_to` value" +msgstr "" + +#: redturtle/prenotazioni/browser/bookings_export.py:207 +msgid "Badly composed `booking_start_from` value" +msgstr "" + +#: redturtle/prenotazioni/browser/bookings_export.py:221 +msgid "Badly composed `booking_start_to` value" msgstr "" #: redturtle/prenotazioni/adapters/stringinterp.py:27 @@ -126,8 +147,8 @@ msgstr "" msgid "Could not send {gateway_type} message due to internal errors" msgstr "" -#: redturtle/prenotazioni/restapi/services/booking/add.py:230 -#: redturtle/prenotazioni/restapi/services/booking/update.py:90 +#: redturtle/prenotazioni/restapi/services/booking/add.py:231 +#: redturtle/prenotazioni/restapi/services/booking/update.py:75 msgid "Could not validate value for the ${field_name} due to: ${err_message}" msgstr "" @@ -362,16 +383,16 @@ msgstr "" msgid "Select a day" msgstr "" -#: redturtle/prenotazioni/adapters/booker.py:310 -#: redturtle/prenotazioni/restapi/services/booking/add.py:63 +#: redturtle/prenotazioni/adapters/booker.py:311 +#: redturtle/prenotazioni/restapi/services/booking/add.py:66 msgid "Sorry, this slot is not available anymore." msgstr "" -#: redturtle/prenotazioni/adapters/booker.py:353 +#: redturtle/prenotazioni/adapters/booker.py:354 msgid "Sorry, this slot is not available or does not fit your booking." msgstr "" -#: redturtle/prenotazioni/adapters/booker.py:162 +#: redturtle/prenotazioni/adapters/booker.py:161 msgid "Sorry, you can not book this slot for now." msgstr "" @@ -467,11 +488,11 @@ msgstr "" msgid "The phone number of the user who made the reservation." msgstr "" -#: redturtle/prenotazioni/adapters/booker.py:402 +#: redturtle/prenotazioni/adapters/booker.py:403 msgid "This day is not valid." msgstr "" -#: redturtle/prenotazioni/adapters/booker.py:397 +#: redturtle/prenotazioni/adapters/booker.py:398 msgid "This gate has some booking schedule in this time period." msgstr "" @@ -491,11 +512,6 @@ msgstr "" msgid "Uninstalls the redturtle.prenotazioni.demo add-on (demo site purpose only)." msgstr "" -#: redturtle/prenotazioni/restapi/services/booking/add.py:200 -#: redturtle/prenotazioni/restapi/services/booking/update.py:56 -msgid "Unknown additional field '${additional_field_name}'." -msgstr "" - #: redturtle/prenotazioni/restapi/services/booking/add.py:159 msgid "Unknown booking type '${booking_type}'." msgstr "" @@ -637,8 +653,48 @@ msgstr "" msgid "booked_prenotation_message" msgstr "" +#. Default: "Descrizione" +#: redturtle/prenotazioni/content/prenotazione_type.py:42 +msgid "booking_additional_field_description" +msgstr "" + +#. Default: "Label" +#: redturtle/prenotazioni/content/prenotazione_type.py:27 +msgid "booking_additional_field_label" +msgstr "" + +#. Default: "id" +#: redturtle/prenotazioni/content/prenotazione_type.py:18 +msgid "booking_additional_field_name" +msgstr "" + +#. Default: "Additional field id must be unique" +#: redturtle/prenotazioni/content/prenotazione_type.py:21 +msgid "booking_additional_field_name_help" +msgstr "" + +#. Default: "Required" +#: redturtle/prenotazioni/content/prenotazione_type.py:37 +msgid "booking_additional_field_required" +msgstr "" + +#. Default: "Tipo" +#: redturtle/prenotazioni/content/prenotazione_type.py:32 +msgid "booking_additional_field_type" +msgstr "" + +#. Default: "This schema is being used for the additional booking fields" +#: redturtle/prenotazioni/content/prenotazione_type.py:92 +msgid "booking_additional_fields_schema_description" +msgstr "" + +#. Default: "Booking additional fields schema" +#: redturtle/prenotazioni/content/prenotazione_type.py:86 +msgid "booking_additional_fields_schema_title" +msgstr "" + #. Default: "Booking canceled: " -#: redturtle/prenotazioni/behaviors/booking_folder/notifications/email/notification_email_message.py:371 +#: redturtle/prenotazioni/behaviors/booking_folder/notifications/email/notification_email_message.py:368 msgid "booking_canceled_mail_subject_part" msgstr "" @@ -657,13 +713,13 @@ msgstr "" msgid "booking_deleted_success" msgstr "" -#. Default: "Bookign detail help text" -#: redturtle/prenotazioni/content/prenotazione_type.py:41 +#. Default: "Booking detail help text" +#: redturtle/prenotazioni/content/prenotazione_type.py:78 msgid "booking_details_help_text_label" msgstr "" #. Default: "This field will be visualized as \"Details\" helptext during the booking steps" -#: redturtle/prenotazioni/content/prenotazione_type.py:42 +#: redturtle/prenotazioni/content/prenotazione_type.py:79 msgid "booking_details_help_text_label_help" msgstr "" @@ -687,7 +743,7 @@ msgid "booking_refused" msgstr "" #. Default: "Duration value" -#: redturtle/prenotazioni/content/prenotazione_type.py:15 +#: redturtle/prenotazioni/content/prenotazione_type.py:52 msgid "booking_type_duration_label" msgstr "" @@ -697,12 +753,12 @@ msgid "booking_type_name" msgstr "" #. Default: "List of requirements to recieve the service" -#: redturtle/prenotazioni/content/prenotazione_type.py:23 +#: redturtle/prenotazioni/content/prenotazione_type.py:60 msgid "booking_type_requirements_help" msgstr "" #. Default: "Requirements" -#: redturtle/prenotazioni/content/prenotazione_type.py:22 +#: redturtle/prenotazioni/content/prenotazione_type.py:59 msgid "booking_type_requirements_labled" msgstr "" @@ -771,7 +827,7 @@ msgid "canceled" msgstr "Annullato" #. Default: "Confirm" -#: redturtle/prenotazioni/restapi/services/booking/notify_about_confirm.py:33 +#: redturtle/prenotazioni/restapi/services/booking/notify_about_confirm.py:37 msgid "confirm" msgstr "" @@ -810,82 +866,82 @@ msgid "contacts_label" msgstr "" #. Default: "BOOKING FOLDER" -#: redturtle/prenotazioni/browser/bookings_export.py:43 +#: redturtle/prenotazioni/browser/bookings_export.py:47 msgid "csv_export_booking_folder" msgstr "" #. Default: "CODE" -#: redturtle/prenotazioni/browser/bookings_export.py:29 +#: redturtle/prenotazioni/browser/bookings_export.py:33 msgid "csv_export_code" msgstr "" #. Default: "COMPANY" -#: redturtle/prenotazioni/browser/bookings_export.py:45 +#: redturtle/prenotazioni/browser/bookings_export.py:49 msgid "csv_export_company" msgstr "" #. Default: "CREATION DATE" -#: redturtle/prenotazioni/browser/bookings_export.py:27 +#: redturtle/prenotazioni/browser/bookings_export.py:31 msgid "csv_export_creation_date" msgstr "" #. Default: "CREATOR" -#: redturtle/prenotazioni/browser/bookings_export.py:25 +#: redturtle/prenotazioni/browser/bookings_export.py:29 msgid "csv_export_creator" msgstr "" #. Default: "EMAIL" -#: redturtle/prenotazioni/browser/bookings_export.py:32 +#: redturtle/prenotazioni/browser/bookings_export.py:36 msgid "csv_export_email" msgstr "" #. Default: "BOOKING EXPIRATION" -#: redturtle/prenotazioni/browser/bookings_export.py:37 +#: redturtle/prenotazioni/browser/bookings_export.py:41 msgid "csv_export_end_time" msgstr "" #. Default: "FISCALCODE" -#: redturtle/prenotazioni/browser/bookings_export.py:34 +#: redturtle/prenotazioni/browser/bookings_export.py:38 msgid "csv_export_fiscalcode" msgstr "" #. Default: "GATE" -#: redturtle/prenotazioni/browser/bookings_export.py:40 +#: redturtle/prenotazioni/browser/bookings_export.py:44 msgid "csv_export_gate" msgstr "" #. Default: "NAME SURNAME" -#: redturtle/prenotazioni/browser/bookings_export.py:33 +#: redturtle/prenotazioni/browser/bookings_export.py:37 msgid "csv_export_name" msgstr "" #. Default: "NOTES" -#: redturtle/prenotazioni/browser/bookings_export.py:41 +#: redturtle/prenotazioni/browser/bookings_export.py:45 msgid "csv_export_notes" msgstr "" #. Default: "PHONE" -#: redturtle/prenotazioni/browser/bookings_export.py:31 +#: redturtle/prenotazioni/browser/bookings_export.py:35 msgid "csv_export_phone" msgstr "" #. Default: "BOOKING START" -#: redturtle/prenotazioni/browser/bookings_export.py:35 +#: redturtle/prenotazioni/browser/bookings_export.py:39 msgid "csv_export_start_time" msgstr "" #. Default: "STATE" -#: redturtle/prenotazioni/browser/bookings_export.py:39 +#: redturtle/prenotazioni/browser/bookings_export.py:43 msgid "csv_export_state" msgstr "" #. Default: "TYPE" -#: redturtle/prenotazioni/browser/bookings_export.py:30 +#: redturtle/prenotazioni/browser/bookings_export.py:34 msgid "csv_export_type" msgstr "" #. Default: "UID" -#: redturtle/prenotazioni/browser/bookings_export.py:24 +#: redturtle/prenotazioni/browser/bookings_export.py:28 msgid "csv_export_uid" msgstr "" @@ -1022,7 +1078,7 @@ msgid "history_appio_transition_sent" msgstr "" #. Default: "Email notification was sent to booking manager" -#: redturtle/prenotazioni/behaviors/booking_folder/notifications/email/notification_email_message.py:261 +#: redturtle/prenotazioni/behaviors/booking_folder/notifications/email/notification_email_message.py:258 msgid "history_email_manager_notification_sent" msgstr "" @@ -1032,12 +1088,12 @@ msgid "history_email_reschedule_sent" msgstr "" #. Default: "Email message about the ${transition} transition was sent" -#: redturtle/prenotazioni/behaviors/booking_folder/notifications/email/notification_email_message.py:168 +#: redturtle/prenotazioni/behaviors/booking_folder/notifications/email/notification_email_message.py:165 msgid "history_email_transition_sent" msgstr "" #. Default: "Email reminder was sent" -#: redturtle/prenotazioni/behaviors/booking_folder/notifications/email/notification_email_message.py:216 +#: redturtle/prenotazioni/behaviors/booking_folder/notifications/email/notification_email_message.py:213 msgid "history_reminder_sent" msgstr "" @@ -1110,6 +1166,11 @@ msgstr "" msgid "is_not_future_date" msgstr "" +#. Default: "Text line" +#: redturtle/prenotazioni/vocabularies/voc_booking_additional_fiels_types.py:33 +msgid "label_booking_additional_field_textline" +msgstr "" + #. Default: "Booking code" #: redturtle/prenotazioni/browser/templates/delete_reservation.pt:106 #: redturtle/prenotazioni/browser/templates/prenotazione.pt:123 diff --git a/src/redturtle/prenotazioni/locales/it/LC_MESSAGES/redturtle.prenotazioni.po b/src/redturtle/prenotazioni/locales/it/LC_MESSAGES/redturtle.prenotazioni.po index 51a6e3c3..af61b59c 100644 --- a/src/redturtle/prenotazioni/locales/it/LC_MESSAGES/redturtle.prenotazioni.po +++ b/src/redturtle/prenotazioni/locales/it/LC_MESSAGES/redturtle.prenotazioni.po @@ -1,7 +1,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" -"POT-Creation-Date: 2024-08-19 10:07+0000\n" +"POT-Creation-Date: 2024-11-27 11:24+0000\n" "PO-Revision-Date: 2014-05-27 17:36+0200\n" "Last-Translator: Alessandro Pisa \n" "Language-Team: American English \n" @@ -33,6 +33,15 @@ msgstr "Una cartella che conterrà le prenotazioni per questo day" msgid "Add" msgstr "Aggiungi" +#: redturtle/prenotazioni/restapi/services/booking/add.py:199 +#: redturtle/prenotazioni/restapi/services/booking/update.py:57 +msgid "Additional field '${additional_field_name}' is missing." +msgstr "" + +#: redturtle/prenotazioni/restapi/services/booking/add.py:216 +msgid "Additional field '${additional_field_name}' value is missing." +msgstr "" + #: redturtle/prenotazioni/content/prenotazioni_folder.py:444 #: redturtle/prenotazioni/content/validators.py:222 msgid "Afternoon start should not be greater than end." @@ -46,9 +55,21 @@ msgstr "Applica le restrizioni al Gestore Prenotazioni." msgid "Attention" msgstr "Attenzione!" -#: redturtle/prenotazioni/browser/bookings_export.py:160 -msgid "Bad date format passed" -msgstr "Parametro 'date' è composto male" +#: redturtle/prenotazioni/browser/bookings_export.py:232 +msgid "Badly composed `booking_creation_from` value" +msgstr "Il valore del campo `booking_creation_from` è composto male." + +#: redturtle/prenotazioni/browser/bookings_export.py:244 +msgid "Badly composed `booking_creation_to` value" +msgstr "Il valore del campo `booking_creation_to` è composto male." + +#: redturtle/prenotazioni/browser/bookings_export.py:207 +msgid "Badly composed `booking_start_from` value" +msgstr "Il valore del campo `booking_start_from` è composto male." + +#: redturtle/prenotazioni/browser/bookings_export.py:221 +msgid "Badly composed `booking_start_to` value" +msgstr "Il valore del campo `booking_start_to` è composto male." #: redturtle/prenotazioni/adapters/stringinterp.py:27 msgid "Booking" @@ -128,10 +149,10 @@ msgstr "Elenco dei contenuti" msgid "Could not send {gateway_type} message due to internal errors" msgstr "Non è stato possibile inviare la notifica via {gateway_type}" -#: redturtle/prenotazioni/restapi/services/booking/add.py:230 -#: redturtle/prenotazioni/restapi/services/booking/update.py:90 +#: redturtle/prenotazioni/restapi/services/booking/add.py:231 +#: redturtle/prenotazioni/restapi/services/booking/update.py:75 msgid "Could not validate value for the ${field_name} due to: ${err_message}" -msgstr "Non è stato possibile validare valore del campo ${field_name} a causa di: ${err_message}" +msgstr "" #: redturtle/prenotazioni/content/prenotazioni_folder.py:207 msgid "Data fine validità" @@ -364,16 +385,16 @@ msgstr "Parametri di ricerca" msgid "Select a day" msgstr "Seleziona un giorno" -#: redturtle/prenotazioni/adapters/booker.py:310 -#: redturtle/prenotazioni/restapi/services/booking/add.py:63 +#: redturtle/prenotazioni/adapters/booker.py:311 +#: redturtle/prenotazioni/restapi/services/booking/add.py:66 msgid "Sorry, this slot is not available anymore." msgstr "Ci dispiace, ma questo intervallo di tempo non è più disponibile" -#: redturtle/prenotazioni/adapters/booker.py:353 +#: redturtle/prenotazioni/adapters/booker.py:354 msgid "Sorry, this slot is not available or does not fit your booking." msgstr "Ci dispiace questo intervallo di tempo non è disponibile o non è adatto alla tua prenotazione." -#: redturtle/prenotazioni/adapters/booker.py:162 +#: redturtle/prenotazioni/adapters/booker.py:161 msgid "Sorry, you can not book this slot for now." msgstr "Ci dispiace, ma questo intervallo di tempo non è al momento disponibile" @@ -469,11 +490,11 @@ msgstr "Le informazioni per raggiungere l'ufficio presso cui si prenota" msgid "The phone number of the user who made the reservation." msgstr "Il numero di telefono di chi ha prenotato" -#: redturtle/prenotazioni/adapters/booker.py:402 +#: redturtle/prenotazioni/adapters/booker.py:403 msgid "This day is not valid." msgstr "Il giorno inserito non è valido." -#: redturtle/prenotazioni/adapters/booker.py:397 +#: redturtle/prenotazioni/adapters/booker.py:398 msgid "This gate has some booking schedule in this time period." msgstr "Lo sportello selezionato ha già delle prenotazioni nel periodo indicato." @@ -493,11 +514,6 @@ msgstr "Disinstall redturtle.prenotazioni" msgid "Uninstalls the redturtle.prenotazioni.demo add-on (demo site purpose only)." msgstr "Disinstalla redturtle.prenotazioni.demo." -#: redturtle/prenotazioni/restapi/services/booking/add.py:200 -#: redturtle/prenotazioni/restapi/services/booking/update.py:56 -msgid "Unknown additional field '${additional_field_name}'." -msgstr "Campo aggiuntivo sconosciuto '${additional_field_name}'." - #: redturtle/prenotazioni/restapi/services/booking/add.py:159 msgid "Unknown booking type '${booking_type}'." msgstr "Tipologia di prenotazione sconosciuta '${booking_type}'." @@ -640,7 +656,7 @@ msgid "booked_prenotation_message" msgstr "${day}, ore ${booking_time}, prenotato da ${booked_by}, prenotazione: ${booking_type} durata: ${duration} minuti" #. Default: "Descrizione" -#: redturtle/prenotazioni/content/prenotazione_type.py:32 +#: redturtle/prenotazioni/content/prenotazione_type.py:42 msgid "booking_additional_field_description" msgstr "" @@ -660,12 +676,12 @@ msgid "booking_additional_field_name_help" msgstr "Identificativo del campo aggiuntivo, deve essere unico e non contenere spazi o caratteri speciali" #. Default: "Required" -#: redturtle/prenotazioni/content/prenotazione_type.py:42 +#: redturtle/prenotazioni/content/prenotazione_type.py:37 msgid "booking_additional_field_required" msgstr "Obbligatorio" #. Default: "Tipo" -#: redturtle/prenotazioni/content/prenotazione_type.py:37 +#: redturtle/prenotazioni/content/prenotazione_type.py:32 msgid "booking_additional_field_type" msgstr "" @@ -680,7 +696,7 @@ msgid "booking_additional_fields_schema_title" msgstr "Campi aggiuntivi" #. Default: "Booking canceled: " -#: redturtle/prenotazioni/behaviors/booking_folder/notifications/email/notification_email_message.py:371 +#: redturtle/prenotazioni/behaviors/booking_folder/notifications/email/notification_email_message.py:368 msgid "booking_canceled_mail_subject_part" msgstr "Prenotazione cancellata: " @@ -814,7 +830,7 @@ msgid "canceled" msgstr "Annullato" #. Default: "Confirm" -#: redturtle/prenotazioni/restapi/services/booking/notify_about_confirm.py:33 +#: redturtle/prenotazioni/restapi/services/booking/notify_about_confirm.py:37 msgid "confirm" msgstr "Conferma" @@ -853,82 +869,82 @@ msgid "contacts_label" msgstr "Contatti" #. Default: "BOOKING FOLDER" -#: redturtle/prenotazioni/browser/bookings_export.py:43 +#: redturtle/prenotazioni/browser/bookings_export.py:47 msgid "csv_export_booking_folder" msgstr "CARTELLA PRENOTAZIONI" #. Default: "CODE" -#: redturtle/prenotazioni/browser/bookings_export.py:29 +#: redturtle/prenotazioni/browser/bookings_export.py:33 msgid "csv_export_code" msgstr "CODICE" #. Default: "COMPANY" -#: redturtle/prenotazioni/browser/bookings_export.py:45 +#: redturtle/prenotazioni/browser/bookings_export.py:49 msgid "csv_export_company" msgstr "AZIENDA" #. Default: "CREATION DATE" -#: redturtle/prenotazioni/browser/bookings_export.py:27 +#: redturtle/prenotazioni/browser/bookings_export.py:31 msgid "csv_export_creation_date" msgstr "DATA CREAZIONE" #. Default: "CREATOR" -#: redturtle/prenotazioni/browser/bookings_export.py:25 +#: redturtle/prenotazioni/browser/bookings_export.py:29 msgid "csv_export_creator" msgstr "CREATORE" #. Default: "EMAIL" -#: redturtle/prenotazioni/browser/bookings_export.py:32 +#: redturtle/prenotazioni/browser/bookings_export.py:36 msgid "csv_export_email" msgstr "EMAIL" #. Default: "BOOKING EXPIRATION" -#: redturtle/prenotazioni/browser/bookings_export.py:37 +#: redturtle/prenotazioni/browser/bookings_export.py:41 msgid "csv_export_end_time" msgstr "FINE PRENOTAZIONE" #. Default: "FISCALCODE" -#: redturtle/prenotazioni/browser/bookings_export.py:34 +#: redturtle/prenotazioni/browser/bookings_export.py:38 msgid "csv_export_fiscalcode" msgstr "CODICE FISCALE" #. Default: "GATE" -#: redturtle/prenotazioni/browser/bookings_export.py:40 +#: redturtle/prenotazioni/browser/bookings_export.py:44 msgid "csv_export_gate" msgstr "POSTAZIONE" #. Default: "NAME SURNAME" -#: redturtle/prenotazioni/browser/bookings_export.py:33 +#: redturtle/prenotazioni/browser/bookings_export.py:37 msgid "csv_export_name" msgstr "NOME COGNOME" #. Default: "NOTES" -#: redturtle/prenotazioni/browser/bookings_export.py:41 +#: redturtle/prenotazioni/browser/bookings_export.py:45 msgid "csv_export_notes" msgstr "NOTE" #. Default: "PHONE" -#: redturtle/prenotazioni/browser/bookings_export.py:31 +#: redturtle/prenotazioni/browser/bookings_export.py:35 msgid "csv_export_phone" msgstr "NUMERO TELEFONO" #. Default: "BOOKING START" -#: redturtle/prenotazioni/browser/bookings_export.py:35 +#: redturtle/prenotazioni/browser/bookings_export.py:39 msgid "csv_export_start_time" msgstr "INIZIO PRENOTAZIONE" #. Default: "STATE" -#: redturtle/prenotazioni/browser/bookings_export.py:39 +#: redturtle/prenotazioni/browser/bookings_export.py:43 msgid "csv_export_state" msgstr "STATO" #. Default: "TYPE" -#: redturtle/prenotazioni/browser/bookings_export.py:30 +#: redturtle/prenotazioni/browser/bookings_export.py:34 msgid "csv_export_type" msgstr "TIPO" #. Default: "UID" -#: redturtle/prenotazioni/browser/bookings_export.py:24 +#: redturtle/prenotazioni/browser/bookings_export.py:28 msgid "csv_export_uid" msgstr "UID" @@ -1065,7 +1081,7 @@ msgid "history_appio_transition_sent" msgstr "Inviata notifica AppIO per il cambio di stato della prenotazione: ${transition}" #. Default: "Email notification was sent to booking manager" -#: redturtle/prenotazioni/behaviors/booking_folder/notifications/email/notification_email_message.py:261 +#: redturtle/prenotazioni/behaviors/booking_folder/notifications/email/notification_email_message.py:258 msgid "history_email_manager_notification_sent" msgstr "Inviata notifica email al Gestore delle prenotazioni" @@ -1075,12 +1091,12 @@ msgid "history_email_reschedule_sent" msgstr "Inviata notifica email per lo spostamento della prenotazione" #. Default: "Email message about the ${transition} transition was sent" -#: redturtle/prenotazioni/behaviors/booking_folder/notifications/email/notification_email_message.py:168 +#: redturtle/prenotazioni/behaviors/booking_folder/notifications/email/notification_email_message.py:165 msgid "history_email_transition_sent" msgstr "Inviata notifica email per il cambio di stato della prenotazione: ${transition}" #. Default: "Email reminder was sent" -#: redturtle/prenotazioni/behaviors/booking_folder/notifications/email/notification_email_message.py:216 +#: redturtle/prenotazioni/behaviors/booking_folder/notifications/email/notification_email_message.py:213 msgid "history_reminder_sent" msgstr "Inviata notifica email per il promemoria" @@ -1156,7 +1172,7 @@ msgid "is_not_future_date" msgstr "La data è nel passato." #. Default: "Text line" -#: redturtle/prenotazioni/vocabularies/voc_booking_additional_fiels_types.py:34 +#: redturtle/prenotazioni/vocabularies/voc_booking_additional_fiels_types.py:33 msgid "label_booking_additional_field_textline" msgstr "Riga di testo" diff --git a/src/redturtle/prenotazioni/locales/redturtle.prenotazioni.pot b/src/redturtle/prenotazioni/locales/redturtle.prenotazioni.pot index 1b4d215b..09a0ba3e 100644 --- a/src/redturtle/prenotazioni/locales/redturtle.prenotazioni.pot +++ b/src/redturtle/prenotazioni/locales/redturtle.prenotazioni.pot @@ -4,7 +4,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2024-08-19 10:07+0000\n" +"POT-Creation-Date: 2024-11-27 11:24+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI +ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -34,9 +34,13 @@ msgstr "" msgid "Add" msgstr "" -#: redturtle/prenotazioni/restapi/services/booking/add.py:213 -#: redturtle/prenotazioni/restapi/services/booking/update.py:73 -msgid "Additional field '${additional_field_name}' value is required." +#: redturtle/prenotazioni/restapi/services/booking/add.py:199 +#: redturtle/prenotazioni/restapi/services/booking/update.py:57 +msgid "Additional field '${additional_field_name}' is missing." +msgstr "" + +#: redturtle/prenotazioni/restapi/services/booking/add.py:216 +msgid "Additional field '${additional_field_name}' value is missing." msgstr "" #: redturtle/prenotazioni/content/prenotazioni_folder.py:444 @@ -46,14 +50,26 @@ msgstr "" #: redturtle/prenotazioni/content/prenotazioni_folder.py:216 msgid "Apply restrictions to Bookings Manager" -msgstr "Applica le restrizioni sulle date anche agli operatori" +msgstr "" #: redturtle/prenotazioni/browser/templates/prenotazione.pt:29 msgid "Attention" msgstr "" -#: redturtle/prenotazioni/browser/bookings_export.py:160 -msgid "Bad date format passed" +#: redturtle/prenotazioni/browser/bookings_export.py:232 +msgid "Badly composed `booking_creation_from` value" +msgstr "" + +#: redturtle/prenotazioni/browser/bookings_export.py:244 +msgid "Badly composed `booking_creation_to` value" +msgstr "" + +#: redturtle/prenotazioni/browser/bookings_export.py:207 +msgid "Badly composed `booking_start_from` value" +msgstr "" + +#: redturtle/prenotazioni/browser/bookings_export.py:221 +msgid "Badly composed `booking_start_to` value" msgstr "" #: redturtle/prenotazioni/adapters/stringinterp.py:27 @@ -134,8 +150,8 @@ msgstr "" msgid "Could not send {gateway_type} message due to internal errors" msgstr "" -#: redturtle/prenotazioni/restapi/services/booking/add.py:230 -#: redturtle/prenotazioni/restapi/services/booking/update.py:90 +#: redturtle/prenotazioni/restapi/services/booking/add.py:231 +#: redturtle/prenotazioni/restapi/services/booking/update.py:75 msgid "Could not validate value for the ${field_name} due to: ${err_message}" msgstr "" @@ -201,7 +217,7 @@ msgstr "" #: redturtle/prenotazioni/content/prenotazioni_folder.py:219 msgid "If selected, Bookings Manager will be restricted by selected dates as an usual user." -msgstr "Se selezionato, gli operatori avranno le stesse restrizioni sulle date come un qualsiasi utente" +msgstr "" #: redturtle/prenotazioni/content/validators.py:93 msgid "In the same day there are overlapping intervals" @@ -370,16 +386,16 @@ msgstr "" msgid "Select a day" msgstr "" -#: redturtle/prenotazioni/adapters/booker.py:310 -#: redturtle/prenotazioni/restapi/services/booking/add.py:63 +#: redturtle/prenotazioni/adapters/booker.py:311 +#: redturtle/prenotazioni/restapi/services/booking/add.py:66 msgid "Sorry, this slot is not available anymore." msgstr "" -#: redturtle/prenotazioni/adapters/booker.py:353 +#: redturtle/prenotazioni/adapters/booker.py:354 msgid "Sorry, this slot is not available or does not fit your booking." msgstr "" -#: redturtle/prenotazioni/adapters/booker.py:162 +#: redturtle/prenotazioni/adapters/booker.py:161 msgid "Sorry, you can not book this slot for now." msgstr "" @@ -475,11 +491,11 @@ msgstr "" msgid "The phone number of the user who made the reservation." msgstr "" -#: redturtle/prenotazioni/adapters/booker.py:402 +#: redturtle/prenotazioni/adapters/booker.py:403 msgid "This day is not valid." msgstr "" -#: redturtle/prenotazioni/adapters/booker.py:397 +#: redturtle/prenotazioni/adapters/booker.py:398 msgid "This gate has some booking schedule in this time period." msgstr "" @@ -499,11 +515,6 @@ msgstr "" msgid "Uninstalls the redturtle.prenotazioni.demo add-on (demo site purpose only)." msgstr "" -#: redturtle/prenotazioni/restapi/services/booking/add.py:200 -#: redturtle/prenotazioni/restapi/services/booking/update.py:56 -msgid "Unknown additional field '${additional_field_name}'." -msgstr "" - #: redturtle/prenotazioni/restapi/services/booking/add.py:159 msgid "Unknown booking type '${booking_type}'." msgstr "" @@ -645,8 +656,48 @@ msgstr "" msgid "booked_prenotation_message" msgstr "" +#. Default: "Descrizione" +#: redturtle/prenotazioni/content/prenotazione_type.py:42 +msgid "booking_additional_field_description" +msgstr "" + +#. Default: "Label" +#: redturtle/prenotazioni/content/prenotazione_type.py:27 +msgid "booking_additional_field_label" +msgstr "" + +#. Default: "id" +#: redturtle/prenotazioni/content/prenotazione_type.py:18 +msgid "booking_additional_field_name" +msgstr "" + +#. Default: "Additional field id must be unique" +#: redturtle/prenotazioni/content/prenotazione_type.py:21 +msgid "booking_additional_field_name_help" +msgstr "" + +#. Default: "Required" +#: redturtle/prenotazioni/content/prenotazione_type.py:37 +msgid "booking_additional_field_required" +msgstr "" + +#. Default: "Tipo" +#: redturtle/prenotazioni/content/prenotazione_type.py:32 +msgid "booking_additional_field_type" +msgstr "" + +#. Default: "This schema is being used for the additional booking fields" +#: redturtle/prenotazioni/content/prenotazione_type.py:92 +msgid "booking_additional_fields_schema_description" +msgstr "" + +#. Default: "Booking additional fields schema" +#: redturtle/prenotazioni/content/prenotazione_type.py:86 +msgid "booking_additional_fields_schema_title" +msgstr "" + #. Default: "Booking canceled: " -#: redturtle/prenotazioni/behaviors/booking_folder/notifications/email/notification_email_message.py:371 +#: redturtle/prenotazioni/behaviors/booking_folder/notifications/email/notification_email_message.py:368 msgid "booking_canceled_mail_subject_part" msgstr "" @@ -665,6 +716,16 @@ msgstr "" msgid "booking_deleted_success" msgstr "" +#. Default: "Booking detail help text" +#: redturtle/prenotazioni/content/prenotazione_type.py:78 +msgid "booking_details_help_text_label" +msgstr "" + +#. Default: "This field will be visualized as \"Details\" helptext during the booking steps" +#: redturtle/prenotazioni/content/prenotazione_type.py:79 +msgid "booking_details_help_text_label_help" +msgstr "" + #. Default: "Booking fields" #: redturtle/prenotazioni/content/prenotazioni_folder.py:548 msgid "booking_fields_label" @@ -685,7 +746,7 @@ msgid "booking_refused" msgstr "" #. Default: "Duration value" -#: redturtle/prenotazioni/content/prenotazione_type.py:15 +#: redturtle/prenotazioni/content/prenotazione_type.py:52 msgid "booking_type_duration_label" msgstr "" @@ -695,12 +756,12 @@ msgid "booking_type_name" msgstr "" #. Default: "List of requirements to recieve the service" -#: redturtle/prenotazioni/content/prenotazione_type.py:23 +#: redturtle/prenotazioni/content/prenotazione_type.py:60 msgid "booking_type_requirements_help" msgstr "" #. Default: "Requirements" -#: redturtle/prenotazioni/content/prenotazione_type.py:22 +#: redturtle/prenotazioni/content/prenotazione_type.py:59 msgid "booking_type_requirements_labled" msgstr "" @@ -769,7 +830,7 @@ msgid "canceled" msgstr "" #. Default: "Confirm" -#: redturtle/prenotazioni/restapi/services/booking/notify_about_confirm.py:33 +#: redturtle/prenotazioni/restapi/services/booking/notify_about_confirm.py:37 msgid "confirm" msgstr "" @@ -808,82 +869,82 @@ msgid "contacts_label" msgstr "" #. Default: "BOOKING FOLDER" -#: redturtle/prenotazioni/browser/bookings_export.py:43 +#: redturtle/prenotazioni/browser/bookings_export.py:47 msgid "csv_export_booking_folder" msgstr "" #. Default: "CODE" -#: redturtle/prenotazioni/browser/bookings_export.py:29 +#: redturtle/prenotazioni/browser/bookings_export.py:33 msgid "csv_export_code" msgstr "" #. Default: "COMPANY" -#: redturtle/prenotazioni/browser/bookings_export.py:45 +#: redturtle/prenotazioni/browser/bookings_export.py:49 msgid "csv_export_company" msgstr "" #. Default: "CREATION DATE" -#: redturtle/prenotazioni/browser/bookings_export.py:27 +#: redturtle/prenotazioni/browser/bookings_export.py:31 msgid "csv_export_creation_date" msgstr "" #. Default: "CREATOR" -#: redturtle/prenotazioni/browser/bookings_export.py:25 +#: redturtle/prenotazioni/browser/bookings_export.py:29 msgid "csv_export_creator" msgstr "" #. Default: "EMAIL" -#: redturtle/prenotazioni/browser/bookings_export.py:32 +#: redturtle/prenotazioni/browser/bookings_export.py:36 msgid "csv_export_email" msgstr "" #. Default: "BOOKING EXPIRATION" -#: redturtle/prenotazioni/browser/bookings_export.py:37 +#: redturtle/prenotazioni/browser/bookings_export.py:41 msgid "csv_export_end_time" msgstr "" #. Default: "FISCALCODE" -#: redturtle/prenotazioni/browser/bookings_export.py:34 +#: redturtle/prenotazioni/browser/bookings_export.py:38 msgid "csv_export_fiscalcode" msgstr "" #. Default: "GATE" -#: redturtle/prenotazioni/browser/bookings_export.py:40 +#: redturtle/prenotazioni/browser/bookings_export.py:44 msgid "csv_export_gate" msgstr "" #. Default: "NAME SURNAME" -#: redturtle/prenotazioni/browser/bookings_export.py:33 +#: redturtle/prenotazioni/browser/bookings_export.py:37 msgid "csv_export_name" msgstr "" #. Default: "NOTES" -#: redturtle/prenotazioni/browser/bookings_export.py:41 +#: redturtle/prenotazioni/browser/bookings_export.py:45 msgid "csv_export_notes" msgstr "" #. Default: "PHONE" -#: redturtle/prenotazioni/browser/bookings_export.py:31 +#: redturtle/prenotazioni/browser/bookings_export.py:35 msgid "csv_export_phone" msgstr "" #. Default: "BOOKING START" -#: redturtle/prenotazioni/browser/bookings_export.py:35 +#: redturtle/prenotazioni/browser/bookings_export.py:39 msgid "csv_export_start_time" msgstr "" #. Default: "STATE" -#: redturtle/prenotazioni/browser/bookings_export.py:39 +#: redturtle/prenotazioni/browser/bookings_export.py:43 msgid "csv_export_state" msgstr "" #. Default: "TYPE" -#: redturtle/prenotazioni/browser/bookings_export.py:30 +#: redturtle/prenotazioni/browser/bookings_export.py:34 msgid "csv_export_type" msgstr "" #. Default: "UID" -#: redturtle/prenotazioni/browser/bookings_export.py:24 +#: redturtle/prenotazioni/browser/bookings_export.py:28 msgid "csv_export_uid" msgstr "" @@ -1020,7 +1081,7 @@ msgid "history_appio_transition_sent" msgstr "" #. Default: "Email notification was sent to booking manager" -#: redturtle/prenotazioni/behaviors/booking_folder/notifications/email/notification_email_message.py:261 +#: redturtle/prenotazioni/behaviors/booking_folder/notifications/email/notification_email_message.py:258 msgid "history_email_manager_notification_sent" msgstr "" @@ -1030,12 +1091,12 @@ msgid "history_email_reschedule_sent" msgstr "" #. Default: "Email message about the ${transition} transition was sent" -#: redturtle/prenotazioni/behaviors/booking_folder/notifications/email/notification_email_message.py:168 +#: redturtle/prenotazioni/behaviors/booking_folder/notifications/email/notification_email_message.py:165 msgid "history_email_transition_sent" msgstr "" #. Default: "Email reminder was sent" -#: redturtle/prenotazioni/behaviors/booking_folder/notifications/email/notification_email_message.py:216 +#: redturtle/prenotazioni/behaviors/booking_folder/notifications/email/notification_email_message.py:213 msgid "history_reminder_sent" msgstr "" @@ -1108,6 +1169,11 @@ msgstr "" msgid "is_not_future_date" msgstr "" +#. Default: "Text line" +#: redturtle/prenotazioni/vocabularies/voc_booking_additional_fiels_types.py:33 +msgid "label_booking_additional_field_textline" +msgstr "" + #. Default: "Booking code" #: redturtle/prenotazioni/browser/templates/delete_reservation.pt:106 #: redturtle/prenotazioni/browser/templates/prenotazione.pt:123