My most common practice:

msg = _("string with %(var)s substitution")
msg % {'var': 'awesome'}

Covers all the bases and formats halfway decently as well.

Jason L Connor
linear on freenode #pulp
http://pulpproject.org/
RHCE: 805010912355231
GPG Fingerprint: 2048R/CC4ED7C1



On Aug 2, 2012, at 2:43 PM, James Slagle <[email protected]> wrote:

> On Thu, Aug 02, 2012 at 04:34:58PM -0400, Bryan Kearney wrote:
>> And, do parameter substitution outside:
>> 
>> msg = ("Some Cool %s") % "stuff"
>> 
>> not
>> = ("Some Cool %s" % "stuff")
> 
> except use _()
> 
> --
> -- James Slagle
> --
> 
> _______________________________________________
> Pulp-list mailing list
> [email protected]
> https://www.redhat.com/mailman/listinfo/pulp-list

_______________________________________________
Pulp-list mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/pulp-list

Reply via email to