mirror of
https://github.com/pretix/pretix.git
synced 2026-05-07 15:34:02 +00:00
Localize state names (#5744)
* Localize state names in js-helper * localize statename in address-confirm * add localized state_name to AbstractPosition and AttendeeProfile * use state_for_address in order export
This commit is contained in:
committed by
GitHub
parent
ceb2e13d27
commit
112d5da792
@@ -349,7 +349,7 @@ class AttendeeProfile(models.Model):
|
||||
def state_name(self):
|
||||
sd = pycountry.subdivisions.get(code='{}-{}'.format(self.country, self.state))
|
||||
if sd:
|
||||
return sd.name
|
||||
return _(sd.name)
|
||||
return self.state
|
||||
|
||||
@property
|
||||
|
||||
Reference in New Issue
Block a user