Mercurial > libervia-backend
comparison frontends/wix/chat.py @ 70:8f2ed279784b
i18n
- gettext support added in frontends
- first draft of frontends french translation
author | Goffi <goffi@goffi.org> |
---|---|
date | Fri, 05 Mar 2010 20:33:10 +1100 |
parents | 0e50dd3a234a |
children | f271fff3a713 |
comparison
equal
deleted
inserted
replaced
69:86f1f7f6d332 | 70:8f2ed279784b |
---|---|
63 self.Hide() #We hide because of the show toggle | 63 self.Hide() #We hide because of the show toggle |
64 | 64 |
65 def createMenus(self): | 65 def createMenus(self): |
66 info("Creating menus") | 66 info("Creating menus") |
67 actionMenu = wx.Menu() | 67 actionMenu = wx.Menu() |
68 actionMenu.Append(idSEND, "&SendFile CTRL-s"," Send a file to contact") | 68 actionMenu.Append(idSEND, _("&SendFile CTRL-s"),_(" Send a file to contact")) |
69 menuBar = wx.MenuBar() | 69 menuBar = wx.MenuBar() |
70 menuBar.Append(actionMenu,"&Action") | 70 menuBar.Append(actionMenu,_("&Action")) |
71 self.SetMenuBar(menuBar) | 71 self.SetMenuBar(menuBar) |
72 | 72 |
73 #events | 73 #events |
74 wx.EVT_MENU(self, idSEND, self.onSendFile) | 74 wx.EVT_MENU(self, idSEND, self.onSendFile) |
75 | 75 |
76 def __del__(self): | 76 def __del__(self): |
77 debug ("Chat window destructor") | |
78 wx.Frame.__del__(self) | 77 wx.Frame.__del__(self) |
79 | 78 |
80 def onClose(self, event): | 79 def onClose(self, event): |
81 """Close event: we only hide the frame.""" | 80 """Close event: we only hide the frame.""" |
82 event.Veto() | 81 event.Veto() |
106 self.Raise() #FIXME: too intrusive | 105 self.Raise() #FIXME: too intrusive |
107 | 106 |
108 ### events ### | 107 ### events ### |
109 | 108 |
110 def onSendFile(self, e): | 109 def onSendFile(self, e): |
111 debug("Send File") | 110 debug(_("Send File")) |
112 filename = wx.FileSelector("Choose a file to send", flags = wx.FD_FILE_MUST_EXIST) | 111 filename = wx.FileSelector(_("Choose a file to send"), flags = wx.FD_FILE_MUST_EXIST) |
113 if filename: | 112 if filename: |
114 debug("filename: %s",filename) | 113 debug(_("filename: %s"),filename) |
115 full_jid = self.host.CM.get_full(self.to_jid) | 114 full_jid = self.host.CM.get_full(self.to_jid) |
116 id = self.host.bridge.sendFile(full_jid, filename) | 115 id = self.host.bridge.sendFile(full_jid, filename) |
117 self.host.waitProgress(id, "File Transfer", "Copying %s" % os.path.basename(filename)) | 116 self.host.waitProgress(id, _("File Transfer"), _("Copying %s") % os.path.basename(filename)) |
118 | 117 |