Skip to content

Commit

Permalink
Fix config of country in Name_UpperCase
Browse files Browse the repository at this point in the history
  • Loading branch information
frodrigo committed Jun 17, 2019
1 parent 3796e96 commit a53d37c
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions plugins/Name_UpperCase.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,12 @@ def init(self, logger):
self.errors[803] = { "item": 5010, "level": 1, "tag": ["name", "fix:chair"], "desc": T_(u"Name with uppercase") }
self.UpperTitleCase = re.compile(u".*[\p{Lu}\p{Lt}]{5,}")
self.RomanNumber = re.compile(u".*[IVXCDLM]{5,}")
country = self.father.config.options.get("country")[:2]
self.whitelist = UpperCase_WhiteList.get(country, None)

if "country" in self.father.config.options:
country = self.father.config.options.get("country")[:2]
self.whitelist = UpperCase_WhiteList.get(country, None)
else:
self.whitelist = None

def node(self, data, tags):
err = []
Expand Down

0 comments on commit a53d37c

Please sign in to comment.