[katello-devel] Gettext - string with parameters

Jason Rist jrist at redhat.com
Fri Aug 12 15:04:04 UTC 2011


On 08/12/2011 08:53 AM, Ivan Nečas wrote:
> On 08/12/2011 04:41 PM, Lukas Zapletal wrote:
>> On 08/12/2011 04:29 PM, Ivan Nečas wrote:
>>>
>>> I think it's the main reason why this approach is recommended in the
>>> doc.
>>>
>>> What do you think?
>>
>> Interesting, to me it seems this is the safest approach:
>>
>> _("Hello %{w}\n" % {:w => 'World'})
>>
>> But it's obviously very wordy. Come on! This is not Ruby anymore :-)
>>
> Just a little change (alias spot the difference :):
> _("Hello %{w}\n") % {:w => 'World'})
> 
That seems like it wouldn't work.  Where is the other (?

-J

-- 
Jason E. Rist
Senior Software Engineer
Systems Management and Cloud Enablement
Red Hat, Inc.
+1.919.754.4048
Freenode: jrist




More information about the katello-devel mailing list