﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
19272	"gettext_lazy returns ""unexpected type"""	Germano Gabbianelli	nobody	"
{{{
>>> from django.utils.translation import gettext_lazy
>>> gettext_lazy(""test"").upper()
Traceback (most recent call last):
  File ""<console>"", line 1, in <module>
  File ""/home/tyrion/.virtualenvs/djangobug/src/django/django/utils/functional.py"", line 121, in __wrapper__
    raise TypeError(""Lazy object returned unexpected type."")
TypeError: Lazy object returned unexpected type.
>>>

}}}

This is because `gettext` returns an unicode string, but `gettext_lazy` is defined as:
{{{
gettext_lazy = lazy(gettext, str)
}}}


{{{
>>> from django.utils.translation import gettext
>>> from django.utils.functional import lazy
>>> gettext(""test"")
u'test'
>>> gettext_lazy = lazy(gettext, unicode)
>>> gettext_lazy(""test"")
<django.utils.functional.__proxy__ object at 0x975cfec>
>>> _.upper()
u'TEST'
}}}"	Bug	closed	Translations	dev	Release blocker	fixed		regression	Ready for checkin	1	0	0	0	0	0
