From 50da7d4261a91182ac8cc26331b2954db5f71ec4 Mon Sep 17 00:00:00 2001 From: Richard Schreiber Date: Fri, 6 Feb 2026 08:40:55 +0100 Subject: [PATCH] Fix help-text on date-questions not being translatable (#5875) --- src/pretix/base/forms/questions.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/pretix/base/forms/questions.py b/src/pretix/base/forms/questions.py index 165c1c92e..1fd4b8759 100644 --- a/src/pretix/base/forms/questions.py +++ b/src/pretix/base/forms/questions.py @@ -890,18 +890,18 @@ class BaseQuestionsForm(forms.Form): if not help_text: if q.valid_date_min and q.valid_date_max: help_text = format_lazy( - 'Please enter a date between {min} and {max}.', + _('Please enter a date between {min} and {max}.'), min=date_format(q.valid_date_min, "SHORT_DATE_FORMAT"), max=date_format(q.valid_date_max, "SHORT_DATE_FORMAT"), ) elif q.valid_date_min: help_text = format_lazy( - 'Please enter a date no earlier than {min}.', + _('Please enter a date no earlier than {min}.'), min=date_format(q.valid_date_min, "SHORT_DATE_FORMAT"), ) elif q.valid_date_max: help_text = format_lazy( - 'Please enter a date no later than {max}.', + _('Please enter a date no later than {max}.'), max=date_format(q.valid_date_max, "SHORT_DATE_FORMAT"), ) if initial and initial.answer: @@ -939,18 +939,18 @@ class BaseQuestionsForm(forms.Form): if not help_text: if q.valid_datetime_min and q.valid_datetime_max: help_text = format_lazy( - 'Please enter a date and time between {min} and {max}.', + _('Please enter a date and time between {min} and {max}.'), min=date_format(q.valid_datetime_min, "SHORT_DATETIME_FORMAT"), max=date_format(q.valid_datetime_max, "SHORT_DATETIME_FORMAT"), ) elif q.valid_datetime_min: help_text = format_lazy( - 'Please enter a date and time no earlier than {min}.', + _('Please enter a date and time no earlier than {min}.'), min=date_format(q.valid_datetime_min, "SHORT_DATETIME_FORMAT"), ) elif q.valid_datetime_max: help_text = format_lazy( - 'Please enter a date and time no later than {max}.', + _('Please enter a date and time no later than {max}.'), max=date_format(q.valid_datetime_max, "SHORT_DATETIME_FORMAT"), )