Commit 7a528800 authored by Guillaume Seguin's avatar Guillaume Seguin

Minor changes : mark 2 strings for translations + cleanup

One of the strings is to give a hint for wrong baudrates (#276)
parent df00b7e2
...@@ -204,9 +204,9 @@ class PronterWindow(MainWindow, pronsole.pronsole): ...@@ -204,9 +204,9 @@ class PronterWindow(MainWindow, pronsole.pronsole):
def endcb(self): def endcb(self):
if self.p.queueindex == 0: if self.p.queueindex == 0:
print "Print ended at: " + format_time(time.time())
print_duration = int(time.time () - self.starttime + self.extra_print_time) print_duration = int(time.time () - self.starttime + self.extra_print_time)
print "and took: " + format_duration(print_duration) print _("Print ended at: %(end_time)s and took %(duration)s") % {"end_time": format_time(time.time()))
"duration": format_duration(print_duration)}
wx.CallAfter(self.pausebtn.Disable) wx.CallAfter(self.pausebtn.Disable)
wx.CallAfter(self.printbtn.SetLabel, _("Print")) wx.CallAfter(self.printbtn.SetLabel, _("Print"))
...@@ -591,7 +591,7 @@ class PronterWindow(MainWindow, pronsole.pronsole): ...@@ -591,7 +591,7 @@ class PronterWindow(MainWindow, pronsole.pronsole):
wx.CallAfter(self.btemp.SetInsertionPoint, 0) wx.CallAfter(self.btemp.SetInsertionPoint, 0)
def showwin(self, event): def showwin(self, event):
if(self.f is not None): if self.f is not None:
self.gwindow.Show(True) self.gwindow.Show(True)
self.gwindow.SetToolTip(wx.ToolTip("Mousewheel zooms the display\nShift / Mousewheel scrolls layers")) self.gwindow.SetToolTip(wx.ToolTip("Mousewheel zooms the display\nShift / Mousewheel scrolls layers"))
self.gwindow.Raise() self.gwindow.Raise()
...@@ -1018,8 +1018,7 @@ class PronterWindow(MainWindow, pronsole.pronsole): ...@@ -1018,8 +1018,7 @@ class PronterWindow(MainWindow, pronsole.pronsole):
try: try:
self.logbox.AppendText(text) self.logbox.AppendText(text)
except: except:
print "attempted to write invalid text to console" print _("Attempted to write invalid text to console, which could be due to an invalid baudrate")
pass
def setloud(self,e): def setloud(self,e):
self.p.loud=e.IsChecked() self.p.loud=e.IsChecked()
...@@ -1519,5 +1518,5 @@ if __name__ == '__main__': ...@@ -1519,5 +1518,5 @@ if __name__ == '__main__':
main.Show() main.Show()
try: try:
app.MainLoop() app.MainLoop()
except: except KeyboardInterrupt:
pass pass
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment