From 2f1a8dc1ed7c0f47c5e9eb99d2e400394a525527 Mon Sep 17 00:00:00 2001 From: Peter Landgren Date: Thu, 4 Feb 2010 12:56:11 +0000 Subject: [PATCH] Translation even if LANG missing or set wrong or None. svn: r14209 --- src/Relationship.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Relationship.py b/src/Relationship.py index a3bbaf854..02558e134 100644 --- a/src/Relationship.py +++ b/src/Relationship.py @@ -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