Fix order email subject in wrong language if plugin changes order.locale (#2588)

This commit is contained in:
Raphael Michel
2022-04-12 10:31:49 +02:00
committed by GitHub
parent 3cdf578c14
commit ea8630d3d7
34 changed files with 106 additions and 106 deletions

View File

@@ -934,7 +934,7 @@ def _create_order(event: Event, email: str, positions: List[CartPosition], now_d
def _order_placed_email(event: Event, order: Order, pprov: BasePaymentProvider, email_template, log_entry: str,
invoice, payment: OrderPayment, is_free=False):
email_context = get_email_context(event=event, order=order, payment=payment if pprov else None)
email_subject = gettext_lazy('Your order: %(code)s') % {'code': order.code}
email_subject = gettext_lazy('Your order: {code}')
try:
order.send_mail(
email_subject, email_template, email_context,
@@ -952,7 +952,7 @@ def _order_placed_email(event: Event, order: Order, pprov: BasePaymentProvider,
def _order_placed_email_attendee(event: Event, order: Order, position: OrderPosition, email_template, log_entry: str, is_free=False):
email_context = get_email_context(event=event, order=order, position=position)
email_subject = gettext_lazy('Your event registration: %(code)s') % {'code': order.code}
email_subject = gettext_lazy('Your event registration: {code}')
try:
position.send_mail(