forked from CGM_Public/pretix_original
Add region setting to supplement localization (#1875)
This commit is contained in:
@@ -82,7 +82,7 @@ class AllTicketsPDF(BaseExporter):
|
||||
if op.order.event != o.event:
|
||||
o = PdfTicketOutput(op.event)
|
||||
|
||||
with language(op.order.locale):
|
||||
with language(op.order.locale, o.event.settings.region):
|
||||
layout = o.layout_map.get(
|
||||
(op.item_id, op.order.sales_channel),
|
||||
o.layout_map.get(
|
||||
|
||||
@@ -79,7 +79,7 @@ class PdfTicketOutput(BaseTicketOutput):
|
||||
|
||||
def generate_order(self, order: Order):
|
||||
merger = PdfFileMerger()
|
||||
with language(order.locale):
|
||||
with language(order.locale, self.event.settings.region):
|
||||
for op in order.positions_with_tickets:
|
||||
layout = override_layout.send_chained(
|
||||
order.event, 'layout', orderposition=op, layout=self.layout_map.get(
|
||||
@@ -111,7 +111,7 @@ class PdfTicketOutput(BaseTicketOutput):
|
||||
)
|
||||
)
|
||||
)
|
||||
with language(order.locale):
|
||||
with language(order.locale, self.event.settings.region):
|
||||
outbuffer = self._draw_page(layout, op, order)
|
||||
return 'order%s%s.pdf' % (self.event.slug, order.code), 'application/pdf', outbuffer.read()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user