Comment 3 for bug 326974

Revision history for this message
David Paleino (dpaleino) wrote :

Hello,
an update, since a Debian user reopened the bug I had fixed :(

I updated the patch with:

- lc, encoding = locale.getdefaultlocale()
+ # This avoids a bug: locale.getdefaultlocale() prefers
+ # LC_CTYPE over LANG/LANGUAGE
+ lc, encoding = locale.getdefaultlocale(envvars=('LC_MESSAGES', 'LC_ALL', 'LANG', 'LANGUAGE'))

This is because python's locale.getdefaultlocale() parses LC_CTYPE *before* LANG/LANGUAGE, which is *wrong* (LC_CTYPE is not for localized messages). Sure it's a locale (the python module) bug, but this workarounds it.

(to test: $ LANG=C LC_CTYPE=<yourlocale> wicd-client)

However, I believe that was somewhat broken. Why parts of the GUI used LC_MESSAGES/LANG and others used what returned by getdefaultlocale() ? I really believe only LC_MESSAGES (I'm not sure though) should be parsed.

Please fix this in 1.6.0. Apropos: any estimated release date? :)

(people filed other bugs/wishlists/requests/... to fix/implement, and I replied "I'll work on these on 1.6.0, since the code structure changed")

Ciao,
David