Added 'c' as same as English; made error message less cryptic (I hope)

svn: r14311
This commit is contained in:
Doug Blank
2010-02-11 12:13:46 +00:00
parent 41693a0c17
commit 36281cc5e4

View File

@@ -1801,7 +1801,7 @@ def get_relationship_calculator(reinit=False):
# See if lang begins with en_, English_ or english_ # See if lang begins with en_, English_ or english_
# If so return standard relationship calculator. # If so return standard relationship calculator.
enlang = lang.split('_')[0].lower() enlang = lang.split('_')[0].lower()
if ('en' == enlang) or ('english' == enlang): if enlang in ('en', 'english', 'c'):
return __RELCALC_CLASS() return __RELCALC_CLASS()
# set correct non English relationship calculator based on LANG # set correct non English relationship calculator based on LANG
# or on locale.getlocale() or if that fails locale.getdeafultlocale() # or on locale.getlocale() or if that fails locale.getdeafultlocale()
@@ -1833,8 +1833,8 @@ def get_relationship_calculator(reinit=False):
break break
if not relation_translation_found and \ if not relation_translation_found and \
len(PluginRegister.get_instance().relcalc_plugins()): len(PluginRegister.get_instance().relcalc_plugins()):
print "No language available or wrong code in rel_xx.py." print (("No translation available for language '%s'. " +
print "English will be used." "Using 'english' instead.") % enlang)
return __RELCALC_CLASS() return __RELCALC_CLASS()
#------------------------------------------------------------------------- #-------------------------------------------------------------------------