diff options
| author | Christopher Long <indirecthit@gmail.com> | 2007-06-17 22:18:54 +0000 |
|---|---|---|
| committer | Christopher Long <indirecthit@gmail.com> | 2007-06-17 22:18:54 +0000 |
| commit | ae22b6d403dcf25098c77f0dfcf59ae58b186461 (patch) | |
| tree | c37fc631e99a7e4d909d6b6d236f495003731ea7 /django/utils/translation/trans_real.py | |
| parent | 0cf7bc439129c66df8d64601e885f83b256b4f25 (diff) | |
per-object-permissions: Merged to trunk [5486] NOTE: Not fully tested, will be working on this over the next few weeks.
git-svn-id: http://code.djangoproject.com/svn/django/branches/per-object-permissions@5488 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/utils/translation/trans_real.py')
| -rw-r--r-- | django/utils/translation/trans_real.py | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/django/utils/translation/trans_real.py b/django/utils/translation/trans_real.py index 94df23a8e9..293b4ef9cd 100644 --- a/django/utils/translation/trans_real.py +++ b/django/utils/translation/trans_real.py @@ -3,7 +3,6 @@ import os, re, sys import gettext as gettext_module from cStringIO import StringIO -from django.utils.functional import lazy try: import threading @@ -200,7 +199,7 @@ def deactivate(): will resolve against the default translation object, again. """ global _active - if _active.has_key(currentThread()): + if currentThread() in _active: del _active[currentThread()] def get_language(): @@ -277,9 +276,6 @@ def ngettext(singular, plural, number): _default = translation(settings.LANGUAGE_CODE) return _default.ngettext(singular, plural, number) -gettext_lazy = lazy(gettext, str) -ngettext_lazy = lazy(ngettext, str) - def check_for_language(lang_code): """ Checks whether there is a global language file for the given language code. @@ -493,4 +489,3 @@ def string_concat(*strings): """ return ''.join([str(el) for el in strings]) -string_concat = lazy(string_concat, str) |
