[boundaries] add abbreviated state names to valid component names

This commit is contained in:
Al
2016-12-19 00:51:05 -05:00
parent c3dfd6530f
commit f35fd97735

View File

@@ -363,7 +363,10 @@ class AddressComponents(object):
for language in languages:
abbreviations = state_abbreviations.get_all_abbreviations(country, language, state, default=None)
if abbreviations:
names.update([a.lower() for a in abbreviations])
abbrev_names = [a.lower() for a in abbreviations]
names.update(abbrev_names)
for a in abbrev_names:
components[a].add(AddressFormatter.STATE)
return names, components