[Yum-devel] A huge datapoint/testcase for the i18n problems, and possible fix

Tim Lauridsen tim.lauridsen at googlemail.com
Mon Apr 14 07:46:18 UTC 2008


James Antill wrote:
> On Fri, 2008-04-11 at 01:44 -0400, James Antill wrote:
> 
>>  So the one line patch[1] would make translated messages have the same
>> type that non-translated ones do now ... and _seems_ to work (I'm asking
>> the reporters now, if it fixes it for them too).
> [...]
>> [1] The patch is:
>>
>> diff --git a/yum/i18n.py b/yum/i18n.py
>> index f735edd..dcab01e 100644
>> --- a/yum/i18n.py
>> +++ b/yum/i18n.py
>> @@ -21,7 +21,7 @@ try:
>>      '''
>>      import gettext
>>      t = gettext.translation('yum')
>> -    _ =  t.ugettext
>> +    _ =  t.gettext
>>  except:
>>      '''
>>      Something went wrong so we make a dummy _() wrapper there is just
> 
>  Yeh, so this doesn't fix it ... as this is just making the yum gettext
> calls be in text, not the rpm gettext calls. And it turns out that it's
> not a weird rpm msg either, it's a yum message:
> 
> import gettext
> 
> t = gettext.translation('yum')
> _ =  t.ugettext
> sys.stdout.write(_('GPG key retrieval failed: '))
> 
> ...this fails when run with LANG=pl_PL.UTF-8.
>  We've checked in something that seems to fix it, but I assume the above
> is also broken ... and I'm not sure how we can guarantee we don't have
> problems like that (run a python script on the .po files that tries to
> load each message?)
> 
> 

James, this is real cool work you are doing to nail down all that 
unicode and i18n CRACK.
It makes my head spin and something green is coming out of my mouth :)

Tim



More information about the Yum-devel mailing list