From 7a40ad2fefa49743f38765c0f1a9a1c0e5190ee5 Mon Sep 17 00:00:00 2001 From: Andrea Cecchi Date: Thu, 9 May 2024 13:22:16 +0200 Subject: [PATCH] fix translati --- .../notifications/email/notification_email_message.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/redturtle/prenotazioni/behaviors/booking_folder/notifications/email/notification_email_message.py b/src/redturtle/prenotazioni/behaviors/booking_folder/notifications/email/notification_email_message.py index d9e23c49..0bfd99e9 100644 --- a/src/redturtle/prenotazioni/behaviors/booking_folder/notifications/email/notification_email_message.py +++ b/src/redturtle/prenotazioni/behaviors/booking_folder/notifications/email/notification_email_message.py @@ -16,7 +16,6 @@ from zope.annotation.interfaces import IAnnotations from zope.component import adapter from zope.component import getAdapter -from zope.i18n import translate from zope.interface import Interface from zope.interface import implementer @@ -255,7 +254,7 @@ def __init__(self, prenotazione, request): @property def message_history(self) -> str: - return translate( + return api.portal.translate( _( "history_email_manager_notification_sent", default="Email notification was sent to booking manager", @@ -365,7 +364,7 @@ def message_subject(self) -> str: booking_code = self.prenotazione.getBookingCode() date = self.prenotazione.booking_date.strftime("%d-%m-%Y %H:%M") - booking_canceled = translate( + booking_canceled = api.portal.translate( _("booking_canceled_mail_subject_part", default="Booking canceled: "), context=self.request, )