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:
Richard Schreiber
2026-01-20 10:13:20 +01:00
committed by GitHub
parent ceb2e13d27
commit 112d5da792
4 changed files with 8 additions and 8 deletions

View File

@@ -1675,7 +1675,7 @@ class AbstractPosition(RoundingCorrectionMixin, 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
@@ -3480,7 +3480,7 @@ class InvoiceAddress(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