Author: russellm
Date: 2010-03-29 03:14:57 -0500 (Mon, 29 Mar 2010)
New Revision: 12875

Modified:
   django/trunk/django/utils/translation/__init__.py
Log:
Fixed #13234 -- Rejiggered the imports in the translation utils . Thanks to 
roklenardic and Spark23 for their reports, and to Alex for his suggestion on a 
potential fix.

Modified: django/trunk/django/utils/translation/__init__.py
===================================================================
--- django/trunk/django/utils/translation/__init__.py   2010-03-29 07:24:45 UTC 
(rev 12874)
+++ django/trunk/django/utils/translation/__init__.py   2010-03-29 08:14:57 UTC 
(rev 12875)
@@ -1,10 +1,8 @@
 """
 Internationalization support.
 """
-from django.conf import settings
 from django.utils.encoding import force_unicode
 from django.utils.functional import lazy, curry
-from django.utils.translation import trans_real, trans_null
 
 
 __all__ = ['gettext', 'gettext_noop', 'gettext_lazy', 'ngettext',
@@ -28,10 +26,11 @@
     that modules can use the translation bits without actually requiring
     Django's settings bits to be configured before import.
     """
+    from django.conf import settings
     if settings.USE_I18N:
-        trans = trans_real
+        from django.utils.translation import trans_real as trans
     else:
-        trans = trans_null
+        from django.utils.translation import trans_null as trans
 
     # Make the originally requested function call on the way out the door.
     return getattr(trans, real_name)(*args, **kwargs)

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

Reply via email to