Add example to the lazy gettext version to make clear when it's appropriate

I needed an example to really get when lazy_gettext would be good...
This commit is contained in:
Sebastian Spaeth 2012-12-14 15:16:49 +01:00
parent 18a52dacca
commit c843de8a57

View File

@ -129,7 +129,10 @@ def lazy_pass_to_ugettext(*args, **kwargs):
This is useful if you have to define a translation on a module
level but you need it to not translate until the time that it's
used as a string.
used as a string. For example, in:
def func(self, message=_('Hello boys and girls'))
you would want to use the lazy version for _.
"""
return LazyProxy(pass_to_ugettext, *args, **kwargs)