Minor fix for requestGala

This commit is contained in:
Cyl 2019-10-14 00:32:11 +02:00
parent 5a55a6c642
commit aac4e3b99c
2 changed files with 15 additions and 11 deletions

View File

@ -490,7 +490,7 @@ class Selling(models.Model):
event = self.product.eticket.event_title or _("Unknown event")
subject = _("Eticket bought for the event %(event)s") % {"event": event}
message_html = _(
"You bought an eticket for the event %(event)s.\nYou can download it directly from this link %(eticket)s.\nYou can also retreive all your e-tickets on your account page %(url)s."
"You bought an eticket for the event %(event)s.\nYou can download it directly from this link %(eticket)s.\nYou can also retrieve all your e-tickets on your account page %(url)s."
) % {
"event": event,
"url": "".join(
@ -502,14 +502,22 @@ class Selling(models.Model):
"</a>",
)
),
"eticket": "<a href=\"" + self.get_eticket_full_url() + "\">" + self.get_eticket_full_url() + "</a>"
"eticket": "".join(
(
'<a href="',
self.get_eticket_full_url(),
'">',
self.get_eticket_full_url(),
"</a>",
)
),
}
message_txt = _(
"You bought an eticket for the event %(event)s.\nYou can download it directly from this link %(eticket)s.\nYou can also retreive all your e-tickets on your account page %(url)s."
"You bought an eticket for the event %(event)s.\nYou can download it directly from this link %(eticket)s.\nYou can also retrieve all your e-tickets on your account page %(url)s."
) % {
"event": event,
"url": self.customer.get_full_url(),
"eticket": "<a href=\"" + self.get_eticket_full_url() + "\">" + self.get_eticket_full_url() + "</a>"
"eticket": self.get_eticket_full_url(),
}
self.customer.user.email_user(subject, message_txt, html_message=message_html)
@ -597,11 +605,7 @@ class Selling(models.Model):
def get_eticket_full_url(self):
eticket_url = reverse("counter:eticket_pdf", kwargs={"selling_id": self.id})
return "".join(
[
"https://", settings.SITH_URL, eticket_url
]
)
return "".join(["https://", settings.SITH_URL, eticket_url])
class Permanency(models.Model):

View File

@ -2724,7 +2724,7 @@ msgstr ""
#: core/templates/core/login.jinja:18
msgid "Please login or create an account to see this page."
msgstr "Merci de vous identifier ou vous créer un compte pour voir cette page."
msgstr "Merci de vous identifier ou de créer un compte pour voir cette page."
#: core/templates/core/login.jinja:28
#: counter/templates/counter/counter_main.jinja:51
@ -3822,7 +3822,7 @@ msgstr "Eticket acheté pour l'événement %(event)s"
msgid ""
"You bought an eticket for the event %(event)s.\n"
"You can download it directly from this link %(eticket)s.\n"
"You can also retreive all your e-tickets on your account page %(url)s."
"You can also retrieve all your e-tickets on your account page %(url)s."
msgstr ""
"Vous avez acheté un e-ticket pour l'événement %(event)s.\n"
"Vous pouvez le télécharger directement depuis ce lien: %(eticket)s.\n"