/[thuban]/trunk/thuban/Thuban/UI/about.py
ViewVC logotype

Diff of /trunk/thuban/Thuban/UI/about.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2428 by jan, Sat Nov 27 21:40:01 2004 UTC revision 2582 by jan, Thu Mar 10 22:47:14 2005 UTC
# Line 1  Line 1 
1  # Copyright (c) 2001, 2002, 2003, 2004 by Intevation GmbH  # Copyright (c) 2001-2005 by Intevation GmbH
2  # Authors:  # Authors:
3  # Jonathan Coles <[email protected]>  # Jonathan Coles <[email protected]>
4  # Bernhard Reiter <[email protected]>  # Bernhard Reiter <[email protected]>
# Line 15  __version__ = "$Revision$" Line 15  __version__ = "$Revision$"
15    
16  from wxPython.wx import *  from wxPython.wx import *
17    
18  from locale import getlocale  from locale import getdefaultlocale
19    
20  from Thuban import _  from Thuban import _
21  from Thuban.version import versions  from Thuban.version import versions
# Line 125  class About(wxDialog): Line 125  class About(wxDialog):
125                  for author in ext.authors:                  for author in ext.authors:
126                      text+= '\t%s\n' % author                      text+= '\t%s\n' % author
127                  text += ext.desc                  text += ext.desc
128                    text += '\n'
129                    text += 'Status: %s' % ext.status
130                  text += '\n\n'                  text += '\n\n'
131          else:          else:
132              text += _('\tNone registered.\n')              text += _('\tNone registered.\n')
# Line 165  class About(wxDialog): Line 167  class About(wxDialog):
167    
168  def unicodeToLocale(unicodeStr):  def unicodeToLocale(unicodeStr):
169      "Function to convert unicode to the user's locale encoding"      "Function to convert unicode to the user's locale encoding"
170        # Under a german windows 2000 getlocale returns an encoding name
171      return unicodeStr.encode(getlocale()[1])      # that's not direcly usable (it's missing a "cp" at the beginning).
172        # getdefaultlocale does return a usable encoding name so we use that
173        # instead.
174        locale=getdefaultlocale()[1]
175        if locale is None:
176            locale = 'ascii'
177        return unicodeStr.encode(locale,'replace')

Legend:
Removed from v.2428  
changed lines
  Added in v.2582

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26