Re: Code freeze break for Hamster



Le jeudi 12 mars 2009, à 20:26 +0200, Toms a écrit :
> Ok, so managed to get to ugettext. Final patch is to use
> gettext.install and specifying to always use unicode instead of doing
> the _ assignment manually:
> 
> 
> Index: hamster/__init__.py
> ===================================================================
> --- hamster/__init__.py	(revision 829)
> +++ hamster/__init__.py	(working copy)
> @@ -34,8 +34,7 @@
>  from dispatcher import Dispatcher
> 
>  # Init i18n
> -import __builtin__
> -__builtin__._ = gettext.gettext
> +gettext.install("hamster-applet", unicode = True)
> 
>  # Allow to use not installed hamster
>  UNINSTALLED_HAMSTER = False
> 
> 
> 
> 
> ===========================
> This approach also solves the problem.
> Did not touch anything else because it doesn't break the code.
> Patch has been successfully tested on OpenSUSE 11.1 (python 2.6) and
> Ubuntu Intrepid (python 2.4)

Has this been tested with a non-UTF-8 locale?

Vincent

-- 
Les gens heureux ne sont pas pressés.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]