class aboutWindow(wx.Frame):
def __init__(self):
- super(aboutWindow, self).__init__(None, title="About", style = wx.DEFAULT_DIALOG_STYLE)
+ super(aboutWindow, self).__init__(None, title=_("About"), style = wx.DEFAULT_DIALOG_STYLE)
wx.EVT_CLOSE(self, self.OnClose)
self.AddText(_("The firmware shipping with new Ultimakers works, but upgrades\nhave been made to make better prints, and make calibration easier."))
self.AddHiddenSeperator()
self.AddText(_("Cura requires these new features and thus\nyour firmware will most likely need to be upgraded.\nYou will get the chance to do so now."))
- upgradeButton, skipUpgradeButton = self.AddDualButton('Upgrade to Marlin firmware', 'Skip upgrade')
+ upgradeButton, skipUpgradeButton = self.AddDualButton(_('Upgrade to Marlin firmware'), _('Skip upgrade'))
upgradeButton.Bind(wx.EVT_BUTTON, self.OnUpgradeClick)
skipUpgradeButton.Bind(wx.EVT_BUTTON, self.OnSkipClick)
self.AddHiddenSeperator()
class headOffsetCalibrationPage(InfoPage):
def __init__(self, parent):
- super(headOffsetCalibrationPage, self).__init__(parent, "Printer head offset calibration")
+ super(headOffsetCalibrationPage, self).__init__(parent, _("Printer head offset calibration"))
self.AddText(_('This wizard will help you in calibrating the printer head offsets of your dual extrusion machine'))
self.AddSeperator()
class InstallFirmware(wx.Dialog):
def __init__(self, parent = None, filename = None, port = None, machineIndex = None):
- super(InstallFirmware, self).__init__(parent=parent, title="Firmware install for %s" % (profile.getMachineSetting('machine_name', machineIndex).title()), size=(250, 100))
+ super(InstallFirmware, self).__init__(parent=parent, title=_("Firmware install for %s") % (profile.getMachineSetting('machine_name', machineIndex).title()), size=(250, 100))
if port is None:
port = profile.getMachineSetting('serial_port')
if filename is None:
class AutoUpdateFirmware(wx.Dialog):
def __init__(self, parent, filename = None, port = None, machineIndex = None):
- super(AutoUpdateFirmware, self).__init__(parent=parent, title="Auto Firmware install", size=(250, 100))
+ super(AutoUpdateFirmware, self).__init__(parent=parent, title=_("Auto Firmware install"), size=(250, 100))
if port is None:
port = profile.getMachineSetting('serial_port')
class mainWindow(wx.Frame):
def __init__(self):
- super(mainWindow, self).__init__(None, title='Cura - ' + version.getVersion())
+ super(mainWindow, self).__init__(None, title=_('Cura - ') + version.getVersion())
wx.EVT_CLOSE(self, self.OnClose)
print profileString
self.lastTriedClipboard = profileString
profile.setProfileFromString(profileString)
- self.scene.notification.message("Loaded new profile from clipboard.")
+ self.scene.notification.message(_("Loaded new profile from clipboard."))
self.updateProfileToAllControls()
except:
print "Unable to read from clipboard"
self.SetSizer(wx.BoxSizer(wx.HORIZONTAL))
self.GetSizer().Add(self.nb, 1, wx.EXPAND)
- (left, right, self.printPanel) = self.CreateDynamicConfigTab(self.nb, 'Basic')
+ (left, right, self.printPanel) = self.CreateDynamicConfigTab(self.nb, _('Basic'))
self._addSettingsToPanels('basic', left, right)
self.SizeLabelWidths(left, right)
- (left, right, self.advancedPanel) = self.CreateDynamicConfigTab(self.nb, 'Advanced')
+ (left, right, self.advancedPanel) = self.CreateDynamicConfigTab(self.nb, _('Advanced'))
self._addSettingsToPanels('advanced', left, right)
self.SizeLabelWidths(left, right)
self.alterationPanel = None
else:
self.alterationPanel = alterationPanel.alterationPanel(self.nb, callback)
- self.nb.AddPage(self.alterationPanel, "Start/End-GCode")
+ self.nb.AddPage(self.alterationPanel, _("Start/End-GCode"))
self.Bind(wx.EVT_SIZE, self.OnSize)
configBase.SettingRow(right, 'check_for_updates')
#configBase.SettingRow(right, 'submit_slice_information')
- self.okButton = wx.Button(right, -1, 'Ok')
+ self.okButton = wx.Button(right, -1, _('Ok'))
right.GetSizer().Add(self.okButton, (right.GetSizer().GetRows(), 0), flag=wx.BOTTOM, border=5)
self.okButton.Bind(wx.EVT_BUTTON, lambda e: self.Close())
class LogWindow(wx.Frame):
def __init__(self, logText):
- super(LogWindow, self).__init__(None, title="Error log")
+ super(LogWindow, self).__init__(None, title=_("Error log"))
self.textBox = wx.TextCtrl(self, -1, logText, style=wx.TE_MULTILINE | wx.TE_DONTWRAP | wx.TE_READONLY)
self.SetSize((500, 400))
self.Show(True)
if ignored_types:
ignored_types = ignored_types.keys()
ignored_types.sort()
- self.notification.message("ignored: " + " ".join("*" + type for type in ignored_types))
+ self.notification.message(_("ignored: ") + " ".join("*" + type for type in ignored_types))
mainWindow.updateProfileToAllControls()
# now process all the scene files
if scene_filenames:
if len(removableStorage.getPossibleSDcardDrives()) > 0 and (connectionGroup is None or connectionGroup.getPriority() < 0):
drives = removableStorage.getPossibleSDcardDrives()
if len(drives) > 1:
- dlg = wx.SingleChoiceDialog(self, "Select SD drive", "Multiple removable drives have been found,\nplease select your SD card drive", map(lambda n: n[0], drives))
+ dlg = wx.SingleChoiceDialog(self, _("Select SD drive"), _("Multiple removable drives have been found,\nplease select your SD card drive"), map(lambda n: n[0], drives))
if dlg.ShowModal() != wx.ID_OK:
dlg.Destroy()
return
if len(connections) < 2:
connection = connections[0]
else:
- dlg = wx.SingleChoiceDialog(self, "Select the %s connection to use" % (connectionGroup.getName()), "Multiple %s connections found" % (connectionGroup.getName()), map(lambda n: n.getName(), connections))
+ dlg = wx.SingleChoiceDialog(self, _("Select the %s connection to use") % (connectionGroup.getName()), _("Multiple %s connections found") % (connectionGroup.getName()), map(lambda n: n.getName(), connections))
if dlg.ShowModal() != wx.ID_OK:
dlg.Destroy()
return
connection.window.Raise()
if not connection.loadGCodeData(self._engine.getResult().getGCode()):
if connection.isPrinting():
- self.notification.message("Cannot start print, because other print still running.")
+ self.notification.message(_("Cannot start print, because other print still running."))
else:
- self.notification.message("Failed to start print...")
+ self.notification.message(_("Failed to start print..."))
def showSaveGCode(self):
if len(self._scene._objectList) < 1:
except:
import sys, traceback
traceback.print_exc()
- self.notification.message("Failed to save")
+ self.notification.message(_("Failed to save"))
else:
if ejectDrive:
- self.notification.message("Saved as %s" % (targetFilename), lambda : self._doEjectSD(ejectDrive), 31, 'Eject')
+ self.notification.message(_("Saved as %s") % (targetFilename), lambda : self._doEjectSD(ejectDrive), 31, 'Eject')
elif explorer.hasExplorer():
- self.notification.message("Saved as %s" % (targetFilename), lambda : explorer.openExplorer(targetFilename), 4, 'Open folder')
+ self.notification.message(_("Saved as %s") % (targetFilename), lambda : explorer.openExplorer(targetFilename), 4, _('Open folder'))
else:
- self.notification.message("Saved as %s" % (targetFilename))
+ self.notification.message(_("Saved as %s") % (targetFilename))
self.printButton.setProgressBar(None)
def _doEjectSD(self, drive):
if removableStorage.ejectDrive(drive):
- self.notification.message('You can now eject the card.')
+ self.notification.message(_('You can now eject the card.'))
else:
- self.notification.message('Safe remove failed...')
+ self.notification.message(_('Safe remove failed...'))
def _showEngineLog(self):
dlg = wx.TextEntryDialog(self, _("The slicing engine reported the following"), _("Engine log..."), '\n'.join(self._engine.getResult().getLog()), wx.TE_MULTILINE | wx.OK | wx.CENTRE)
if n > cnt:
break
if n <= cnt:
- self.notification.message("Could not create more than %d items" % (n - 1))
+ self.notification.message(_("Could not create more than %d items") % (n - 1))
+ self.notification.message(_("Could not create more than %d items") % (n - 1))
self._scene.remove(newObj)
self._scene.centerAll()
self.sceneUpdated()
self._scene.centerAll()
self._selectObject(obj)
if obj.getScale()[0] < 1.0:
- self.notification.message("Warning: Object scaled down.")
+ self.notification.message(_("Warning: Object scaled down."))
self.sceneUpdated()
def _deleteObject(self, obj):
#TODO: Remove this or put it in a seperate file
class shaderEditor(wx.Frame):
def __init__(self, parent, callback, v, f):
- super(shaderEditor, self).__init__(parent, title="Shader editor", style=wx.DEFAULT_DIALOG_STYLE|wx.RESIZE_BORDER)
+ super(shaderEditor, self).__init__(parent, title=_("Shader editor"), style=wx.DEFAULT_DIALOG_STYLE|wx.RESIZE_BORDER)
self._callback = callback
s = wx.BoxSizer(wx.VERTICAL)
self.SetSizer(s)
printMaterialPanel = wx.Panel(self)
if profile.getMachineSetting('machine_type') == 'lulzbot_mini' or profile.getMachineSetting('machine_type') == 'lulzbot_TAZ':
- self.printMaterialHIPS = wx.RadioButton(printMaterialPanel, -1, 'HIPS', style=wx.RB_GROUP)
- self.printMaterialABS = wx.RadioButton(printMaterialPanel, -1, 'ABS')
+ self.printMaterialHIPS = wx.RadioButton(printMaterialPanel, -1, _('HIPS'), style=wx.RB_GROUP)
+ self.printMaterialABS = wx.RadioButton(printMaterialPanel, -1, _('ABS'))
else:
- self.printMaterialABS = wx.RadioButton(printMaterialPanel, -1, 'ABS', style=wx.RB_GROUP)
- self.printMaterialPLA = wx.RadioButton(printMaterialPanel, -1, 'PLA')
+ self.printMaterialABS = wx.RadioButton(printMaterialPanel, -1, _('ABS'), style=wx.RB_GROUP)
+ self.printMaterialPLA = wx.RadioButton(printMaterialPanel, -1, _('PLA'))
if profile.getMachineSetting('gcode_flavor') == 'UltiGCode':
printMaterialPanel.Show(False)
self.depthInput = wx.TextCtrl(p, -1, str(h * 0.3))
s.Add(self.depthInput, pos=(3, 1), flag=wx.LEFT|wx.TOP|wx.RIGHT|wx.EXPAND, border=5)
- options = ['Darker is higher', 'Lighter is higher']
+ options = [_('Darker is higher'), _('Lighter is higher')]
self.invertInput = wx.ComboBox(p, -1, options[0], choices=options, style=wx.CB_DROPDOWN|wx.CB_READONLY)
s.Add(self.invertInput, pos=(4, 1), flag=wx.LEFT|wx.TOP|wx.RIGHT|wx.EXPAND, border=5)
self.invertInput.SetSelection(0)
- options = ['No smoothing', 'Light smoothing', 'Heavy smoothing']
+ options = [_('No smoothing'), _('Light smoothing'), _('Heavy smoothing')]
self.smoothInput = wx.ComboBox(p, -1, options[0], choices=options, style=wx.CB_DROPDOWN|wx.CB_READONLY)
s.Add(self.smoothInput, pos=(5, 1), flag=wx.LEFT|wx.TOP|wx.RIGHT|wx.EXPAND, border=5)
self.smoothInput.SetSelection(0)
class minecraftImportWindow(wx.Frame):
def __init__(self, parent):
- super(minecraftImportWindow, self).__init__(parent, title='Cura - Minecraft import')
+ super(minecraftImportWindow, self).__init__(parent, title=_('Cura - Minecraft import'))
saveFileList = map(os.path.basename, glob.glob(mclevel.saveFileDir + "/*"))
self.previewPanel.SetMinSize((512, 512))
sizer.Add(self.previewPanel, (0,2), flag=wx.EXPAND)
- self.importButton = wx.Button(self.panel, -1, 'Import')
+ self.importButton = wx.Button(self.panel, -1, _('Import'))
sizer.Add(self.importButton, (1,2))
sizer.AddGrowableRow(1)
class debuggerWindow(wx.Frame):
def __init__(self, parent):
- super(debuggerWindow, self).__init__(parent, title='Cura - PID Debugger')
+ super(debuggerWindow, self).__init__(parent, title=_('Cura - PID Debugger'))
self.machineCom = None
self.machineCom = machineCom.MachineCom(callbackObject=self)
for n in xrange(0, 10):
tempAvg += self.points[-n-1][1]
heaterAvg += self.points[-n-1][2]
- dc.DrawText("Temp: %d Heater: %d" % (tempAvg / 10, heaterAvg * 100 / 255 / 10), 0, 0)
+ dc.DrawText(_("Temp: %d Heater: %d") % (tempAvg / 10, heaterAvg * 100 / 255 / 10), 0, 0)
#Draw the main lines
self._drawLine(dc, '#404040', lambda p: p[6])#target
class workingIndicatorWindow(wx.Frame):
def __init__(self, parent):
- super(workingIndicatorWindow, self).__init__(parent, title='YouMagine', style=wx.FRAME_TOOL_WINDOW|wx.FRAME_FLOAT_ON_PARENT|wx.FRAME_NO_TASKBAR|wx.CAPTION)
+ super(workingIndicatorWindow, self).__init__(parent, title=_('YouMagine'), style=wx.FRAME_TOOL_WINDOW|wx.FRAME_FLOAT_ON_PARENT|wx.FRAME_NO_TASKBAR|wx.CAPTION)
self._panel = wx.Panel(self)
self.SetSizer(wx.BoxSizer())
self.GetSizer().Add(self._panel, 1, wx.EXPAND)
class getAuthorizationWindow(wx.Frame):
def __init__(self, parent, ym):
- super(getAuthorizationWindow, self).__init__(parent, title='YouMagine')
+ super(getAuthorizationWindow, self).__init__(parent, title=_('YouMagine'))
self._panel = wx.Panel(self)
self.SetSizer(wx.BoxSizer())
self.GetSizer().Add(self._panel, 1, wx.EXPAND)
class newDesignWindow(wx.Frame):
def __init__(self, parent, manager, ym):
- super(newDesignWindow, self).__init__(parent, title='Share on YouMagine')
+ super(newDesignWindow, self).__init__(parent, title=_('Share on YouMagine'))
p = wx.Panel(self)
self.SetSizer(wx.BoxSizer())
self.GetSizer().Add(p, 1, wx.EXPAND)
class webcamPhotoWindow(wx.Frame):
def __init__(self, parent):
- super(webcamPhotoWindow, self).__init__(parent, title='YouMagine')
+ super(webcamPhotoWindow, self).__init__(parent, title=_('YouMagine'))
p = wx.Panel(self)
self.panel = p
self.SetSizer(wx.BoxSizer())