Translation even if LANG missing or set wrong or None.

svn: r14209
This commit is contained in:
Peter Landgren 2010-02-04 12:56:11 +00:00
parent 9e3797a8c3
commit 2f1a8dc1ed

View File

@ -1805,6 +1805,9 @@ def get_relationship_calculator(reinit=False):
# LANG set but with non recognizable language info. Try getlocale
import locale
lang = locale.getlocale()[0]
if not lang:
# if lang is empty/None
lang = locale.getdefaultlocale()[0]
if lang in plugin.lang_list:
pmgr = BasePluginManager.get_instance()
# the loaded module is put in variable mod