From 36281cc5e497a9df523d6dba0cbccf8940dfd5d3 Mon Sep 17 00:00:00 2001 From: Doug Blank Date: Thu, 11 Feb 2010 12:13:46 +0000 Subject: [PATCH] Added 'c' as same as English; made error message less cryptic (I hope) svn: r14311 --- src/Relationship.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Relationship.py b/src/Relationship.py index a728a05d7..890d8536b 100644 --- a/src/Relationship.py +++ b/src/Relationship.py @@ -1801,7 +1801,7 @@ def get_relationship_calculator(reinit=False): # See if lang begins with en_, English_ or english_ # If so return standard relationship calculator. enlang = lang.split('_')[0].lower() - if ('en' == enlang) or ('english' == enlang): + if enlang in ('en', 'english', 'c'): return __RELCALC_CLASS() # set correct non English relationship calculator based on LANG # or on locale.getlocale() or if that fails locale.getdeafultlocale() @@ -1833,8 +1833,8 @@ def get_relationship_calculator(reinit=False): break if not relation_translation_found and \ len(PluginRegister.get_instance().relcalc_plugins()): - print "No language available or wrong code in rel_xx.py." - print "English will be used." + print (("No translation available for language '%s'. " + + "Using 'english' instead.") % enlang) return __RELCALC_CLASS() #-------------------------------------------------------------------------