- gettext support added in frontends
- first draft of frontends french translation
This commit is contained in:
Goffi 2010-03-05 20:33:10 +11:00
commit e3ebafd8f3

View file

@ -74,7 +74,7 @@ class Form(wx.Frame):
self.ctl_list.append({'name':name, 'type':type, 'control':ctrl})
sizer.Add(label)
else:
error("FIXME FIXME FIXME: type [%s] is not implemented" % type) #FIXME !
error(_("FIXME FIXME FIXME: type [%s] is not implemented") % type) #FIXME !
raise NotImplementedError
sizer.Add(ctrl, 1, flag=wx.EXPAND)
#self.ctl_list[(name, category)] = ctrl
@ -98,26 +98,24 @@ class Form(wx.Frame):
def onFormSubmitted(self, event):
"""Called when submit button is clicked"""
debug("Submitting form")
debug(_("Submitting form"))
data = []
for ctrl in self.ctl_list:
data.append((ctrl["name"], ctrl["control"].GetValue()))
print "submitting:",data
id = self.host.bridge.gatewayRegister("SUBMIT",self.target, data)
self.host.current_action_ids.add(id)
print "action id:",id
self.MakeModal(False)
self.Destroy()
def onFormCancelled(self, event):
"""Called when cancel button is clicked"""
debug("Cancelling form")
debug(_("Cancelling form"))
self.MakeModal(False)
self.Close()
def onClose(self, event):
"""Close event: we have to send the form."""
debug("close")
debug(_("close"))
self.MakeModal(False)
event.Skip()