Fixed #5978 -- Gave `LOCALE_PATHS` a default setting of an empty tuple and removed some code that was checking for its existance in settings before accessing it.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@6701 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Gary Wilson Jr 2007-11-19 05:59:58 +00:00
parent 331d4bba97
commit 1607acee40
4 changed files with 8 additions and 8 deletions

View File

@ -11,10 +11,9 @@ except NameError:
def compile_messages(locale=None):
basedirs = [os.path.join('conf', 'locale'), 'locale']
basedirs = (os.path.join('conf', 'locale'), 'locale')
if os.environ.get('DJANGO_SETTINGS_MODULE'):
from django.conf import settings
if hasattr(settings, 'LOCALE_PATHS'):
basedirs += settings.LOCALE_PATHS
# Gather existing directories.

View File

@ -90,6 +90,8 @@ LANGUAGES_BIDI = ("he", "ar", "fa")
# to load the internationalization machinery.
USE_I18N = True
LOCALE_PATHS = ()
# Not-necessarily-technical managers of the site. They get broken link
# notifications and other various e-mails.
MANAGERS = ADMINS

View File

@ -168,7 +168,6 @@ def translation(language):
res.merge(t)
return res
if hasattr(settings, 'LOCALE_PATHS'):
for localepath in settings.LOCALE_PATHS:
if os.path.isdir(localepath):
res = _merge(localepath)

View File

@ -583,7 +583,7 @@ LOCALE_PATHS
Default: ``()`` (Empty tuple)
A list of directories where Django looks for translation files.
A tuple of directories where Django looks for translation files.
See the `internationalization docs section`_ explaining the variable and the
default behavior.