mirror of
https://github.com/umap-project/umap.git
synced 2025-04-29 11:52:38 +02:00
fix: correct syntax for translating string when sending emails
This commit is contained in:
parent
ca18c5b7df
commit
74e0b43311
1 changed files with 5 additions and 6 deletions
|
@ -879,11 +879,10 @@ class SendEditLink(FormLessEditMixin, FormView):
|
||||||
return HttpResponseBadRequest("Invalid")
|
return HttpResponseBadRequest("Invalid")
|
||||||
link = self.object.get_anonymous_edit_url()
|
link = self.object.get_anonymous_edit_url()
|
||||||
|
|
||||||
subject = _(
|
subject = _("The uMap edit link for your map: %(map_name)s") % {
|
||||||
"The uMap edit link for your map: %(map_name)s"
|
"map_name": self.object.name
|
||||||
% {"map_name": self.object.name}
|
}
|
||||||
)
|
body = _("Here is your secret edit link: %(link)s") % {"link": link}
|
||||||
body = _("Here is your secret edit link: %(link)s" % {"link": link})
|
|
||||||
try:
|
try:
|
||||||
send_mail(
|
send_mail(
|
||||||
subject, body, settings.DEFAULT_FROM_EMAIL, [email], fail_silently=False
|
subject, body, settings.DEFAULT_FROM_EMAIL, [email], fail_silently=False
|
||||||
|
@ -893,7 +892,7 @@ class SendEditLink(FormLessEditMixin, FormView):
|
||||||
error=_("Can't send email to %(email)s" % {"email": email})
|
error=_("Can't send email to %(email)s" % {"email": email})
|
||||||
)
|
)
|
||||||
return simple_json_response(
|
return simple_json_response(
|
||||||
info=_("Email sent to %(email)s" % {"email": email})
|
info=_("Email sent to %(email)s") % {"email": email}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue