Author: gwilson
Date: 2007-11-18 23:59:58 -0600 (Sun, 18 Nov 2007)
New Revision: 6701
Modified:
django/trunk/django/bin/compile-messages.py
django/trunk/django/conf/global_settings.py
django/trunk/django/utils/translation/trans_real.py
django/trunk/docs/settings.txt
Log:
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.
Modified: django/trunk/django/bin/compile-messages.py
===================================================================
--- django/trunk/django/bin/compile-messages.py 2007-11-19 04:36:09 UTC (rev
6700)
+++ django/trunk/django/bin/compile-messages.py 2007-11-19 05:59:58 UTC (rev
6701)
@@ -11,11 +11,10 @@
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
+ basedirs += settings.LOCALE_PATHS
# Gather existing directories.
basedirs = set(map(os.path.abspath, filter(os.path.isdir, basedirs)))
Modified: django/trunk/django/conf/global_settings.py
===================================================================
--- django/trunk/django/conf/global_settings.py 2007-11-19 04:36:09 UTC (rev
6700)
+++ django/trunk/django/conf/global_settings.py 2007-11-19 05:59:58 UTC (rev
6701)
@@ -90,6 +90,8 @@
# 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
Modified: django/trunk/django/utils/translation/trans_real.py
===================================================================
--- django/trunk/django/utils/translation/trans_real.py 2007-11-19 04:36:09 UTC
(rev 6700)
+++ django/trunk/django/utils/translation/trans_real.py 2007-11-19 05:59:58 UTC
(rev 6701)
@@ -168,10 +168,9 @@
res.merge(t)
return res
- if hasattr(settings, 'LOCALE_PATHS'):
- for localepath in settings.LOCALE_PATHS:
- if os.path.isdir(localepath):
- res = _merge(localepath)
+ for localepath in settings.LOCALE_PATHS:
+ if os.path.isdir(localepath):
+ res = _merge(localepath)
if projectpath and os.path.isdir(projectpath):
res = _merge(projectpath)
Modified: django/trunk/docs/settings.txt
===================================================================
--- django/trunk/docs/settings.txt 2007-11-19 04:36:09 UTC (rev 6700)
+++ django/trunk/docs/settings.txt 2007-11-19 05:59:58 UTC (rev 6701)
@@ -583,7 +583,7 @@
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.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---