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']), |
165 |
|
|
166 |
def unicodeToLocale(unicodeStr): |
def unicodeToLocale(unicodeStr): |
167 |
"Function to convert unicode to the user's locale encoding" |
"Function to convert unicode to the user's locale encoding" |
168 |
|
# Under a german windows 2000 getlocale returns an encoding name |
169 |
return unicodeStr.encode(getlocale()[1]) |
# that's not direcly usable (it's missing a "cp" at the beginning). |
170 |
|
# getdefaultlocale does return a usable encoding name so we use that |
171 |
|
# instead. |
172 |
|
return unicodeStr.encode(getdefaultlocale()[1]) |