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]> |
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 |
37 |
# Note: The source code is in ASCII, so we escape some |
# Note: The source code is in ASCII, so we escape some |
38 |
# characters to get byte strings in latin1. |
# characters to get byte strings in latin1. |
39 |
lead_developer = 'Bernhard Herzog' |
lead_developer = 'Bernhard Herzog' |
40 |
developers = [ 'Jonathan Coles', 'Frank Koormann', |
developers = [ 'Jonathan Coles', |
41 |
unicodeToLocale(u'Martin M\xfcller'), 'Jan-Oliver Wagner' ] |
'Frank Koormann', |
42 |
|
unicodeToLocale(u'Martin M\xfcller'), |
43 |
|
'Bernhard Reiter', |
44 |
|
'Jan-Oliver Wagner' ] |
45 |
translators = [ ( _('French'), 'Daniel Calvelo Aros' ), |
translators = [ ( _('French'), 'Daniel Calvelo Aros' ), |
46 |
( _('German'), unicodeToLocale(u'Bj\xf6rn Broscheit')), |
( _('German'), unicodeToLocale(u'Bj\xf6rn Broscheit')), |
47 |
|
( _('Hungarian'), 'Norbert Solymosi'), |
48 |
( _('Italian'), 'Maurizio Napolitano'), |
( _('Italian'), 'Maurizio Napolitano'), |
49 |
( _('Portuguese (Brazilian)'), 'Eduardo Patto Kanegae'), |
( _('Portuguese (Brazilian)'), 'Eduardo Patto Kanegae'), |
50 |
( _('Russian'), 'Alex Shevlakov'), |
( _('Russian'), 'Alex Shevlakov'), |
51 |
( _('Spanish'), 'Daniel Calvelo Aros') ] |
( _('Spanish'), 'Daniel Calvelo Aros') ] |
52 |
other_contributors = [ 'Jonathan Byron', 'Silke Reimer', |
other_contributors = [ 'Jonathan Byron', |
53 |
'Bernhard Reiter' ] |
'Ole Rahn', |
54 |
|
'Silke Reimer' ] |
55 |
dyn_modules = [ ('wxPython', versions['wxPython']), |
dyn_modules = [ ('wxPython', versions['wxPython']), |
56 |
('Python', versions['python']), |
('Python', versions['python']), |
57 |
('PySQLite', versions['pysqlite']), |
('PySQLite', versions['pysqlite']), |
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') |
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') |