Ticket #5978: 5978.diff

File 5978.diff, 2.3 KB (added by Gary Wilson, 17 years ago)
  • django/conf/global_settings.py

     
    9090# to load the internationalization machinery.
    9191USE_I18N = True
    9292
     93LOCALE_PATHS = ()
     94
    9395# Not-necessarily-technical managers of the site. They get broken link
    9496# notifications and other various e-mails.
    9597MANAGERS = ADMINS
  • django/utils/translation/trans_real.py

     
    168168                    res.merge(t)
    169169            return res
    170170
    171         if hasattr(settings, 'LOCALE_PATHS'):
    172             for localepath in settings.LOCALE_PATHS:
    173                 if os.path.isdir(localepath):
    174                     res = _merge(localepath)
     171        for localepath in settings.LOCALE_PATHS:
     172            if os.path.isdir(localepath):
     173                res = _merge(localepath)
    175174
    176175        if projectpath and os.path.isdir(projectpath):
    177176            res = _merge(projectpath)
  • django/bin/compile-messages.py

     
    1111
    1212
    1313def compile_messages(locale=None):
    14     basedirs = [os.path.join('conf', 'locale'), 'locale']
     14    basedirs = (os.path.join('conf', 'locale'), 'locale')
    1515    if os.environ.get('DJANGO_SETTINGS_MODULE'):
    1616        from django.conf import settings
    17         if hasattr(settings, 'LOCALE_PATHS'):
    18             basedirs += settings.LOCALE_PATHS
     17        basedirs += settings.LOCALE_PATHS
    1918
    2019    # Gather existing directories.
    2120    basedirs = set(map(os.path.abspath, filter(os.path.isdir, basedirs)))
  • docs/settings.txt

     
    583583
    584584Default: ``()`` (Empty tuple)
    585585
    586 A list of directories where Django looks for translation files.
     586A tuple of directories where Django looks for translation files.
    587587See the `internationalization docs section`_ explaining the variable and the
    588588default behavior.
    589589
Back to Top