1
0
Fork 0
mirror of https://github.com/Kunsi/pretalx-plugin-broadcast-tools synced 2024-11-24 21:01:03 +00:00

exporter: always use event locale when localizing text

This commit is contained in:
Franzi 2022-11-22 19:17:56 +01:00
parent 40245ec86d
commit f618654ee0
Signed by: kunsi
GPG key ID: 12E3D2136B818350

View file

@ -93,11 +93,11 @@ class PDFInfoPage(Flowable):
" | ".join( " | ".join(
[ [
self.talk.submission.code, self.talk.submission.code,
str(self.talk.submission.submission_type.name), self.talk.submission.submission_type.name.localize(self.event.locale),
str(self.event.name), self.event.name.localize(self.event.locale),
talk_start.isoformat(), talk_start.isoformat(),
f"Day {self.day['index']}", f"Day {self.day['index']}",
str(self.room["name"]), self.room["name"].localize(self.event.locale),
f"Schedule {self.schedule.version}", f"Schedule {self.schedule.version}",
], ],
), ),
@ -115,8 +115,8 @@ class PDFInfoPage(Flowable):
Paragraph( Paragraph(
" | ".join( " | ".join(
[ [
str(self.event.name), self.event.name.localize(self.event.locale),
str(self.room["name"]), self.room["name"].localize(self.event.locale),
talk_start.strftime("%F %T"), talk_start.strftime("%F %T"),
], ],
), ),
@ -194,7 +194,7 @@ class PDFInfoPage(Flowable):
if answer.question.id not in self._questions: if answer.question.id not in self._questions:
continue continue
self._question_text( self._question_text(
str(answer.question.question), answer.question.question.localize(self.event.locale),
answer.answer, answer.answer,
style=self.style["Question"], style=self.style["Question"],
) )