[Yum-devel] A huge datapoint/testcase for the i18n problems, and possible fix
James Antill
james.antill at redhat.com
Fri Apr 11 15:40:50 UTC 2008
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 Antill <james.antill at redhat.com>
Red Hat
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.baseurl.org/pipermail/yum-devel/attachments/20080411/e5efe099/attachment.pgp
More information about the Yum-devel
mailing list