From f047e2fbe261e993c2e4909f36fa94c2e838a25b Mon Sep 17 00:00:00 2001 From: Roman Kysil Date: Wed, 27 Nov 2024 15:04:40 +0100 Subject: [PATCH] Fix translation --- CHANGES.rst | 3 ++- src/redturtle/prenotazioni/browser/bookings_export.py | 8 ++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index 97d6ad2f..91637fac 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -5,7 +5,8 @@ Changelog 2.8.2 (unreleased) ------------------ -- Nothing changed yet. +- Fix translation mechanism for exceptions. + [folix-01] 2.8.1 (2024-11-27) diff --git a/src/redturtle/prenotazioni/browser/bookings_export.py b/src/redturtle/prenotazioni/browser/bookings_export.py index c9b794d5..a4b7e140 100644 --- a/src/redturtle/prenotazioni/browser/bookings_export.py +++ b/src/redturtle/prenotazioni/browser/bookings_export.py @@ -204,7 +204,7 @@ def __call__(self): ) except ValueError: raise BadRequest( - api.portal_translate(_("Badly composed `booking_start_from` value")) + api.portal.translate(_("Badly composed `booking_start_from` value")) ) if not booking_start_to: @@ -218,7 +218,7 @@ def __call__(self): ) except ValueError: raise BadRequest( - api.portal_translate(_("Badly composed `booking_start_to` value")) + api.portal.translate(_("Badly composed `booking_start_to` value")) ) if booking_creation_from: @@ -228,7 +228,7 @@ def __call__(self): ) except ValueError: raise BadRequest( - api.portal_translate( + api.portal.translate( _("Badly composed `booking_creation_from` value") ) ) @@ -240,7 +240,7 @@ def __call__(self): ) except ValueError: raise BadRequest( - api.portal_translate( + api.portal.translate( _("Badly composed `booking_creation_to` value") ) )