Skip to content

Commit

Permalink
Merge pull request #32 from GuillaumeCisco/fix-upper-default
Browse files Browse the repository at this point in the history
Fix the query for the default locale, be certain to use uppercase name.
  • Loading branch information
Kai committed Mar 17, 2014
2 parents 9ee5614 + 0cc66b1 commit 3ce9e8e
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/moneyed/localization.py
Expand Up @@ -36,12 +36,12 @@ def add_formatting_definition(self, locale, group_size,
'rounding_method': rounding_method}

def get_sign_definition(self, currency_code, locale):
locale = locale.upper()
currency_code = currency_code.upper()
if locale in self.sign_definitions:
local_set = self.sign_definitions.get(locale)
else:
local_set = self.sign_definitions.get(DEFAULT)

if locale.upper() not in self.sign_definitions:
locale = DEFAULT

local_set = self.sign_definitions.get(locale.upper())

if currency_code in local_set:
return local_set.get(currency_code)
Expand Down

0 comments on commit 3ce9e8e

Please sign in to comment.