From: Youness Alaoui Date: Wed, 14 Jan 2015 17:01:47 +0000 (-0500) Subject: Add more missing translations X-Git-Tag: lulzbot-14.12~66 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=c337911c343d01dfdafd4ace070d0fbeb9d710a8;p=cura.git Add more missing translations --- diff --git a/Cura/gui/aboutWindow.py b/Cura/gui/aboutWindow.py index 3fa6b0ca..7888f5f6 100644 --- a/Cura/gui/aboutWindow.py +++ b/Cura/gui/aboutWindow.py @@ -5,7 +5,7 @@ import platform 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) diff --git a/Cura/gui/configWizard.py b/Cura/gui/configWizard.py index c8812dc2..b4722540 100644 --- a/Cura/gui/configWizard.py +++ b/Cura/gui/configWizard.py @@ -518,7 +518,7 @@ class UltimakerFirmwareUpgradePage(InfoPage): 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() @@ -1226,7 +1226,7 @@ class bedLevelWizardMain(InfoPage): 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() diff --git a/Cura/gui/firmwareInstall.py b/Cura/gui/firmwareInstall.py index f38f7b8c..e97336eb 100644 --- a/Cura/gui/firmwareInstall.py +++ b/Cura/gui/firmwareInstall.py @@ -52,7 +52,7 @@ def getDefaultFirmware(machineIndex = None): 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: @@ -164,7 +164,7 @@ class InstallFirmware(wx.Dialog): 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') diff --git a/Cura/gui/mainWindow.py b/Cura/gui/mainWindow.py index e7c0a371..ff569bda 100644 --- a/Cura/gui/mainWindow.py +++ b/Cura/gui/mainWindow.py @@ -27,7 +27,7 @@ from Cura.util import meshLoader 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) @@ -295,7 +295,7 @@ class mainWindow(wx.Frame): 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" @@ -627,11 +627,11 @@ class normalSettingsPanel(configBase.configPanelBase): 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) @@ -644,7 +644,7 @@ class normalSettingsPanel(configBase.configPanelBase): 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) diff --git a/Cura/gui/preferencesDialog.py b/Cura/gui/preferencesDialog.py index 82623523..35e36558 100644 --- a/Cura/gui/preferencesDialog.py +++ b/Cura/gui/preferencesDialog.py @@ -52,7 +52,7 @@ class preferencesDialog(wx.Dialog): 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()) diff --git a/Cura/gui/printWindow.py b/Cura/gui/printWindow.py index 35be4a83..199dfc4b 100644 --- a/Cura/gui/printWindow.py +++ b/Cura/gui/printWindow.py @@ -647,7 +647,7 @@ class TemperatureGraph(wx.Panel): 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) diff --git a/Cura/gui/sceneView.py b/Cura/gui/sceneView.py index a28dd189..b46b4c54 100644 --- a/Cura/gui/sceneView.py +++ b/Cura/gui/sceneView.py @@ -181,7 +181,7 @@ class SceneView(openglGui.glGuiPanel): 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: @@ -245,7 +245,7 @@ class SceneView(openglGui.glGuiPanel): 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 @@ -260,7 +260,7 @@ class SceneView(openglGui.glGuiPanel): 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 @@ -296,9 +296,9 @@ class SceneView(openglGui.glGuiPanel): 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: @@ -332,21 +332,21 @@ class SceneView(openglGui.glGuiPanel): 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) @@ -507,7 +507,8 @@ class SceneView(openglGui.glGuiPanel): 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() @@ -608,7 +609,7 @@ class SceneView(openglGui.glGuiPanel): 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): @@ -1416,7 +1417,7 @@ class SceneView(openglGui.glGuiPanel): #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) diff --git a/Cura/gui/simpleMode.py b/Cura/gui/simpleMode.py index faf0c92c..7e529082 100644 --- a/Cura/gui/simpleMode.py +++ b/Cura/gui/simpleMode.py @@ -24,11 +24,11 @@ class simpleModePanel(wx.Panel): 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) diff --git a/Cura/gui/tools/imageToMesh.py b/Cura/gui/tools/imageToMesh.py index 04d18303..2863a1ca 100644 --- a/Cura/gui/tools/imageToMesh.py +++ b/Cura/gui/tools/imageToMesh.py @@ -41,12 +41,12 @@ class convertImageDialog(wx.Dialog): 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) diff --git a/Cura/gui/tools/minecraftImport.py b/Cura/gui/tools/minecraftImport.py index e5079996..ee6fa553 100644 --- a/Cura/gui/tools/minecraftImport.py +++ b/Cura/gui/tools/minecraftImport.py @@ -18,7 +18,7 @@ def hasMinecraft(): 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 + "/*")) @@ -37,7 +37,7 @@ class minecraftImportWindow(wx.Frame): 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) diff --git a/Cura/gui/tools/pidDebugger.py b/Cura/gui/tools/pidDebugger.py index ee88d9b2..02899899 100644 --- a/Cura/gui/tools/pidDebugger.py +++ b/Cura/gui/tools/pidDebugger.py @@ -7,7 +7,7 @@ from Cura.util import machineCom 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) @@ -199,7 +199,7 @@ class temperatureGraph(wx.Panel): 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 diff --git a/Cura/gui/tools/youmagineGui.py b/Cura/gui/tools/youmagineGui.py index fd36e5d7..e63ccdb5 100644 --- a/Cura/gui/tools/youmagineGui.py +++ b/Cura/gui/tools/youmagineGui.py @@ -167,7 +167,7 @@ class youmagineManager(object): 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) @@ -220,7 +220,7 @@ class workingIndicatorWindow(wx.Frame): 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) @@ -262,7 +262,7 @@ class getAuthorizationWindow(wx.Frame): 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) @@ -415,7 +415,7 @@ class newDesignWindow(wx.Frame): 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())