[Pulp-list] Translatable strings
Jason Connor
jconnor at redhat.com
Thu Aug 2 20:50:42 UTC 2012
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 <jslagle at redhat.com> 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
> Pulp-list at redhat.com
> https://www.redhat.com/mailman/listinfo/pulp-list
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/pulp-list/attachments/20120802/6df3594e/attachment.htm>
More information about the Pulp-list
mailing list