[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [Pulp-list] Translatable strings



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
RHCE: 805010912355231
GPG Fingerprint: 2048R/CC4ED7C1



On Aug 2, 2012, at 2:43 PM, James Slagle <jslagle 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 redhat com
https://www.redhat.com/mailman/listinfo/pulp-list


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]