From 0b4064f14f33b3e2ffdee16fc7dface6153a7c4c Mon Sep 17 00:00:00 2001 From: Richard Schreiber Date: Tue, 6 Jun 2023 14:56:30 +0200 Subject: [PATCH] Fix: use format_lazy for formatted translation in settings (#3390) --- src/pretix/base/settings.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/pretix/base/settings.py b/src/pretix/base/settings.py index f18e324fc..8de68965e 100644 --- a/src/pretix/base/settings.py +++ b/src/pretix/base/settings.py @@ -2119,11 +2119,14 @@ Your {event} team""")) label=_('Attachment for new orders'), ext_whitelist=(".pdf",), max_size=settings.FILE_UPLOAD_MAX_SIZE_EMAIL_AUTO_ATTACHMENT, - help_text=_('This file will be attached to the first email that we send for every new order. Therefore it will be ' - 'combined with the "Placed order", "Free order", or "Received order" texts from above. It will be sent ' - 'to both order contacts and attendees. You can use this e.g. to send your terms of service. Do not use ' - 'it to send non-public information as this file might be sent before payment is confirmed or the order ' - 'is approved. To avoid this vital email going to spam, you can only upload PDF files of up to {size} MB.').format( + help_text=format_lazy( + _( + 'This file will be attached to the first email that we send for every new order. Therefore it will be ' + 'combined with the "Placed order", "Free order", or "Received order" texts from above. It will be sent ' + 'to both order contacts and attendees. You can use this e.g. to send your terms of service. Do not use ' + 'it to send non-public information as this file might be sent before payment is confirmed or the order ' + 'is approved. To avoid this vital email going to spam, you can only upload PDF files of up to {size} MB.' + ), size=settings.FILE_UPLOAD_MAX_SIZE_EMAIL_AUTO_ATTACHMENT // (1024 * 1024), ) ),