Skip to content

Commit 7d25682

Browse files
committed
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.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12875 bcc190cf-cafb-0310-a4f2-bffc1f526a37
1 parent aa53876 commit 7d25682

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

django/utils/translation/__init__.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
"""
22
Internationalization support.
33
"""
4-
from django.conf import settings
54
from django.utils.encoding import force_unicode
65
from django.utils.functional import lazy, curry
7-
from django.utils.translation import trans_real, trans_null
86

97

108
__all__ = ['gettext', 'gettext_noop', 'gettext_lazy', 'ngettext',
@@ -28,10 +26,11 @@ def delayed_loader(real_name, *args, **kwargs):
2826
that modules can use the translation bits without actually requiring
2927
Django's settings bits to be configured before import.
3028
"""
29+
from django.conf import settings
3130
if settings.USE_I18N:
32-
trans = trans_real
31+
from django.utils.translation import trans_real as trans
3332
else:
34-
trans = trans_null
33+
from django.utils.translation import trans_null as trans
3534

3635
# Make the originally requested function call on the way out the door.
3736
return getattr(trans, real_name)(*args, **kwargs)

0 commit comments

Comments
 (0)