Issue 64: Use of ugettext_lazy in contexts where ugettext is acceptable.
http://code.google.com/p/django-hotclub/issues/detail?id=64

New issue report by brosner:
There are some places in our source code where we alias ugettext_lazy to _.  
This is good for global
scope and is what it was designed for. But sometimes it spills into local  
scope within a request
where calling ugettext is more approaite. It is less error prone. For  
example:

{{{
request.user.message_set.create(message=_("Did not add photo '%s' to  
project because it already
exists.") % title)
}}}

_ is aliased to ugettext_lazy and this works due to the % operator coercing  
the string to a unicode
string before passing down to the ORM level. Add it been just the lazy  
string bad things happen.


Issue attributes:
        Status: Assigned
        Owner: brosner
        Labels: Type-Defect Priority-Medium

-- 
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pinax-updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/pinax-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to