Re: Code freeze break for Hamster



On Fri, Mar 13, 2009 at 2:31 AM, Andre Klapper <ak-47 gmx net> wrote:
> Am Donnerstag, den 12.03.2009, 22:59 +0100 schrieb Wouter Bolsterlee:
>>
>> Is it me or does this patch even *REMOVE* translation markers and hence
>> break i18n of certain strings? See below for details.
>
> Patch has been withdrawn for a number of reasons earlier already.
>

Yes, sorry for spamming devel-list
Andre noted that it's enough to bring in release team mailinglist.


My final suggested patch however 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 one-liner 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)


Toms


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