mirror of
https://github.com/pretix/pretix.git
synced 2026-05-05 15:14:04 +00:00
Order detail: Set correct language for invoice email (Z#23197863) (#5260)
This commit is contained in:
@@ -548,23 +548,24 @@ class OrderDetail(OrderView):
|
|||||||
|
|
||||||
unsent_invoices = [ii.pk for ii in ctx['invoices'] if not ii.sent_to_customer]
|
unsent_invoices = [ii.pk for ii in ctx['invoices'] if not ii.sent_to_customer]
|
||||||
if unsent_invoices:
|
if unsent_invoices:
|
||||||
ctx['invoices_send_link'] = reverse('control:event.order.sendmail', kwargs={
|
with language(self.order.locale):
|
||||||
'event': self.request.event.slug,
|
ctx['invoices_send_link'] = reverse('control:event.order.sendmail', kwargs={
|
||||||
'organizer': self.request.event.organizer.slug,
|
'event': self.request.event.slug,
|
||||||
'code': self.order.code
|
'organizer': self.request.event.organizer.slug,
|
||||||
}) + '?' + urlencode({
|
'code': self.order.code
|
||||||
'subject': ngettext('Your invoice', 'Your invoices', len(unsent_invoices)),
|
}) + '?' + urlencode({
|
||||||
'message': ngettext(
|
'subject': ngettext('Your invoice', 'Your invoices', len(unsent_invoices)),
|
||||||
'Hello,\n\nplease find your invoice attached to this email.\n\n'
|
'message': ngettext(
|
||||||
'Your {event} team',
|
'Hello,\n\nplease find your invoice attached to this email.\n\n'
|
||||||
'Hello,\n\nplease find your invoices attached to this email.\n\n'
|
'Your {event} team',
|
||||||
'Your {event} team',
|
'Hello,\n\nplease find your invoices attached to this email.\n\n'
|
||||||
len(unsent_invoices)
|
'Your {event} team',
|
||||||
).format(
|
len(unsent_invoices)
|
||||||
event="{event}",
|
).format(
|
||||||
),
|
event="{event}",
|
||||||
'attach_invoices': unsent_invoices
|
),
|
||||||
}, doseq=True)
|
'attach_invoices': unsent_invoices
|
||||||
|
}, doseq=True)
|
||||||
|
|
||||||
return ctx
|
return ctx
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user