Django

Code

Changeset 6701

Show
Ignore:
Timestamp:
11/18/07 23:59:58 (1 year ago)
Author:
gwilson
Message:

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.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/trunk/django/bin/compile-messages.py

    r6447 r6701  
    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. 
  • django/trunk/django/conf/global_settings.py

    r6581 r6701  
    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. 
  • django/trunk/django/utils/translation/trans_real.py

    r6681 r6701  
    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): 
  • django/trunk/docs/settings.txt

    r6547 r6701  
    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.