<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">My most common practice:<div><br></div><div>msg = _("string with %(var)s substitution")</div><div>msg % {'var': 'awesome'}</div><div><br></div><div>Covers all the bases and formats halfway decently as well.</div><div><br></div><div><div apple-content-edited="true">
<span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div>Jason L Connor</div><div>linear on freenode #pulp</div><div><a href="http://pulpproject.org/">http://pulpproject.org/</a></div><div>RHCE: 805010912355231</div><div>GPG Fingerprint: 2048R/CC4ED7C1</div><div><br></div></span><br class="Apple-interchange-newline">

</div>
<br><div><div>On Aug 2, 2012, at 2:43 PM, James Slagle <<a href="mailto:jslagle@redhat.com">jslagle@redhat.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">On Thu, Aug 02, 2012 at 04:34:58PM -0400, Bryan Kearney wrote:<br><blockquote type="cite">And, do parameter substitution outside:<br><br>msg = ("Some Cool %s") % "stuff"<br><br>not<br>= ("Some Cool %s" % "stuff")<br></blockquote><br>except use _()<br><br>--<br>-- James Slagle<br>--<br><br>_______________________________________________<br>Pulp-list mailing list<br><a href="mailto:Pulp-list@redhat.com">Pulp-list@redhat.com</a><br>https://www.redhat.com/mailman/listinfo/pulp-list<br></blockquote></div><br></div></body></html>