diff options
author | Jason Gerard DeRose <jderose@redhat.com> | 2009-01-03 22:03:37 -0700 |
---|---|---|
committer | Jason Gerard DeRose <jderose@redhat.com> | 2009-01-03 22:03:37 -0700 |
commit | c081ce5460018634fb30249ead2168ebf3a79044 (patch) | |
tree | 79f6de9b1a9c96863e71165b68bfda4d32334185 /ipalib/request.py | |
parent | 912ab9e68b6030d4d115d3683893477abb4f6451 (diff) | |
download | freeipa-c081ce5460018634fb30249ead2168ebf3a79044.tar.gz freeipa-c081ce5460018634fb30249ead2168ebf3a79044.tar.xz freeipa-c081ce5460018634fb30249ead2168ebf3a79044.zip |
request.create_translation() now sets context.ugettext and context.ungettext
Diffstat (limited to 'ipalib/request.py')
-rw-r--r-- | ipalib/request.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ipalib/request.py b/ipalib/request.py index 5a07d4db..f5400b75 100644 --- a/ipalib/request.py +++ b/ipalib/request.py @@ -50,7 +50,7 @@ def set_languages(*languages): def create_translation(domain, localedir, *languages): - if hasattr(context, 'gettext') or hasattr(context, 'ngettext'): + if hasattr(context, 'ugettext') or hasattr(context, 'ungettext'): raise StandardError( 'create_translation() already called in thread %r' % threading.currentThread().getName() @@ -59,5 +59,5 @@ def create_translation(domain, localedir, *languages): translation = gettext.translation(domain, localedir=localedir, languages=context.languages, fallback=True ) - context.gettext = translation.ugettext - context.ngettext = translation.ungettext + context.ugettext = translation.ugettext + context.ungettext = translation.ungettext |