Message lookup fallback will work if locale was not found as well

This commit is contained in:
Uriziel 2012-12-29 12:22:46 +01:00
parent e2f08b6df7
commit 9d8c084fe5
1 changed files with 2 additions and 2 deletions

View File

@ -10,7 +10,7 @@ def getMessage(locale, type_):
if(messages.has_key(locale)):
if(messages[locale].has_key(type_)):
return messages[locale][type_]
elif(messages["en"].has_key(type_)):
return messages["en"][type_]
if(messages["en"].has_key(type_)):
return messages["en"][type_]
else:
raise KeyError()