[katello-devel] Translation strings with ruby code

Bryan Kearney bkearney at redhat.com
Fri May 20 13:38:25 UTC 2011


On 05/20/2011 08:51 AM, jesus m. rodriguez wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On 05/20/2011 08:10 AM, Lukas Zapletal wrote:
>> Hey,
>>
>> we often have strings with some ruby code, e.g.
>>
>> "bla bla #{some_variable}"
>>
>> I did not test this, but I guess these strings get extracted via gettext
>> including the ruby code. If we use some online translation service in
>> the future we might get into troubles.
>>
>> "bla bla #{User.create(name =>  'cracker', is_admin =>  true)}"
>>
>> To improve security I'd suggest to use the pythonic string formatting:
>>
>> N_("bla bla %s" % [some_variable])
>>
>> This could be also less cryptic for our translation teams and it could
>> prevent typos introduced into the code with auto-translating tools.
>>
>> Comments?
>>
>
> It this really a concern? Shouldn't we verify the strings when the
> come back before pushing out a release? Wouldn't this be verified
> in testing both functional and unit?
>
> I fear we'll be making a change to prevent a problem that may never
> occur or could be preventable in other ways than changing how we
> code.
>
> Just my 2 pesos.
>

Who really verifies 1000 strings?

-- bk




More information about the katello-devel mailing list