mirror of
https://github.com/pretix/pretix.git
synced 2026-05-09 15:54:03 +00:00
Localize customer name_parts in email-context (Z#179923) (#2470)
This commit is contained in:
committed by
GitHub
parent
f3b355e9f3
commit
032653cec4
@@ -172,6 +172,7 @@ class Customer(LoggedModel):
|
|||||||
return salted_hmac(key_salt, payload).hexdigest()
|
return salted_hmac(key_salt, payload).hexdigest()
|
||||||
|
|
||||||
def get_email_context(self):
|
def get_email_context(self):
|
||||||
|
from pretix.base.email import get_name_parts_localized
|
||||||
ctx = {
|
ctx = {
|
||||||
'name': self.name,
|
'name': self.name,
|
||||||
'organizer': self.organizer.name,
|
'organizer': self.organizer.name,
|
||||||
@@ -180,7 +181,7 @@ class Customer(LoggedModel):
|
|||||||
for f, l, w in name_scheme['fields']:
|
for f, l, w in name_scheme['fields']:
|
||||||
if f == 'full_name':
|
if f == 'full_name':
|
||||||
continue
|
continue
|
||||||
ctx['name_%s' % f] = self.name_parts.get(f, '')
|
ctx['name_%s' % f] = get_name_parts_localized(self.name_parts, f)
|
||||||
return ctx
|
return ctx
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
|||||||
Reference in New Issue
Block a user