2 |
# Authors: |
# Authors: |
3 |
# Jonathan Coles <[email protected]> |
# Jonathan Coles <[email protected]> |
4 |
# Bernhard Reiter <[email protected]> |
# Bernhard Reiter <[email protected]> |
5 |
|
# Silke Reimer <[email protected]> |
6 |
# |
# |
7 |
# This program is free software under the GPL (>=v2) |
# This program is free software under the GPL (>=v2) |
8 |
# Read the file COPYING coming with Thuban for details. |
# Read the file COPYING coming with Thuban for details. |
15 |
|
|
16 |
from wxPython.wx import * |
from wxPython.wx import * |
17 |
|
|
18 |
|
from locale import getlocale |
19 |
|
|
20 |
from Thuban import _ |
from Thuban import _ |
21 |
from Thuban.version import versions |
from Thuban.version import versions |
22 |
from Thuban.Model.resource import gdal_support_status |
from Thuban.Model.resource import gdal_support_status |
23 |
|
|
24 |
|
from Thuban.UI.extensionregistry import ext_registry |
25 |
|
|
26 |
class About(wxDialog): |
class About(wxDialog): |
27 |
|
|
28 |
def __init__(self, parent): |
def __init__(self, parent): |
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', 'Frank Koormann', |
41 |
'Martin M\xfcller', 'Jan-Oliver Wagner' ] |
unicodeToLocale(u'Martin M\xfcller'), 'Jan-Oliver Wagner' ] |
42 |
translators = [ ( _('French'), 'Daniel Calvelo Aros' ), |
translators = [ ( _('French'), 'Daniel Calvelo Aros' ), |
43 |
( _('German'), 'Bj\xf6rn Broscheit'), |
( _('German'), unicodeToLocale(u'Bj\xf6rn Broscheit')), |
44 |
( _('Italian'), 'Maurizio Napolitano'), |
( _('Italian'), 'Maurizio Napolitano'), |
45 |
( _('Portuguese (Brazilian)'), 'Eduardo Patto Kanegae'), |
( _('Portuguese (Brazilian)'), 'Eduardo Patto Kanegae'), |
46 |
( _('Russian'), 'Alex Shevlakov'), |
( _('Russian'), 'Alex Shevlakov'), |
75 |
text+= '\t%s %s\n' % (name, version) |
text+= '\t%s %s\n' % (name, version) |
76 |
text += '\n' |
text += '\n' |
77 |
|
|
78 |
|
text += _('Extensions:\n') |
79 |
|
if ext_registry: |
80 |
|
for ext in ext_registry: |
81 |
|
text += '\t%s %s\n' % (ext.name, ext.version) |
82 |
|
else: |
83 |
|
text += _('\tNone registered.\n') |
84 |
|
text += '\n' |
85 |
|
|
86 |
text += _('Lead Developer:\n') |
text += _('Lead Developer:\n') |
87 |
text += '\t%s\n\n' % lead_developer |
text += '\t%s\n\n' % lead_developer |
88 |
|
|
108 |
"\tThuban team at Intevation:\n\t\t<[email protected]>\n" |
"\tThuban team at Intevation:\n\t\t<[email protected]>\n" |
109 |
) |
) |
110 |
|
|
111 |
|
text += '\n\n' |
112 |
|
|
113 |
|
text += _("Details on the registered extensions:\n\n") |
114 |
|
|
115 |
|
if ext_registry: |
116 |
|
for ext in ext_registry: |
117 |
|
text += '%s %s:\n' % (ext.name, ext.version) |
118 |
|
text += _('Copyright %s\n') % ext.copyright |
119 |
|
text += _('Authors:\n') |
120 |
|
for author in ext.authors: |
121 |
|
text+= '\t%s\n' % author |
122 |
|
text += ext.desc |
123 |
|
text += '\n\n' |
124 |
|
else: |
125 |
|
text += _('\tNone registered.\n') |
126 |
|
|
127 |
self.text = text |
self.text = text |
128 |
|
|
129 |
text_title = wxStaticText(self, -1, |
text_title = wxStaticText(self, -1, |
158 |
self.EndModal(wxID_CANCEL) |
self.EndModal(wxID_CANCEL) |
159 |
|
|
160 |
|
|
161 |
|
def unicodeToLocale(unicodeStr): |
162 |
|
"Function to convert unicode to the user's locale encoding" |
163 |
|
|
164 |
|
return unicodeStr.encode(getlocale()[1]) |
165 |
|
|