chiark / gitweb /
Add more missing translations
authorYouness Alaoui <kakaroto@kakaroto.homelinux.net>
Wed, 14 Jan 2015 17:01:47 +0000 (12:01 -0500)
committerYouness Alaoui <kakaroto@kakaroto.homelinux.net>
Wed, 14 Jan 2015 17:05:45 +0000 (12:05 -0500)
12 files changed:
Cura/gui/aboutWindow.py
Cura/gui/configWizard.py
Cura/gui/firmwareInstall.py
Cura/gui/mainWindow.py
Cura/gui/preferencesDialog.py
Cura/gui/printWindow.py
Cura/gui/sceneView.py
Cura/gui/simpleMode.py
Cura/gui/tools/imageToMesh.py
Cura/gui/tools/minecraftImport.py
Cura/gui/tools/pidDebugger.py
Cura/gui/tools/youmagineGui.py

index 3fa6b0cab89547a5968f147bc73849c72e127c1e..7888f5f6f81eb1dd3f389cc1dde7f91fb5b44f74 100644 (file)
@@ -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)
 
index c8812dc2603e72c95c649c8416a8cec217d391ed..b4722540076400413669a8fe33bc9b455c98cc27 100644 (file)
@@ -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()
index f38f7b8c8c3e91cda6b30105e352942da81aa9e7..e97336ebc0e72d499660fa5ceade12776dacffd7 100644 (file)
@@ -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')
 
index e7c0a371e407ad8bfd809150702d2f074d5e6a42..ff569bda9735e97feac948277f65d2a3a5204f51 100644 (file)
@@ -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)
 
index 8262352371ce92afb409fa94dda9c8eac71dc119..35e365581e2fb6113684eb9e0616020073f1d531 100644 (file)
@@ -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())
 
index 35be4a8385f1be33c478b6cce3361ecf760f86e3..199dfc4b377760b0acb5262abc2f741cb1eacc04 100644 (file)
@@ -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)
index a28dd1894089158c734ed29e01ae89dfb5a0211c..b46b4c54c72ff3b4742cb828ac3dd7ef9db3bb55 100644 (file)
@@ -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)
index faf0c92c3b5821bda0a55673aa215a5bc71b007c..7e529082f37ad8ece434451022ced2e8870f31b5 100644 (file)
@@ -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)
                
index 04d18303c7266589ef99706e995e6c11397e9b81..2863a1cac11982d37c183e230cee5765330283eb 100644 (file)
@@ -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)
index e50799960886dee16de6a3b4c6eb00bd7684b7c8..ee6fa5531166f83a4e9386a0bb8a3ab7226b12ed 100644 (file)
@@ -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)
index ee88d9b24d29db646acded07d2fba10e22637d77..02899899b11f237b0ca5ee4da39ad7532c2942b5 100644 (file)
@@ -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
index fd36e5d74406d10eea98ee150c43b63de4306e57..e63ccdb5a66d9723251df5d92a7b9777e3f577b2 100644 (file)
@@ -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())