Ticket #19763: django_utils_translation_trans_real.py.diff
File django_utils_translation_trans_real.py.diff, 614 bytes (added by , 12 years ago) |
---|
-
utils/translation/trans_real.py
old new 427 427 _accepted[normalized] = lang 428 428 return lang 429 429 430 lang_code = settings.LANGUAGE_CODE 431 432 if lang_code and lang_code not in supported: 433 lang_code = lang_code.split('-')[0] # e.g. if fr-ca is not supported fallback to fr 434 435 if lang_code and lang_code in supported and check_for_language(lang_code): 436 return lang_code 437 430 438 return settings.LANGUAGE_CODE 431 439 432 440 dot_re = re.compile(r'\S')