Ticket #5056: ugettext.diff

File ugettext.diff, 1.2 KB (added by Christopher Lenz <cmlenz@…>, 17 years ago)

Map _() to ugettext

  • lib/django/django/conf/__init__.py

     
    144144# django.utils.translation requires a working settings module, and loading it
    145145# from within this file would cause a circular import.
    146146def first_time_gettext(*args):
    147     from django.utils.translation import gettext
    148     __builtins__['_'] = gettext
    149     return gettext(*args)
     147    from django.utils.translation import ugettext
     148    __builtins__['_'] = ugettext
     149    return ugettext(*args)
    150150
    151151__builtins__['_'] = first_time_gettext
  • lib/django/django/utils/translation/trans_real.py

     
    419419    Installs the gettext function as the default translation function under
    420420    the name '_'.
    421421    """
    422     __builtins__['_'] = gettext
     422    __builtins__['_'] = ugettext
    423423
    424424dot_re = re.compile(r'\S')
    425425def blankout(src, char):
Back to Top