GrampsLocale: Better handle invalid/missing locale
svn: r21636
This commit is contained in:
parent
9e844f0d64
commit
f270f08be8
@ -333,6 +333,14 @@ class GrampsLocale(object):
|
|||||||
translator._language = "en"
|
translator._language = "en"
|
||||||
return translator
|
return translator
|
||||||
|
|
||||||
|
if not languages or len(languages) == 0:
|
||||||
|
LOG.warning("No language provided, using US English")
|
||||||
|
else:
|
||||||
|
LOG.warning("No usable languages found in list, using US English")
|
||||||
|
translator = GrampsNullTranslations()
|
||||||
|
translator._language = "en"
|
||||||
|
return translator
|
||||||
|
|
||||||
def _set_dictionaries(self):
|
def _set_dictionaries(self):
|
||||||
"""
|
"""
|
||||||
Create a dictionary of language names localized to the
|
Create a dictionary of language names localized to the
|
||||||
|
Loading…
Reference in New Issue
Block a user