mirror of
https://github.com/django/django.git
synced 2025-11-07 07:15:35 +00:00
Fixed #15024 -- Ensure that choice of L10N format module used is stable given a stable setup of format modules in ll/ and ll_CC/ dirs. Thanks David Reynolds for the report and suggestions leading to the solution.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15183 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
@@ -24,7 +24,9 @@ def iter_format_modules(lang):
|
||||
format_locations.append(settings.FORMAT_MODULE_PATH + '.%s')
|
||||
format_locations.reverse()
|
||||
locale = to_locale(lang)
|
||||
locales = set((locale, locale.split('_')[0]))
|
||||
locales = [locale]
|
||||
if '_' in locale:
|
||||
locales.append(locale.split('_')[0])
|
||||
for location in format_locations:
|
||||
for loc in locales:
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user