[fix] only applying separator tag to commas

This commit is contained in:
Al
2016-12-27 03:16:04 -05:00
parent 6192ac985a
commit 6eee689685

View File

@@ -806,7 +806,7 @@ class AddressFormatter(object):
return self.get_template_from_config(self.templates_place_only, country, language=language)
def tagged_tokens(self, name, label):
return six.u(' ').join([six.u('{}/{}').format(t.replace(' ', ''), label if t not in (',', '-') else self.separator_tag) for t, c in tokenize(name)])
return six.u(' ').join([six.u('{}/{}').format(t.replace(' ', ''), label if t != ',' else self.separator_tag) for t, c in tokenize(name)])
def template_language_matters(self, country, language):
return '{}_{}'.format(country.upper(), language) in self.country_formats or '{}_{}'.format(country, language) in self.country_formats