silke: thuban/Thuban/UI about.py,1.12,1.13

Silke Reimer Silke.Reimer at intevation.de
Wed Aug 11 10:04:20 CEST 2004


On Tue, Aug 10, 2004 at 10:36:31PM +0200, Martin Schulze wrote:
> cvs at intevation.de wrote:
> > +import locale

Oh, sorry. This shouldn't be there. I forgot to delete it after my
test codings that I did before.

>    ^^^^^^^^^^^^^
> 
> > +
> >  from Thuban import _
> >  from Thuban.version import versions
> >  from Thuban.Model.resource import gdal_support_status
> > @@ -33,9 +35,9 @@
> >          # characters to get byte strings in latin1.
> >          lead_developer = 'Bernhard Herzog'
> >          developers = [ 'Jonathan Coles', 'Frank Koormann',
> > -                       'Martin M\xfcller', 'Jan-Oliver Wagner' ]
> > +                       unicodeToLocale(u'Martin M\xfcller'), 'Jan-Oliver Wagner' ]
> >          translators = [ ( _('French'), 'Daniel Calvelo Aros' ),
> > -                        ( _('German'), 'Bj\xf6rn Broscheit'),
> > +                        ( _('German'), unicodeToLocale(u'Bj\xf6rn Broscheit')),
> >                          ( _('Italian'), 'Maurizio Napolitano'),
> >                          ( _('Portuguese (Brazilian)'), 'Eduardo Patto Kanegae'),
> >                          ( _('Russian'), 'Alex Shevlakov'),
> > @@ -128,4 +130,11 @@
> >      def OnCancel(self, event):
> >          self.EndModal(wxID_CANCEL)
> >  
> > +
> > +def unicodeToLocale(unicodeStr):
> > +    " Function to convert a unicode object to an object \ in the user's locale encoding"
> > +
> > +
> > +    import locale
>        ^^^^^^^^^^^^^
> 
> > +    return unicodeStr.encode(locale.getlocale()[1])
> 
> Do you need to import the module twice?  (yes, I know Python won't import it twice).
> 
> I'd also expect "from locale import getlocale", though.

OK. I can change this. This would make the code better to read
anyway.

Regards,

	Silke



-- 
Silke Reimer

Intevation GmbH                      http://intevation.de/
FreeGIS                                http://freegis.org/

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://www.intevation.de/pipermail/thuban-devel/attachments/20040811/bb9798fe/attachment.bin


More information about the Thuban-devel mailing list

This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)