Merge branch 'master' of github.com:kliment/Printrun

Conflicts:
	pronterface.py
master
Kliment 2011-08-11 15:04:26 +02:00
commit 291aac90e5
10 changed files with 2450 additions and 159 deletions

43
README.i18n Normal file
View File

@ -0,0 +1,43 @@
Printrun Internationalization
Date: 06 August 2011
Author: Jonathan Marsden <jmarsden@.fastmail.fm>
Printrun is in the very early stages of being internationalized.
The pronterface.py now uses gettext for the messages it generates.
The corresponding pronterface.pot file is at locale/pronterface.pot
and was generated using
pygettext -o locale/pronterface.pot pronterface.py
followed by minor edits to the generated header.
This template is the basis for all pronterface mesage catalogs. Right
now there is only one, for German. New ones can be created:
# Create new pronterface message catalog for a different language
newlang="es" # use the correct code for your language
mkdir -p locale/${newlang}/LC_MESSAGES
cp locale/pronterface.pot locale/${newlanguage}/LC_MESSAGES/${newlang}.po
cd locale/${newlanguage}/LC_MESSAGES/${newlang}
# Edit the .po file to add messages for newlang
msgfmt -o ${newlang}.mo ${newlang}.po
As currently coded, the default location for these message catalogs is
/usr/share/pronterface/locale/
So, to install the catalogs, copy them to there:
sudo cp -a locale /usr/share/pronterface/
To test pronterface in a new language, you can temporarily set LANG to
the language you are testing, for example
LANG=de python pronterface.py
Further automation for localization and packaging of Printrun would be
nice to see, but is not here yet.

25
gviz.py
View File

@ -1,9 +1,9 @@
import wx,time
class window(wx.Frame):
def __init__(self,f,size=(600,600),bedsize=(200,200)):
def __init__(self,f,size=(600,600),bedsize=(200,200),grid=(10,50),extrusion_width=0.5):
wx.Frame.__init__(self,None,title="Layer view (Use shift+mousewheel to switch layers)",size=(size[0],size[1]))
self.p=gviz(self,size=size,bedsize=bedsize)
self.p=gviz(self,size=size,bedsize=bedsize,grid=grid,extrusion_width=extrusion_width)
s=time.time()
for i in f:
self.p.addgcode(i)
@ -53,10 +53,11 @@ class window(wx.Frame):
elif z < 0: self.p.zoom(event.GetX(),event.GetY(),1/1.2)
class gviz(wx.Panel):
def __init__(self,parent,size=(200,200),bedsize=(200,200)):
def __init__(self,parent,size=(200,200),bedsize=(200,200),grid=(10,50),extrusion_width=0.5):
wx.Panel.__init__(self,parent,-1,size=(size[0],size[1]))
self.size=size
self.bedsize=bedsize
self.grid=grid
self.lastpos=[0,0,0,0,0]
self.hilightpos=self.lastpos[:]
self.Bind(wx.EVT_PAINT,self.paint)
@ -65,7 +66,7 @@ class gviz(wx.Panel):
self.pens={}
self.layers=[]
self.layerindex=0
self.filament_width=0.5 # set it to 0 to disable scaling lines with zoom
self.filament_width=extrusion_width # set it to 0 to disable scaling lines with zoom
self.scale=[min(float(size[0])/bedsize[0],float(size[1])/bedsize[1])]*2
penwidth = max(1.0,self.filament_width*((self.scale[0]+self.scale[1])/2.0))
self.translate=[0.0,0.0]
@ -126,14 +127,14 @@ class gviz(wx.Panel):
dc.SelectObject(self.blitmap)
dc.SetBackground(wx.Brush((250,250,200)))
dc.Clear()
dc.SetPen(wx.Pen(wx.Colour(100,100,100)))
for i in xrange(max(self.bedsize)/10):
dc.DrawLine(self.translate[0],self.translate[1]+i*self.scale[1]*10,self.translate[0]+self.scale[0]*max(self.bedsize),self.translate[1]+i*self.scale[1]*10)
dc.DrawLine(self.translate[0]+i*self.scale[0]*10,self.translate[1],self.translate[0]+i*self.scale[0]*10,self.translate[1]+self.scale[1]*max(self.bedsize))
dc.SetPen(wx.Pen(wx.Colour(0,0,0)))
for i in xrange(max(self.bedsize)/50):
dc.DrawLine(self.translate[0],self.translate[1]+i*self.scale[1]*50,self.translate[0]+self.scale[0]*max(self.bedsize),self.translate[1]+i*self.scale[1]*50)
dc.DrawLine(self.translate[0]+i*self.scale[0]*50,self.translate[1],self.translate[0]+i*self.scale[0]*50,self.translate[1]+self.scale[1]*max(self.bedsize))
dc.SetPen(wx.Pen(wx.Colour(180,180,150)))
for grid_unit in self.grid:
if grid_unit > 0:
for x in xrange(int(self.bedsize[0]/grid_unit)+1):
dc.DrawLine(self.translate[0]+x*self.scale[0]*grid_unit,self.translate[1],self.translate[0]+x*self.scale[0]*grid_unit,self.translate[1]+self.scale[1]*self.bedsize[1])
for y in xrange(int(self.bedsize[1]/grid_unit)+1):
dc.DrawLine(self.translate[0],self.translate[1]+y*self.scale[1]*grid_unit,self.translate[0]+self.scale[0]*self.bedsize[0],self.translate[1]+y*self.scale[1]*grid_unit)
dc.SetPen(wx.Pen(wx.Colour(0,0,0)))
if not self.showall:
self.size = self.GetSize()
dc.SetBrush(wx.Brush((43,144,255)))

554
locale/de/LC_MESSAGES/de.po Normal file
View File

@ -0,0 +1,554 @@
# Pronterface
# Copyright (C) 2011 Jonathan Marsden
# Jonathan Marsden <jmarsden@fastmail.fm>, 2011.
#
msgid ""
msgstr ""
"Project-Id-Version: Pronterface jm1\n"
"POT-Creation-Date: 2011-08-06 13:27+PDT\n"
"PO-Revision-Date: 2011-08-06 13:27+PDT\n"
"Last-Translator: Jonathan Marsden <jmarsden@fastmail.fm>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: UTF-8\n"
"Generated-By: pygettext.py 1.5\n"
#: pronterface.py:10
msgid "WX is not installed. This program requires WX to run."
msgstr "WX ist nicht installiert. Dieses Programm erfordert WX zu laufen."
#: pronterface.py:55
msgid "Printer Interface"
msgstr "Druckerschnittstelle"
#: pronterface.py:67
msgid "X+100"
msgstr ""
#: pronterface.py:68
msgid "X+10"
msgstr ""
#: pronterface.py:69
msgid "X+1"
msgstr ""
#: pronterface.py:70
msgid "X+0.1"
msgstr ""
#: pronterface.py:71
msgid "HomeX"
msgstr "XHeimkehren"
#: pronterface.py:72
msgid "X-0.1"
msgstr ""
#: pronterface.py:73
msgid "X-1"
msgstr ""
#: pronterface.py:74
msgid "X-10"
msgstr ""
#: pronterface.py:75
msgid "X-100"
msgstr ""
#: pronterface.py:76
msgid "Y+100"
msgstr ""
#: pronterface.py:77
msgid "Y+10"
msgstr ""
#: pronterface.py:78
msgid "Y+1"
msgstr ""
#: pronterface.py:79
msgid "Y+0.1"
msgstr ""
#: pronterface.py:80
msgid "HomeY"
msgstr "YHeimkehren"
#: pronterface.py:81
msgid "Y-0.1"
msgstr ""
#: pronterface.py:82
msgid "Y-1"
msgstr ""
#: pronterface.py:83
msgid "Y-10"
msgstr ""
#: pronterface.py:84
msgid "Y-100"
msgstr ""
#: pronterface.py:85
msgid "Motors off"
msgstr "Motoren aus"
#: pronterface.py:86
msgid "Z+10"
msgstr ""
#: pronterface.py:87
msgid "Z+1"
msgstr ""
#: pronterface.py:88
msgid "Z+0.1"
msgstr ""
#: pronterface.py:89
msgid "HomeZ"
msgstr "ZHeimkehren"
#: pronterface.py:90
msgid "Z-0.1"
msgstr ""
#: pronterface.py:91
msgid "Z-1"
msgstr ""
#: pronterface.py:92
msgid "Z-10"
msgstr ""
#: pronterface.py:93
msgid "Home"
msgstr "Heimkehren"
#: pronterface.py:94
msgid "Check temp"
msgstr "Temperatur prüfen"
#: pronterface.py:95
msgid "Extrude"
msgstr ""
#: pronterface.py:96
msgid "Reverse"
msgstr "Umkehren"
#: pronterface.py:112
msgid ""
"# I moved all your custom buttons into .pronsolerc.\n"
"# Please don't add them here any more.\n"
"# Backup of your old buttons is in custombtn.old\n"
msgstr ""
#: pronterface.py:117
msgid "Note!!! You have specified custom buttons in both custombtn.txt and .pronsolerc"
msgstr "Beachten! Sie haben benutzerdefinierte Schaltflächen in custombtn.txt und .pronsolerc angegeben"
#: pronterface.py:118
msgid "Ignoring custombtn.txt. Remove all current buttons to revert to custombtn.txt"
msgstr "Ignorieren custombtn.txt. Zur Nutzung custombtn.txt wieder entfernen alle gängigen Tasten"
#: pronterface.py:141 pronterface.py:427 pronterface.py:956
#: pronterface.py:1003 pronterface.py:1113 pronterface.py:1140
#: pronterface.py:1154
msgid "Print"
msgstr "Drucken"
#: pronterface.py:145
msgid "Printer is now online"
msgstr "Drucker wird jetzt online"
#: pronterface.py:194
msgid "Setting hotend temperature to "
msgstr "Einstellen hotend Temperatur auf "
#: pronterface.py:194 pronterface.py:215
msgid " degrees Celsius."
msgstr " Grad Celsius."
#: pronterface.py:198 pronterface.py:219
msgid "Printer is not online."
msgstr "Drucker wird nicht online."
#: pronterface.py:200
msgid "You cannot set negative temperatures. To turn the hotend off entirely, set its temperature to 0."
msgstr "Sie können keine negativen Temperaturen einstellen. Um den hotend ganz auszushalten, einstellen Sie die Temperatur auf 0"
#: pronterface.py:202 pronterface.py:223
msgid "You must enter a temperature."
msgstr "Sie müssen eine Temperatur eingeben."
#: pronterface.py:215
msgid "Setting bed temperature to "
msgstr "Bett-Temperatur eingestellt: "
#: pronterface.py:221
msgid "You cannot set negative temperatures. To turn the bed off entirely, set its temperature to 0."
msgstr "Sie können keine negativen Temperaturen einstellen. Um den Bett ganz auszushalten, einstellen Sie die Temperatur auf 0"
#: pronterface.py:238
msgid "Do you want to erase the macro?"
msgstr "Möchten Sie das Makro löschen?"
#: pronterface.py:242
msgid "Cancelled."
msgstr "Abgesagt."
#: pronterface.py:271
msgid " Opens file"
msgstr " Öffnet eine Datei"
#: pronterface.py:271
msgid "&Open..."
msgstr "&Öffnen..."
#: pronterface.py:272
msgid " Edit open file"
msgstr " Datei bearbeiten"
#: pronterface.py:272
msgid "&Edit..."
msgstr "&Bearbeiten..."
#: pronterface.py:274
msgid " Adjust SFACT settings"
msgstr " SFACT Einstellungen anpassen"
#: pronterface.py:274
msgid "SFACT Settings"
msgstr "SFACT Einstellungen"
#: pronterface.py:277
msgid " Quickly adjust SFACT settings for active profile"
msgstr " SFACT Einstellungen für aktive Profil schnell anpassen"
#: pronterface.py:277
msgid "SFACT Quick Settings"
msgstr "SFACT schnelle Einstellungen"
#: pronterface.py:281
msgid " Closes the Window"
msgstr " schließt das Fenster"
#: pronterface.py:281
msgid "E&xit"
msgstr "Verlassen"
#: pronterface.py:282
msgid "&Print"
msgstr "&Drucken"
#: pronterface.py:285
msgid "&Macros"
msgstr "&Makros"
#: pronterface.py:286
msgid "<&New...>"
msgstr "<&Neu...>"
#: pronterface.py:287
msgid " Options dialog"
msgstr " Optionen-Dialog"
#: pronterface.py:287
msgid "&Options"
msgstr "&Optionen"
#: pronterface.py:288
msgid "&Settings"
msgstr "&Einstellungen"
#: pronterface.py:304
msgid "Enter macro name"
msgstr "Makro name eingeben"
#: pronterface.py:307
msgid "Macro name:"
msgstr "Makro name:"
#: pronterface.py:310
msgid "Ok"
msgstr ""
#: pronterface.py:314
msgid "Cancel"
msgstr "Absagen"
#: pronterface.py:332
msgid "' is being used by built-in command"
msgstr ""
#: pronterface.py:332
msgid "Name '"
msgstr ""
#: pronterface.py:368
msgid "Port:"
msgstr ""
#: pronterface.py:390
msgid "Connect"
msgstr "Verbinden"
#: pronterface.py:392
msgid "Connect to the printer"
msgstr "Drucker Verbinden"
#: pronterface.py:394
msgid "Disconnect"
msgstr "Trennen"
#: pronterface.py:398
msgid "Reset"
msgstr "Zurücksetzen"
#: pronterface.py:401 pronterface.py:579
msgid "Mini mode"
msgstr "Mini-Modus"
#: pronterface.py:407
msgid "Monitor\nprinter"
msgstr "Drucker\nüberwachen"
#: pronterface.py:416
msgid "Load file"
msgstr "Datei laden"
#: pronterface.py:419
msgid "SD Upload"
msgstr "SD hochladen"
#: pronterface.py:423
msgid "SD Print"
msgstr "SD Drucken"
#: pronterface.py:431 pronterface.py:1004 pronterface.py:1040
#: pronterface.py:1088 pronterface.py:1112 pronterface.py:1139
#: pronterface.py:1153
msgid "Pause"
msgstr ""
#: pronterface.py:445
msgid "Send"
msgstr "Senden"
#: pronterface.py:453 pronterface.py:511
msgid "mm/min"
msgstr ""
#: pronterface.py:455
msgid "XY:"
msgstr ""
#: pronterface.py:457
msgid "Z:"
msgstr ""
#: pronterface.py:474
msgid "Heater:"
msgstr "Heizung:"
#: pronterface.py:482 pronterface.py:494
msgid "Set"
msgstr ""
#: pronterface.py:486
msgid "Bed:"
msgstr "Bett"
#: pronterface.py:505
msgid "mm"
msgstr ""
#: pronterface.py:538 pronterface.py:833 pronterface.py:1034
msgid "Not connected to printer."
msgstr "Keine Verbindung zum Drucker."
#: pronterface.py:586
msgid "Full mode"
msgstr "voll-Modus"
#: pronterface.py:624
msgid "Defines custom button. Usage: button <num> \"title\" [/c \"colour\"] command"
msgstr ""
#: pronterface.py:646
msgid "Custom button number should be between 0 and 63"
msgstr ""
#: pronterface.py:736
msgid "Edit custom button '%s'"
msgstr ""
#: pronterface.py:738
msgid "Move left <<"
msgstr ""
#: pronterface.py:741
msgid "Move right >>"
msgstr ""
#: pronterface.py:745
msgid "Remove custom button '%s'"
msgstr ""
#: pronterface.py:748
msgid "Add custom button"
msgstr ""
#: pronterface.py:763
msgid "event object missing"
msgstr ""
#: pronterface.py:791
msgid "Invalid period given."
msgstr ""
#: pronterface.py:794
msgid "Monitoring printer."
msgstr ""
#: pronterface.py:796
msgid "Done monitoring."
msgstr ""
#: pronterface.py:815
msgid "Printer is online. "
msgstr ""
#: pronterface.py:817 pronterface.py:954 pronterface.py:1002
msgid "Loaded "
msgstr ""
#: pronterface.py:820
msgid "Bed"
msgstr "Bett"
#: pronterface.py:820
msgid "Hotend"
msgstr ""
#: pronterface.py:823
msgid " SD printing:%04.2f %%"
msgstr ""
#: pronterface.py:825
msgid " Printing:%04.2f %%"
msgstr ""
#: pronterface.py:879
msgid "Opening file failed."
msgstr ""
#: pronterface.py:885
msgid "Starting print"
msgstr ""
#: pronterface.py:908
msgid "Pick SD file"
msgstr ""
#: pronterface.py:908
msgid "Select the file to print"
msgstr ""
#: pronterface.py:936
msgid "Skeinforge execution failed."
msgstr ""
#: pronterface.py:943
msgid "Skeining..."
msgstr ""
#: pronterface.py:954 pronterface.py:1002
msgid ", %d lines"
msgstr ""
#: pronterface.py:963
msgid "Skeining "
msgstr ""
#: pronterface.py:965
msgid ""
"Skeinforge not found. \n"
"Please copy Skeinforge into a directory named \"skeinforge\" in the same directory as this file."
msgstr ""
#: pronterface.py:984
msgid "Open file to print"
msgstr "Zu druckenden Datei öffnen"
#: pronterface.py:985
msgid "STL and GCODE files (;*.gcode;*.g;*.stl;*.STL;)"
msgstr ""
#: pronterface.py:992
msgid "File not found!"
msgstr ""
#: pronterface.py:1011
msgid "mm of filament used in this print"
msgstr ""
#: pronterface.py:1031
msgid "No file loaded. Please use load first."
msgstr ""
#: pronterface.py:1042
msgid "Restart"
msgstr "Neustart"
#: pronterface.py:1046
msgid "File upload complete"
msgstr ""
#: pronterface.py:1065
msgid "Pick SD filename"
msgstr ""
#: pronterface.py:1081
msgid "Resume"
msgstr ""
#: pronterface.py:1147
msgid "Are you sure you want to reset the printer?"
msgstr "Möchten Sie wirklich, der Drucker Zurückzusetzen?"
#: pronterface.py:1147
msgid "Reset?"
msgstr "Zurücksetzen?"
#: pronterface.py:1226
msgid "Edit settings"
msgstr "Einstellungen bearbeiten"
#: pronterface.py:1228
msgid "Defaults"
msgstr "Standardwerte"
#: pronterface.py:1250
msgid "Custom button"
msgstr ""
#: pronterface.py:1258
msgid "Button title"
msgstr ""
#: pronterface.py:1261
msgid "Command"
msgstr ""
#: pronterface.py:1270
msgid "Color"
msgstr "Farbe"

Binary file not shown.

554
locale/fr/LC_MESSAGES/fr.po Normal file
View File

@ -0,0 +1,554 @@
# Pronterface Message Catalog Template
# Copyright (C) 2011 Jonathan Marsden
# Jonathan Marsden <jmarsden@fastmail.fm>, 2011.
#
msgid ""
msgstr ""
"Project-Id-Version: Pronterface jm1\n"
"POT-Creation-Date: 2011-08-06 13:27+PDT\n"
"PO-Revision-Date: 2011-08-06 13:27+PDT\n"
"Last-Translator: Jonathan Marsden <jmarsden@fastmail.fm>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: UTF-8\n"
"Generated-By: pygettext.py 1.5\n"
#: pronterface.py:10
msgid "WX is not installed. This program requires WX to run."
msgstr "WX n'est pas installé. Ce programme demande WX à courir."
#: pronterface.py:55
msgid "Printer Interface"
msgstr "Interface imprimante"
#: pronterface.py:67
msgid "X+100"
msgstr ""
#: pronterface.py:68
msgid "X+10"
msgstr ""
#: pronterface.py:69
msgid "X+1"
msgstr ""
#: pronterface.py:70
msgid "X+0.1"
msgstr ""
#: pronterface.py:71
msgid "HomeX"
msgstr "Origine X"
#: pronterface.py:72
msgid "X-0.1"
msgstr ""
#: pronterface.py:73
msgid "X-1"
msgstr ""
#: pronterface.py:74
msgid "X-10"
msgstr ""
#: pronterface.py:75
msgid "X-100"
msgstr ""
#: pronterface.py:76
msgid "Y+100"
msgstr ""
#: pronterface.py:77
msgid "Y+10"
msgstr ""
#: pronterface.py:78
msgid "Y+1"
msgstr ""
#: pronterface.py:79
msgid "Y+0.1"
msgstr ""
#: pronterface.py:80
msgid "HomeY"
msgstr "Origine Y"
#: pronterface.py:81
msgid "Y-0.1"
msgstr ""
#: pronterface.py:82
msgid "Y-1"
msgstr ""
#: pronterface.py:83
msgid "Y-10"
msgstr ""
#: pronterface.py:84
msgid "Y-100"
msgstr ""
#: pronterface.py:85
msgid "Motors off"
msgstr "Arrêter les moteurs"
#: pronterface.py:86
msgid "Z+10"
msgstr ""
#: pronterface.py:87
msgid "Z+1"
msgstr ""
#: pronterface.py:88
msgid "Z+0.1"
msgstr ""
#: pronterface.py:89
msgid "HomeZ"
msgstr "Origine Z"
#: pronterface.py:90
msgid "Z-0.1"
msgstr ""
#: pronterface.py:91
msgid "Z-1"
msgstr ""
#: pronterface.py:92
msgid "Z-10"
msgstr ""
#: pronterface.py:93
msgid "Home"
msgstr "Origine"
#: pronterface.py:94
msgid "Check temp"
msgstr "Vérifier la température"
#: pronterface.py:95
msgid "Extrude"
msgstr "Extruder"
#: pronterface.py:96
msgid "Reverse"
msgstr "Renverser"
#: pronterface.py:112
msgid ""
"# I moved all your custom buttons into .pronsolerc.\n"
"# Please don't add them here any more.\n"
"# Backup of your old buttons is in custombtn.old\n"
msgstr ""
#: pronterface.py:117
msgid "Note!!! You have specified custom buttons in both custombtn.txt and .pronsolerc"
msgstr "Remarque! Vous avez spécifié des boutons personnalisés dans custombtn.txt et aussi dans .pronsolerc"
#: pronterface.py:118
msgid "Ignoring custombtn.txt. Remove all current buttons to revert to custombtn.txt"
msgstr "Ignorant custombtn.txt. Retirez tous les boutons en cours pour revenir à custombtn.txt"
#: pronterface.py:141 pronterface.py:427 pronterface.py:956
#: pronterface.py:1003 pronterface.py:1113 pronterface.py:1140
#: pronterface.py:1154
msgid "Print"
msgstr "Imprimer"
#: pronterface.py:145
msgid "Printer is now online"
msgstr "L'imprimante est maintenant en ligne"
#: pronterface.py:194
msgid "Setting hotend temperature to "
msgstr "Réglage de la température de l'extrémité chaude à "
#: pronterface.py:194 pronterface.py:215
msgid " degrees Celsius."
msgstr " degrés Celsius."
#: pronterface.py:198 pronterface.py:219
msgid "Printer is not online."
msgstr "L'imprimante n'est pas en ligne."
#: pronterface.py:200
msgid "You cannot set negative temperatures. To turn the hotend off entirely, set its temperature to 0."
msgstr "On ne peut pas régler les températures négatives. Pour désactiver l'extrémité chaude entièrement, mis sa température à 0."
#: pronterface.py:202 pronterface.py:223
msgid "You must enter a temperature."
msgstr "Il faut entrer une température."
#: pronterface.py:215
msgid "Setting bed temperature to "
msgstr "Réglage de la température de la base à "
#: pronterface.py:221
msgid "You cannot set negative temperatures. To turn the bed off entirely, set its temperature to 0."
msgstr "On ne peut pas régler les températures négatives. Pour désactiver la base entièrement, mis sa température à 0"
#: pronterface.py:238
msgid "Do you want to erase the macro?"
msgstr "Voulez-vous effacer la macro?"
#: pronterface.py:242
msgid "Cancelled."
msgstr "Annulé."
#: pronterface.py:271
msgid " Opens file"
msgstr " Ouvre le fichier"
#: pronterface.py:271
msgid "&Open..."
msgstr "&Ouvre..."
#: pronterface.py:272
msgid " Edit open file"
msgstr " Editer le fichier ouvert"
#: pronterface.py:272
msgid "&Edit..."
msgstr "&Editer..."
#: pronterface.py:274
msgid " Adjust SFACT settings"
msgstr " Réglez les paramètres du SFACT"
#: pronterface.py:274
msgid "SFACT Settings"
msgstr "Paramètres du &SFACT"
#: pronterface.py:277
msgid " Quickly adjust SFACT settings for active profile"
msgstr " Régler rapidement les paramètres du SFACT pour le profil actif."
#: pronterface.py:277
msgid "SFACT Quick Settings"
msgstr "SFACT réglages rapides"
#: pronterface.py:281
msgid " Closes the Window"
msgstr " Ferme la fenêtre"
#: pronterface.py:281
msgid "E&xit"
msgstr "&Quitter"
#: pronterface.py:282
msgid "&Print"
msgstr "&Imprimer"
#: pronterface.py:285
msgid "&Macros"
msgstr ""
#: pronterface.py:286
msgid "<&New...>"
msgstr "<&Nouvelles...>"
#: pronterface.py:287
msgid " Options dialog"
msgstr " Dialogue d'options"
#: pronterface.py:287
msgid "&Options"
msgstr ""
#: pronterface.py:288
msgid "&Settings"
msgstr "&Paramètres"
#: pronterface.py:304
msgid "Enter macro name"
msgstr "Entrez le nom de la macro"
#: pronterface.py:307
msgid "Macro name:"
msgstr "Nom de la macro:"
#: pronterface.py:310
msgid "Ok"
msgstr "Valider"
#: pronterface.py:314
msgid "Cancel"
msgstr "Annuler"
#: pronterface.py:332
msgid "' is being used by built-in command"
msgstr ""
#: pronterface.py:332
msgid "Name '"
msgstr "Nom '"
#: pronterface.py:368
msgid "Port:"
msgstr ""
#: pronterface.py:390
msgid "Connect"
msgstr "Rattacher"
#: pronterface.py:392
msgid "Connect to the printer"
msgstr "Rattacher au imprimant"
#: pronterface.py:394
msgid "Disconnect"
msgstr "Détacher"
#: pronterface.py:398
msgid "Reset"
msgstr "Réinitialiser"
#: pronterface.py:401 pronterface.py:579
msgid "Mini mode"
msgstr "Mode mini"
#: pronterface.py:407
msgid "Monitor\nprinter"
msgstr "Surveiller\nl'imprimante"
#: pronterface.py:416
msgid "Load file"
msgstr "Charger le fichier"
#: pronterface.py:419
msgid "SD Upload"
msgstr "Télécharger SD"
#: pronterface.py:423
msgid "SD Print"
msgstr "Imprimer SD"
#: pronterface.py:431 pronterface.py:1004 pronterface.py:1040
#: pronterface.py:1088 pronterface.py:1112 pronterface.py:1139
#: pronterface.py:1153
msgid "Pause"
msgstr "Pauser"
#: pronterface.py:445
msgid "Send"
msgstr "Envoyer"
#: pronterface.py:453 pronterface.py:511
msgid "mm/min"
msgstr ""
#: pronterface.py:455
msgid "XY:"
msgstr ""
#: pronterface.py:457
msgid "Z:"
msgstr ""
#: pronterface.py:474
msgid "Heater:"
msgstr "Chauffage:"
#: pronterface.py:482 pronterface.py:494
msgid "Set"
msgstr "Régler"
#: pronterface.py:486
msgid "Bed:"
msgstr "Base:"
#: pronterface.py:505
msgid "mm"
msgstr ""
#: pronterface.py:538 pronterface.py:833 pronterface.py:1034
msgid "Not connected to printer."
msgstr "Pas rattaché à l'imprimante"
#: pronterface.py:586
msgid "Full mode"
msgstr "Mode plein"
#: pronterface.py:624
msgid "Defines custom button. Usage: button <num> \"title\" [/c \"colour\"] command"
msgstr ""
#: pronterface.py:646
msgid "Custom button number should be between 0 and 63"
msgstr ""
#: pronterface.py:736
msgid "Edit custom button '%s'"
msgstr ""
#: pronterface.py:738
msgid "Move left <<"
msgstr ""
#: pronterface.py:741
msgid "Move right >>"
msgstr ""
#: pronterface.py:745
msgid "Remove custom button '%s'"
msgstr ""
#: pronterface.py:748
msgid "Add custom button"
msgstr ""
#: pronterface.py:763
msgid "event object missing"
msgstr ""
#: pronterface.py:791
msgid "Invalid period given."
msgstr ""
#: pronterface.py:794
msgid "Monitoring printer."
msgstr ""
#: pronterface.py:796
msgid "Done monitoring."
msgstr ""
#: pronterface.py:815
msgid "Printer is online. "
msgstr ""
#: pronterface.py:817 pronterface.py:954 pronterface.py:1002
msgid "Loaded "
msgstr ""
#: pronterface.py:820
msgid "Bed"
msgstr "Base"
#: pronterface.py:820
msgid "Hotend"
msgstr "Extrémité chaude"
#: pronterface.py:823
msgid " SD printing:%04.2f %%"
msgstr " Impression SD:%04.2f %%"
#: pronterface.py:825
msgid " Printing:%04.2f %%"
msgstr "Impression:%04.2f %%"
#: pronterface.py:879
msgid "Opening file failed."
msgstr "L'ouverture du fichier a échoué"
#: pronterface.py:885
msgid "Commencement d'impression"
msgstr ""
#: pronterface.py:908
msgid "Pick SD file"
msgstr "Choisir un fichier SD"
#: pronterface.py:908
msgid "Select the file to print"
msgstr "Sélectionner le fichier à imprimer"
#: pronterface.py:936
msgid "Skeinforge execution failed."
msgstr "Exécution de Skeinforge échoué"
#: pronterface.py:943
msgid "Skeining..."
msgstr ""
#: pronterface.py:954 pronterface.py:1002
msgid ", %d lines"
msgstr ""
#: pronterface.py:963
msgid "Skeining "
msgstr ""
#: pronterface.py:965
msgid ""
"Skeinforge not found. \n"
"Please copy Skeinforge into a directory named \"skeinforge\" in the same directory as this file."
msgstr ""
#: pronterface.py:984
msgid "Open file to print"
msgstr "Ouvrir un fichier à imprimer"
#: pronterface.py:985
msgid "STL and GCODE files (;*.gcode;*.g;*.stl;*.STL;)"
msgstr "Fichiers STL et GCODE (;*.gcode;*.g;*.stl;*.STL;)"
#: pronterface.py:992
msgid "File not found!"
msgstr "Fichier non trouvé"
#: pronterface.py:1011
msgid "mm of filament used in this print"
msgstr ""
#: pronterface.py:1031
msgid "No file loaded. Please use load first."
msgstr ""
#: pronterface.py:1042
msgid "Restart"
msgstr "Recommencer"
#: pronterface.py:1046
msgid "File upload complete"
msgstr ""
#: pronterface.py:1065
msgid "Pick SD filename"
msgstr ""
#: pronterface.py:1081
msgid "Resume"
msgstr "Résumer"
#: pronterface.py:1147
msgid "Are you sure you want to reset the printer?"
msgstr "Etes-vous certain que vous souhaitez réinitialiser l'imprimante?"
#: pronterface.py:1147
msgid "Reset?"
msgstr "Réinitialiser?"
#: pronterface.py:1226
msgid "Edit settings"
msgstr "Modifier les paramètres"
#: pronterface.py:1228
msgid "Defaults"
msgstr "Paramètres par défaut"
#: pronterface.py:1250
msgid "Custom button"
msgstr ""
#: pronterface.py:1258
msgid "Button title"
msgstr ""
#: pronterface.py:1261
msgid "Command"
msgstr "Commande"
#: pronterface.py:1270
msgid "Color"
msgstr "Couleur"

Binary file not shown.

BIN
locale/nl/LC_MESSAGES/nl.mo Normal file

Binary file not shown.

567
locale/nl/LC_MESSAGES/nl.po Normal file
View File

@ -0,0 +1,567 @@
# Pronterface Message Catalog Dutch
# Copyright (C) 2011 Ruben Lubbes
# Ruben Lubbes <ruben.lubbes@gmx.net>, 2011.
#
msgid ""
msgstr ""
"Project-Id-Version: Pronterface rl1\n"
"POT-Creation-Date: 2011-08-08 16:27+PDT\n"
"PO-Revision-Date: 2011-08-08 16:27+PDT\n"
"Last-Translator: Ruben Lubbes <ruben.lubbes@gmx.net>\n"
"Language-Team: NL <LL@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: UTF-8\n"
"Generated-By: pygettext.py 1.5\n"
#: pronterface.py:10
msgid "WX is not installed. This program requires WX to run."
msgstr "WX is niet geïnstalleerd. Dit programma vereist WX."
#: pronterface.py:55
msgid "Printer Interface"
msgstr "Printer Interface"
#: pronterface.py:67
msgid "X+100"
msgstr "X+100"
#: pronterface.py:68
msgid "X+10"
msgstr "X+10"
#: pronterface.py:69
msgid "X+1"
msgstr "X+1"
#: pronterface.py:70
msgid "X+0.1"
msgstr "X+0.1"
#: pronterface.py:71
msgid "HomeX"
msgstr "0-puntX"
#: pronterface.py:72
msgid "X-0.1"
msgstr "X-0.1"
#: pronterface.py:73
msgid "X-1"
msgstr "X-1"
#: pronterface.py:74
msgid "X-10"
msgstr "X-10"
#: pronterface.py:75
msgid "X-100"
msgstr "X-100"
#: pronterface.py:76
msgid "Y+100"
msgstr "Y+100"
#: pronterface.py:77
msgid "Y+10"
msgstr "Y+10"
#: pronterface.py:78
msgid "Y+1"
msgstr "Y+1"
#: pronterface.py:79
msgid "Y+0.1"
msgstr "Y+0.1"
#: pronterface.py:80
msgid "HomeY"
msgstr "0-puntY"
#: pronterface.py:81
msgid "Y-0.1"
msgstr "Y-0.1"
#: pronterface.py:82
msgid "Y-1"
msgstr "Y-1"
#: pronterface.py:83
msgid "Y-10"
msgstr "Y-10"
#: pronterface.py:84
msgid "Y-100"
msgstr "Y-100"
#: pronterface.py:85
msgid "Motors off"
msgstr "Motoren uit"
#: pronterface.py:86
msgid "Z+10"
msgstr "Z+10"
#: pronterface.py:87
msgid "Z+1"
msgstr "Z+1"
#: pronterface.py:88
msgid "Z+0.1"
msgstr "Z+0.1"
#: pronterface.py:89
msgid "HomeZ"
msgstr "0-puntZ"
#: pronterface.py:90
msgid "Z-0.1"
msgstr "Z-0.1"
#: pronterface.py:91
msgid "Z-1"
msgstr "Z-1"
#: pronterface.py:92
msgid "Z-10"
msgstr "Z-10"
#: pronterface.py:93
msgid "Home"
msgstr "0-punt"
#: pronterface.py:94
msgid "Check temp"
msgstr "Controleer Temp."
#: pronterface.py:95
msgid "Extrude"
msgstr "Extruden"
#: pronterface.py:96
msgid "Reverse"
msgstr "Terug"
#: pronterface.py:112
msgid ""
"# I moved all your custom buttons into .pronsolerc.\n"
"# Please don't add them here any more.\n"
"# Backup of your old buttons is in custombtn.old\n"
msgstr ""
"# Gedefinieerde knoppen zijn verplaatst naar .pronsolerc.\n"
"# Hier geen nieuwe knoppen definiëren.\n"
"# Een backup van de oude knoppen staat in custombtn.old\n"
#: pronterface.py:117
msgid "Note!!! You have specified custom buttons in both custombtn.txt and .pronsolerc"
msgstr "Let op!!! Er zijn gedefinieerde knoppen in zowel custombtn.txt en .pronsolerc"
#: pronterface.py:118
msgid "Ignoring custombtn.txt. Remove all current buttons to revert to custombtn.txt"
msgstr ""
"Negeer custombtn.txt. Verwijder alle gedefinieerde knoppen om gebruik te maken van custombtn.txt"
#: pronterface.py:141 pronterface.py:427 pronterface.py:956
#: pronterface.py:1003 pronterface.py:1113 pronterface.py:1140
#: pronterface.py:1154
msgid "Print"
msgstr "Printen"
#: pronterface.py:145
msgid "Printer is now online"
msgstr "Printer is nu verbonden"
#: pronterface.py:194
msgid "Setting hotend temperature to "
msgstr "Stel elementtemperatuur in op "
#: pronterface.py:194 pronterface.py:215
msgid " degrees Celsius."
msgstr " graden Celsius."
#: pronterface.py:198 pronterface.py:219
msgid "Printer is not online."
msgstr "Printer is niet verbonden."
#: pronterface.py:200
msgid "You cannot set negative temperatures. To turn the hotend off entirely, set its temperature to 0."
msgstr ""
"Negatieve temperatuur is niet instelbaar. Om het element uit te schakelen wordt temperatuur 0 "
"ingesteld."
#: pronterface.py:202 pronterface.py:223
msgid "You must enter a temperature."
msgstr "Er moet een temperatuur worden ingesteld."
#: pronterface.py:215
msgid "Setting bed temperature to "
msgstr "Bed teperatuur ingesteld op "
#: pronterface.py:221
msgid "You cannot set negative temperatures. To turn the bed off entirely, set its temperature to 0."
msgstr ""
"Negatieve temperatuur is niet instelbaar. Om het printbed uit te schakelen wordt temperatuur 0 "
"ingesteld."
#: pronterface.py:238
msgid "Do you want to erase the macro?"
msgstr "Wilt u de macro verwijderen?"
#: pronterface.py:242
msgid "Cancelled."
msgstr "Afgebroken"
#: pronterface.py:271
msgid " Opens file"
msgstr " Opent bestand"
#: pronterface.py:271
msgid "&Open..."
msgstr "&Open..."
#: pronterface.py:272
msgid " Edit open file"
msgstr " Wijzig geopend bestand"
#: pronterface.py:272
msgid "&Edit..."
msgstr "&Wijzig..."
#: pronterface.py:274
msgid " Adjust SFACT settings"
msgstr "Instellen SFACT"
#: pronterface.py:274
msgid "SFACT Settings"
msgstr "SFACT Instellingen"
#: pronterface.py:277
msgid " Quickly adjust SFACT settings for active profile"
msgstr " Eenvoudig SFACT's huidige profiel instellen"
#: pronterface.py:277
msgid "SFACT Quick Settings"
msgstr "SFACT Snelinstelling"
#: pronterface.py:281
msgid " Closes the Window"
msgstr " Sluit het venster"
#: pronterface.py:281
msgid "E&xit"
msgstr "&Stoppen"
#: pronterface.py:282
msgid "&Print"
msgstr "&Printen"
#: pronterface.py:285
msgid "&Macros"
msgstr "&Macros"
#: pronterface.py:286
msgid "<&New...>"
msgstr "<&Nieuw...>"
#: pronterface.py:287
msgid " Options dialog"
msgstr "Optievenster"
#: pronterface.py:287
msgid "&Options"
msgstr "&Opties"
#: pronterface.py:288
msgid "&Settings"
msgstr "&Instellingen"
#: pronterface.py:304
msgid "Enter macro name"
msgstr "Voer macronaam in"
#: pronterface.py:307
msgid "Macro name:"
msgstr "Macronaam:"
#: pronterface.py:310
msgid "Ok"
msgstr "Ok"
#: pronterface.py:314
msgid "Cancel"
msgstr "Annuleer"
#: pronterface.py:332
msgid "' is being used by built-in command"
msgstr "' wordt gebruikt door ingebouwde instructie"
#: pronterface.py:332
msgid "Name '"
msgstr "Naam '"
#: pronterface.py:368
msgid "Port:"
msgstr "Poort"
#: pronterface.py:390
msgid "Connect"
msgstr "Verbind"
#: pronterface.py:392
msgid "Connect to the printer"
msgstr "Verbind met printer"
#: pronterface.py:394
msgid "Disconnect"
msgstr "Ontkoppel"
#: pronterface.py:398
msgid "Reset"
msgstr "Reset"
#: pronterface.py:401 pronterface.py:579
msgid "Mini mode"
msgstr "Mini-venster"
#: pronterface.py:407
msgid ""
"Monitor\n"
"printer"
msgstr "Printercommunicatie volgen"
#: pronterface.py:416
msgid "Load file"
msgstr "open bestand"
#: pronterface.py:419
msgid "SD Upload"
msgstr "uploaden naar SD"
#: pronterface.py:423
msgid "SD Print"
msgstr "Afdruk van SD"
#: pronterface.py:431 pronterface.py:1004 pronterface.py:1040
#: pronterface.py:1088 pronterface.py:1112 pronterface.py:1139
#: pronterface.py:1153
msgid "Pause"
msgstr "Pauze"
#: pronterface.py:445
msgid "Send"
msgstr "Zend"
#: pronterface.py:453 pronterface.py:511
msgid "mm/min"
msgstr "mm/min"
#: pronterface.py:455
msgid "XY:"
msgstr "XY:"
#: pronterface.py:457
msgid "Z:"
msgstr "Z:"
#: pronterface.py:474
msgid "Heater:"
msgstr "Element:"
#: pronterface.py:482 pronterface.py:494
msgid "Set"
msgstr "Stel in"
#: pronterface.py:486
msgid "Bed:"
msgstr "Bed:"
#: pronterface.py:505
msgid "mm"
msgstr "mm"
#: pronterface.py:538 pronterface.py:833 pronterface.py:1034
msgid "Not connected to printer."
msgstr "Printer is niet verbonden."
#: pronterface.py:586
msgid "Full mode"
msgstr "Volledig venster"
#: pronterface.py:624
msgid "Defines custom button. Usage: button <num> \"title\" [/c \"colour\"] command"
msgstr "Definieert eigen knop. Gebruik: knop <num> \"titel\" [/c \"kleur\"] commando"
#: pronterface.py:646
msgid "Custom button number should be between 0 and 63"
msgstr "Knopnummer moet tussen 0 en 63 zijn"
#: pronterface.py:736
msgid "Edit custom button '%s'"
msgstr "Wijzig gedefineerde knop '%s'"
#: pronterface.py:738
msgid "Move left <<"
msgstr "Verplaats links <<"
#: pronterface.py:741
msgid "Move right >>"
msgstr "Verplaats rechts >>"
#: pronterface.py:745
msgid "Remove custom button '%s'"
msgstr "Verwijder gedefinieerde knop '%s'"
#: pronterface.py:748
msgid "Add custom button"
msgstr "Definieer eigen knop."
#: pronterface.py:763
msgid "event object missing"
msgstr "vermist object"
#: pronterface.py:791
msgid "Invalid period given."
msgstr "Foute gegevens ingevoerd"
#: pronterface.py:794
msgid "Monitoring printer."
msgstr "Printercommunicatie wordt gevolgd."
#: pronterface.py:796
msgid "Done monitoring."
msgstr "Klaar met volgen."
#: pronterface.py:815
msgid "Printer is online. "
msgstr "Printer is verbonden. "
#: pronterface.py:817 pronterface.py:954 pronterface.py:1002
msgid "Loaded "
msgstr "Geladen"
#: pronterface.py:820
msgid "Bed"
msgstr "Bed"
#: pronterface.py:820
msgid "Hotend"
msgstr "Element"
#: pronterface.py:823
msgid " SD printing:%04.2f %%"
msgstr " SD printen:%04.2f %%"
#: pronterface.py:825
msgid " Printing:%04.2f %%"
msgstr " Printen:%04.2f %%"
#: pronterface.py:879
msgid "Opening file failed."
msgstr "Bestand openen mislukt"
#: pronterface.py:885
msgid "Starting print"
msgstr "Start het printen"
#: pronterface.py:908
msgid "Pick SD file"
msgstr "Kies bestand op SD"
#: pronterface.py:908
msgid "Select the file to print"
msgstr "Kies het te printen bestand"
#: pronterface.py:936
msgid "Skeinforge execution failed."
msgstr "Skeinforge was niet succesvol."
#: pronterface.py:943
msgid "Skeining..."
msgstr "Skeinforge draait..."
#: pronterface.py:954 pronterface.py:1002
msgid ", %d lines"
msgstr ",%d regels"
#: pronterface.py:963
msgid "Skeining "
msgstr "Skeinforge draait"
#: pronterface.py:965
msgid ""
"Skeinforge not found. \n"
"Please copy Skeinforge into a directory named \"skeinforge\" in the same directory as this file."
msgstr ""
"Skeinforge niet gevonden.\n"
"Plaats Skeinforge in een map met de naam \"skeinforge\" in dezelfde map als dit bestand."
#: pronterface.py:984
msgid "Open file to print"
msgstr "Open het te printen bestand"
#: pronterface.py:985
msgid "STL and GCODE files (;*.gcode;*.g;*.stl;*.STL;)"
msgstr "STL en GCODE bestanden (;*.gcode;*.g;*.stl;*.STL;)"
#: pronterface.py:992
msgid "File not found!"
msgstr "Bestand niet gevonden!"
#: pronterface.py:1011
msgid "mm of filament used in this print"
msgstr "mm fillament wordt gebruikt in deze print"
#: pronterface.py:1031
msgid "No file loaded. Please use load first."
msgstr "Geen bestand geladen. Eerst bestand inladen."
#: pronterface.py:1042
msgid "Restart"
msgstr "Herstart"
#: pronterface.py:1046
msgid "File upload complete"
msgstr "Bestandsupload voltooid"
#: pronterface.py:1065
msgid "Pick SD filename"
msgstr "Kies bestandsnaam op SD"
#: pronterface.py:1081
msgid "Resume"
msgstr "Hervat"
#: pronterface.py:1147
msgid "Are you sure you want to reset the printer?"
msgstr "Weet je zeker dat je de printer wilt resetten?"
#: pronterface.py:1147
msgid "Reset?"
msgstr "resetten?"
#: pronterface.py:1226
msgid "Edit settings"
msgstr "Wijzig instellingen"
#: pronterface.py:1228
msgid "Defaults"
msgstr "Standaardinstelling"
#: pronterface.py:1250
msgid "Custom button"
msgstr "Gedefinieerde knop"
#: pronterface.py:1258
msgid "Button title"
msgstr "Knoptitel"
#: pronterface.py:1261
msgid "Command"
msgstr "Commando"
#: pronterface.py:1270
msgid "Color"
msgstr "Kleur"

556
locale/pronterface.pot Normal file
View File

@ -0,0 +1,556 @@
# Pronterface Message Catalog Template
# Copyright (C) 2011 Jonathan Marsden
# Jonathan Marsden <jmarsden@fastmail.fm>, 2011.
#
msgid ""
msgstr ""
"Project-Id-Version: Pronterface jm1\n"
"POT-Creation-Date: 2011-08-06 13:27+PDT\n"
"PO-Revision-Date: 2011-08-06 13:27+PDT\n"
"Last-Translator: Jonathan Marsden <jmarsden@fastmail.fm>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: UTF-8\n"
"Generated-By: pygettext.py 1.5\n"
#: pronterface.py:10
msgid "WX is not installed. This program requires WX to run."
msgstr ""
#: pronterface.py:55
msgid "Printer Interface"
msgstr ""
#: pronterface.py:67
msgid "X+100"
msgstr ""
#: pronterface.py:68
msgid "X+10"
msgstr ""
#: pronterface.py:69
msgid "X+1"
msgstr ""
#: pronterface.py:70
msgid "X+0.1"
msgstr ""
#: pronterface.py:71
msgid "HomeX"
msgstr ""
#: pronterface.py:72
msgid "X-0.1"
msgstr ""
#: pronterface.py:73
msgid "X-1"
msgstr ""
#: pronterface.py:74
msgid "X-10"
msgstr ""
#: pronterface.py:75
msgid "X-100"
msgstr ""
#: pronterface.py:76
msgid "Y+100"
msgstr ""
#: pronterface.py:77
msgid "Y+10"
msgstr ""
#: pronterface.py:78
msgid "Y+1"
msgstr ""
#: pronterface.py:79
msgid "Y+0.1"
msgstr ""
#: pronterface.py:80
msgid "HomeY"
msgstr ""
#: pronterface.py:81
msgid "Y-0.1"
msgstr ""
#: pronterface.py:82
msgid "Y-1"
msgstr ""
#: pronterface.py:83
msgid "Y-10"
msgstr ""
#: pronterface.py:84
msgid "Y-100"
msgstr ""
#: pronterface.py:85
msgid "Motors off"
msgstr ""
#: pronterface.py:86
msgid "Z+10"
msgstr ""
#: pronterface.py:87
msgid "Z+1"
msgstr ""
#: pronterface.py:88
msgid "Z+0.1"
msgstr ""
#: pronterface.py:89
msgid "HomeZ"
msgstr ""
#: pronterface.py:90
msgid "Z-0.1"
msgstr ""
#: pronterface.py:91
msgid "Z-1"
msgstr ""
#: pronterface.py:92
msgid "Z-10"
msgstr ""
#: pronterface.py:93
msgid "Home"
msgstr ""
#: pronterface.py:94
msgid "Check temp"
msgstr ""
#: pronterface.py:95
msgid "Extrude"
msgstr ""
#: pronterface.py:96
msgid "Reverse"
msgstr ""
#: pronterface.py:112
msgid ""
"# I moved all your custom buttons into .pronsolerc.\n"
"# Please don't add them here any more.\n"
"# Backup of your old buttons is in custombtn.old\n"
msgstr ""
#: pronterface.py:117
msgid "Note!!! You have specified custom buttons in both custombtn.txt and .pronsolerc"
msgstr ""
#: pronterface.py:118
msgid "Ignoring custombtn.txt. Remove all current buttons to revert to custombtn.txt"
msgstr ""
#: pronterface.py:141 pronterface.py:427 pronterface.py:956
#: pronterface.py:1003 pronterface.py:1113 pronterface.py:1140
#: pronterface.py:1154
msgid "Print"
msgstr ""
#: pronterface.py:145
msgid "Printer is now online"
msgstr ""
#: pronterface.py:194
msgid "Setting hotend temperature to "
msgstr ""
#: pronterface.py:194 pronterface.py:215
msgid " degrees Celsius."
msgstr ""
#: pronterface.py:198 pronterface.py:219
msgid "Printer is not online."
msgstr ""
#: pronterface.py:200
msgid "You cannot set negative temperatures. To turn the hotend off entirely, set its temperature to 0."
msgstr ""
#: pronterface.py:202 pronterface.py:223
msgid "You must enter a temperature."
msgstr ""
#: pronterface.py:215
msgid "Setting bed temperature to "
msgstr ""
#: pronterface.py:221
msgid "You cannot set negative temperatures. To turn the bed off entirely, set its temperature to 0."
msgstr ""
#: pronterface.py:238
msgid "Do you want to erase the macro?"
msgstr ""
#: pronterface.py:242
msgid "Cancelled."
msgstr ""
#: pronterface.py:271
msgid " Opens file"
msgstr ""
#: pronterface.py:271
msgid "&Open..."
msgstr ""
#: pronterface.py:272
msgid " Edit open file"
msgstr ""
#: pronterface.py:272
msgid "&Edit..."
msgstr ""
#: pronterface.py:274
msgid " Adjust SFACT settings"
msgstr ""
#: pronterface.py:274
msgid "SFACT Settings"
msgstr ""
#: pronterface.py:277
msgid " Quickly adjust SFACT settings for active profile"
msgstr ""
#: pronterface.py:277
msgid "SFACT Quick Settings"
msgstr ""
#: pronterface.py:281
msgid " Closes the Window"
msgstr ""
#: pronterface.py:281
msgid "E&xit"
msgstr ""
#: pronterface.py:282
msgid "&Print"
msgstr ""
#: pronterface.py:285
msgid "&Macros"
msgstr ""
#: pronterface.py:286
msgid "<&New...>"
msgstr ""
#: pronterface.py:287
msgid " Options dialog"
msgstr ""
#: pronterface.py:287
msgid "&Options"
msgstr ""
#: pronterface.py:288
msgid "&Settings"
msgstr ""
#: pronterface.py:304
msgid "Enter macro name"
msgstr ""
#: pronterface.py:307
msgid "Macro name:"
msgstr ""
#: pronterface.py:310
msgid "Ok"
msgstr ""
#: pronterface.py:314
msgid "Cancel"
msgstr ""
#: pronterface.py:332
msgid "' is being used by built-in command"
msgstr ""
#: pronterface.py:332
msgid "Name '"
msgstr ""
#: pronterface.py:368
msgid "Port:"
msgstr ""
#: pronterface.py:390
msgid "Connect"
msgstr ""
#: pronterface.py:392
msgid "Connect to the printer"
msgstr ""
#: pronterface.py:394
msgid "Disconnect"
msgstr ""
#: pronterface.py:398
msgid "Reset"
msgstr ""
#: pronterface.py:401 pronterface.py:579
msgid "Mini mode"
msgstr ""
#: pronterface.py:407
msgid ""
"Monitor\n"
"printer"
msgstr ""
#: pronterface.py:416
msgid "Load file"
msgstr ""
#: pronterface.py:419
msgid "SD Upload"
msgstr ""
#: pronterface.py:423
msgid "SD Print"
msgstr ""
#: pronterface.py:431 pronterface.py:1004 pronterface.py:1040
#: pronterface.py:1088 pronterface.py:1112 pronterface.py:1139
#: pronterface.py:1153
msgid "Pause"
msgstr ""
#: pronterface.py:445
msgid "Send"
msgstr ""
#: pronterface.py:453 pronterface.py:511
msgid "mm/min"
msgstr ""
#: pronterface.py:455
msgid "XY:"
msgstr ""
#: pronterface.py:457
msgid "Z:"
msgstr ""
#: pronterface.py:474
msgid "Heater:"
msgstr ""
#: pronterface.py:482 pronterface.py:494
msgid "Set"
msgstr ""
#: pronterface.py:486
msgid "Bed:"
msgstr ""
#: pronterface.py:505
msgid "mm"
msgstr ""
#: pronterface.py:538 pronterface.py:833 pronterface.py:1034
msgid "Not connected to printer."
msgstr ""
#: pronterface.py:586
msgid "Full mode"
msgstr ""
#: pronterface.py:624
msgid "Defines custom button. Usage: button <num> \"title\" [/c \"colour\"] command"
msgstr ""
#: pronterface.py:646
msgid "Custom button number should be between 0 and 63"
msgstr ""
#: pronterface.py:736
msgid "Edit custom button '%s'"
msgstr ""
#: pronterface.py:738
msgid "Move left <<"
msgstr ""
#: pronterface.py:741
msgid "Move right >>"
msgstr ""
#: pronterface.py:745
msgid "Remove custom button '%s'"
msgstr ""
#: pronterface.py:748
msgid "Add custom button"
msgstr ""
#: pronterface.py:763
msgid "event object missing"
msgstr ""
#: pronterface.py:791
msgid "Invalid period given."
msgstr ""
#: pronterface.py:794
msgid "Monitoring printer."
msgstr ""
#: pronterface.py:796
msgid "Done monitoring."
msgstr ""
#: pronterface.py:815
msgid "Printer is online. "
msgstr ""
#: pronterface.py:817 pronterface.py:954 pronterface.py:1002
msgid "Loaded "
msgstr ""
#: pronterface.py:820
msgid "Bed"
msgstr ""
#: pronterface.py:820
msgid "Hotend"
msgstr ""
#: pronterface.py:823
msgid " SD printing:%04.2f %%"
msgstr ""
#: pronterface.py:825
msgid " Printing:%04.2f %%"
msgstr ""
#: pronterface.py:879
msgid "Opening file failed."
msgstr ""
#: pronterface.py:885
msgid "Starting print"
msgstr ""
#: pronterface.py:908
msgid "Pick SD file"
msgstr ""
#: pronterface.py:908
msgid "Select the file to print"
msgstr ""
#: pronterface.py:936
msgid "Skeinforge execution failed."
msgstr ""
#: pronterface.py:943
msgid "Skeining..."
msgstr ""
#: pronterface.py:954 pronterface.py:1002
msgid ", %d lines"
msgstr ""
#: pronterface.py:963
msgid "Skeining "
msgstr ""
#: pronterface.py:965
msgid ""
"Skeinforge not found. \n"
"Please copy Skeinforge into a directory named \"skeinforge\" in the same directory as this file."
msgstr ""
#: pronterface.py:984
msgid "Open file to print"
msgstr ""
#: pronterface.py:985
msgid "STL and GCODE files (;*.gcode;*.g;*.stl;*.STL;)"
msgstr ""
#: pronterface.py:992
msgid "File not found!"
msgstr ""
#: pronterface.py:1011
msgid "mm of filament used in this print"
msgstr ""
#: pronterface.py:1031
msgid "No file loaded. Please use load first."
msgstr ""
#: pronterface.py:1042
msgid "Restart"
msgstr ""
#: pronterface.py:1046
msgid "File upload complete"
msgstr ""
#: pronterface.py:1065
msgid "Pick SD filename"
msgstr ""
#: pronterface.py:1081
msgid "Resume"
msgstr ""
#: pronterface.py:1147
msgid "Are you sure you want to reset the printer?"
msgstr ""
#: pronterface.py:1147
msgid "Reset?"
msgstr ""
#: pronterface.py:1226
msgid "Edit settings"
msgstr ""
#: pronterface.py:1228
msgid "Defaults"
msgstr ""
#: pronterface.py:1250
msgid "Custom button"
msgstr ""
#: pronterface.py:1258
msgid "Button title"
msgstr ""
#: pronterface.py:1261
msgid "Command"
msgstr ""
#: pronterface.py:1270
msgid "Color"
msgstr ""

View File

@ -1,8 +1,13 @@
#!/usr/bin/env python
# Set up Internationalization using gettext
import gettext
gettext.install('pronterface', '/usr/share/pronterface/locale', unicode=1)
try:
import wx
except:
print "WX is not installed. This program requires WX to run."
print _("WX is not installed. This program requires WX to run.")
raise
import printcore, os, sys, glob, time, threading, traceback, StringIO, gviz, traceback, cStringIO
try:
@ -45,9 +50,14 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
self.settings.last_file_path = ""
self.settings.last_temperature = 0.0
self.settings.last_bed_temperature = 0.0
self.settings.bed_size_x = 200.
self.settings.bed_size_y = 200.
self.settings.preview_grid_step1 = 10.
self.settings.preview_grid_step2 = 50.
self.settings.preview_extrusion_width = 0.5
self.filename=filename
os.putenv("UBUNTU_MENUPROXY","0")
wx.Frame.__init__(self,None,title="Printer Interface",size=size);
wx.Frame.__init__(self,None,title=_("Printer Interface"),size=size);
self.SetIcon(wx.Icon("P-face.ico",wx.BITMAP_TYPE_ICO))
self.panel=wx.Panel(self,-1,size=size)
self.statuscheck=False
@ -59,36 +69,36 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
ycol=(180,180,255)
zcol=(180,255,180)
self.cpbuttons=[
["X+100",("move X 100"),(2,0),xcol,(1,3)],
["X+10",("move X 10"),(3,0),xcol,(1,3)],
["X+1",("move X 1"),(4,0),xcol,(1,3)],
["X+0.1",("move X 0.1"),(5,0),xcol,(1,3)],
["HomeX",("home X"),(6,0),(205,205,78),(1,3)],
["X-0.1",("move X -0.1"),(7,0),xcol,(1,3)],
["X-1",("move X -1"),(8,0),xcol,(1,3)],
["X-10",("move X -10"),(9,0),xcol,(1,3)],
["X-100",("move X -100"),(10,0),xcol,(1,3)],
["Y+100",("move Y 100"),(2,3),ycol,(1,3)],
["Y+10",("move Y 10"),(3,3),ycol,(1,3)],
["Y+1",("move Y 1"),(4,3),ycol,(1,3)],
["Y+0.1",("move Y 0.1"),(5,3),ycol,(1,3)],
["HomeY",("home Y"),(6,3),(150,150,205),(1,3)],
["Y-0.1",("move Y -0.1"),(7,3),ycol,(1,3)],
["Y-1",("move Y -1"),(8,3),ycol,(1,3)],
["Y-10",("move Y -10"),(9,3),ycol,(1,3)],
["Y-100",("move Y -100"),(10,3),ycol,(1,3)],
["Motors off",("M84"),(2,6),(250,250,250),(1,3)],
["Z+10",("move Z 10"),(3,6),zcol,(1,3)],
["Z+1",("move Z 1"),(4,6),zcol,(1,3)],
["Z+0.1",("move Z 0.1"),(5,6),zcol,(1,3)],
["HomeZ",("home Z"),(6,6),(150,205,150),(1,3)],
["Z-0.1",("move Z -0.1"),(7,6),zcol,(1,3)],
["Z-1",("move Z -1"),(8,6),zcol,(1,3)],
["Z-10",("move Z -10"),(9,6),zcol,(1,3)],
["Home",("home"),(10,6),(250,250,250),(1,3)],
["Check temp",("M105"),(11,6),(225,200,200),(1,3)],
["Extrude",("extrude"),(13,0),(225,200,200),(1,2)],
["Reverse",("reverse"),(14,0),(225,200,200),(1,2)],
[_("X+100"),("move X 100"),(2,0),xcol,(1,3)],
[_("X+10"),("move X 10"),(3,0),xcol,(1,3)],
[_("X+1"),("move X 1"),(4,0),xcol,(1,3)],
[_("X+0.1"),("move X 0.1"),(5,0),xcol,(1,3)],
[_("HomeX"),("home X"),(6,0),(205,205,78),(1,3)],
[_("X-0.1"),("move X -0.1"),(7,0),xcol,(1,3)],
[_("X-1"),("move X -1"),(8,0),xcol,(1,3)],
[_("X-10"),("move X -10"),(9,0),xcol,(1,3)],
[_("X-100"),("move X -100"),(10,0),xcol,(1,3)],
[_("Y+100"),("move Y 100"),(2,3),ycol,(1,3)],
[_("Y+10"),("move Y 10"),(3,3),ycol,(1,3)],
[_("Y+1"),("move Y 1"),(4,3),ycol,(1,3)],
[_("Y+0.1"),("move Y 0.1"),(5,3),ycol,(1,3)],
[_("HomeY"),("home Y"),(6,3),(150,150,205),(1,3)],
[_("Y-0.1"),("move Y -0.1"),(7,3),ycol,(1,3)],
[_("Y-1"),("move Y -1"),(8,3),ycol,(1,3)],
[_("Y-10"),("move Y -10"),(9,3),ycol,(1,3)],
[_("Y-100"),("move Y -100"),(10,3),ycol,(1,3)],
[_("Motors off"),("M84"),(2,6),(250,250,250),(1,3)],
[_("Z+10"),("move Z 10"),(3,6),zcol,(1,3)],
[_("Z+1"),("move Z 1"),(4,6),zcol,(1,3)],
[_("Z+0.1"),("move Z 0.1"),(5,6),zcol,(1,3)],
[_("HomeZ"),("home Z"),(6,6),(150,205,150),(1,3)],
[_("Z-0.1"),("move Z -0.1"),(7,6),zcol,(1,3)],
[_("Z-1"),("move Z -1"),(8,6),zcol,(1,3)],
[_("Z-10"),("move Z -10"),(9,6),zcol,(1,3)],
[_("Home"),("home"),(10,6),(250,250,250),(1,3)],
[_("Check temp"),("M105"),(11,6),(225,200,200),(1,3)],
[_("Extrude"),("extrude"),(13,0),(225,200,200),(1,2)],
[_("Reverse"),("reverse"),(14,0),(225,200,200),(1,2)],
]
self.custombuttons=[]
self.btndict={}
@ -104,13 +114,13 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
self.cbutton_save(n,self.custombuttons[n])
os.rename("custombtn.txt","custombtn.old")
rco=open("custombtn.txt","w")
rco.write("# I moved all your custom buttons into .pronsolerc.\n# Please don't add them here any more.\n# Backup of your old buttons is in custombtn.old\n")
rco.write(_("# I moved all your custom buttons into .pronsolerc.\n# Please don't add them here any more.\n# Backup of your old buttons is in custombtn.old\n"))
rco.close()
except IOError,x:
print str(x)
else:
print "Note!!! You have specified custom buttons in both custombtn.txt and .pronsolerc"
print "Ignoring custombtn.txt. Remove all current buttons to revert to custombtn.txt"
print _("Note!!! You have specified custom buttons in both custombtn.txt and .pronsolerc")
print _("Ignoring custombtn.txt. Remove all current buttons to revert to custombtn.txt")
except:
pass
@ -133,11 +143,11 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
if(self.p.queueindex==0):
print "Print took "+str(int(time.time()-self.starttime)/60)+" minutes "+str(int(time.time()-self.starttime)%60)+" seconds"
wx.CallAfter(self.pausebtn.Disable)
wx.CallAfter(self.printbtn.SetLabel,"Print")
wx.CallAfter(self.printbtn.SetLabel,_("Print"))
def online(self):
print "Printer is now online"
print _("Printer is now online")
wx.CallAfter(self.connectbtn.Disable)
for i in self.printerControls:
wx.CallAfter(i.Enable)
@ -186,15 +196,15 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
if f>=0:
if self.p.online:
self.p.send_now("M104 S"+l)
print "Setting hotend temperature to ",f," degrees Celsius."
print _("Setting hotend temperature to "),f,_(" degrees Celsius.")
self.htemp.SetValue(l)
self.set("last_temperature",str(f))
else:
print "Printer is not online."
print _("Printer is not online.")
else:
print "You cannot set negative temperatures. To turn the hotend off entirely, set its temperature to 0."
print _("You cannot set negative temperatures. To turn the hotend off entirely, set its temperature to 0.")
except:
print "You must enter a temperature."
print _("You must enter a temperature.")
def do_bedtemp(self,l=""):
try:
@ -207,15 +217,15 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
if f>=0:
if self.p.online:
self.p.send_now("M140 S"+l)
print "Setting bed temperature to ",f," degrees Celsius."
print _("Setting bed temperature to "),f,_(" degrees Celsius.")
self.btemp.SetValue(l)
self.set("last_bed_temperature",str(f))
else:
print "Printer is not online."
print _("Printer is not online.")
else:
print "You cannot set negative temperatures. To turn the bed off entirely, set its temperature to 0."
print _("You cannot set negative temperatures. To turn the bed off entirely, set its temperature to 0.")
except:
print "You must enter a temperature."
print _("You must enter a temperature.")
def end_macro(self):
pronsole.pronsole.end_macro(self)
@ -230,11 +240,11 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
def cb(definition):
if len(definition.strip())==0:
if old_macro_definition!="":
dialog = wx.MessageDialog(self,"Do you want to erase the macro?",style=wx.YES_NO|wx.YES_DEFAULT|wx.ICON_QUESTION)
dialog = wx.MessageDialog(self,_("Do you want to erase the macro?"),style=wx.YES_NO|wx.YES_DEFAULT|wx.ICON_QUESTION)
if dialog.ShowModal()==wx.ID_YES:
self.delete_macro(macro_name)
return
print "Cancelled."
print _("Cancelled.")
return
self.cur_macro_name = macro_name
self.cur_macro_def = definition
@ -263,24 +273,24 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
def popmenu(self):
self.menustrip = wx.MenuBar()
m = wx.Menu()
self.Bind(wx.EVT_MENU, self.loadfile, m.Append(-1,"&Open..."," Opens file"))
self.Bind(wx.EVT_MENU, self.do_editgcode, m.Append(-1,"&Edit..."," Edit open file"))
self.Bind(wx.EVT_MENU, self.loadfile, m.Append(-1,_("&Open..."),_(" Opens file")))
self.Bind(wx.EVT_MENU, self.do_editgcode, m.Append(-1,_("&Edit..."),_(" Edit open file")))
if sys.platform != 'darwin':
self.Bind(wx.EVT_MENU, lambda x:threading.Thread(target=lambda :self.do_skein("set")).start(), m.Append(-1,"SFACT Settings"," Adjust SFACT settings"))
self.Bind(wx.EVT_MENU, lambda x:threading.Thread(target=lambda :self.do_skein("set")).start(), m.Append(-1,_("SFACT Settings"),_(" Adjust SFACT settings")))
try:
from SkeinforgeQuickEditDialog import SkeinforgeQuickEditDialog
self.Bind(wx.EVT_MENU, lambda *e:SkeinforgeQuickEditDialog(self), m.Append(-1,"SFACT Quick Settings"," Quickly adjust SFACT settings for active profile"))
self.Bind(wx.EVT_MENU, lambda *e:SkeinforgeQuickEditDialog(self), m.Append(-1,_("SFACT Quick Settings"),_(" Quickly adjust SFACT settings for active profile")))
except:
pass
self.Bind(wx.EVT_MENU, self.OnExit, m.Append(wx.ID_EXIT,"E&xit"," Closes the Window"))
self.menustrip.Append(m,"&Print")
self.Bind(wx.EVT_MENU, self.OnExit, m.Append(wx.ID_EXIT,_("E&xit"),_(" Closes the Window")))
self.menustrip.Append(m,_("&Print"))
m = wx.Menu()
self.macros_menu = wx.Menu()
m.AppendSubMenu(self.macros_menu, "&Macros")
self.Bind(wx.EVT_MENU, self.new_macro, self.macros_menu.Append(-1, "<&New...>"))
self.Bind(wx.EVT_MENU, lambda *e:options(self), m.Append(-1,"&Options"," Options dialog"))
self.menustrip.Append(m,"&Settings")
m.AppendSubMenu(self.macros_menu, _("&Macros"))
self.Bind(wx.EVT_MENU, self.new_macro, self.macros_menu.Append(-1, _("<&New...>")))
self.Bind(wx.EVT_MENU, lambda *e:options(self), m.Append(-1,_("&Options"),_(" Options dialog")))
self.menustrip.Append(m,_("&Settings"))
self.update_macros_menu()
self.SetMenuBar(self.menustrip)
@ -296,17 +306,17 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
macroed(self.filename,self.f,self.doneediting,1)
def new_macro(self,e=None):
dialog = wx.Dialog(self,-1,"Enter macro name",size=(200,100))
dialog = wx.Dialog(self,-1,_("Enter macro name"),size=(200,100))
panel = wx.Panel(dialog,-1)
vbox = wx.BoxSizer(wx.VERTICAL)
wx.StaticText(panel,-1,"Macro name:",(8,14))
wx.StaticText(panel,-1,_("Macro name:"),(8,14))
dialog.namectrl = wx.TextCtrl(panel,-1,'',(80,8),size=(100,24),style=wx.TE_PROCESS_ENTER)
hbox = wx.BoxSizer(wx.HORIZONTAL)
okb = wx.Button(dialog,wx.ID_OK,"Ok",size=(50,24))
okb = wx.Button(dialog,wx.ID_OK,_("Ok"),size=(50,24))
dialog.Bind(wx.EVT_TEXT_ENTER,lambda e:dialog.EndModal(wx.ID_OK),dialog.namectrl)
#dialog.Bind(wx.EVT_BUTTON,lambda e:self.new_macro_named(dialog,e),okb)
hbox.Add(okb)
hbox.Add(wx.Button(dialog,wx.ID_CANCEL,"Cancel",size=(50,24)))
hbox.Add(wx.Button(dialog,wx.ID_CANCEL,_("Cancel"),size=(50,24)))
vbox.Add(panel)
vbox.Add(hbox,1,wx.ALIGN_CENTER|wx.TOP|wx.BOTTOM,10)
dialog.SetSizer(vbox)
@ -324,7 +334,7 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
if self.macros.has_key(macro):
old_def = self.macros[macro]
elif hasattr(self.__class__,"do_"+macro):
print "Name '"+macro+"' is being used by built-in command"
print _("Name '")+macro+_("' is being used by built-in command")
return
elif len([c for c in macro if not c.isalnum() and c != "_"]):
print "Macro name may contain only alphanumeric symbols and underscores"
@ -360,7 +370,7 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
#lower section contains the rest of the window - manual controls, console, visualizations
#TOP ROW:
uts=self.uppertopsizer=wx.BoxSizer(wx.HORIZONTAL)
uts.Add(wx.StaticText(self.panel,-1,"Port:",pos=(0,5)),wx.TOP|wx.LEFT,5)
uts.Add(wx.StaticText(self.panel,-1,_("Port:"),pos=(0,5)),wx.TOP|wx.LEFT,5)
scan=self.scanserial()
self.serialport = wx.ComboBox(self.panel, -1,
choices=scan,
@ -382,24 +392,24 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
except:
pass
uts.Add(self.baud)
self.connectbtn=wx.Button(self.panel,-1,"Connect",pos=(380,0))
self.connectbtn=wx.Button(self.panel,-1,_("Connect"),pos=(380,0))
uts.Add(self.connectbtn)
self.connectbtn.SetToolTipString("Connect to the printer")
self.connectbtn.SetToolTipString(_("Connect to the printer"))
self.connectbtn.Bind(wx.EVT_BUTTON,self.connect)
self.disconnectbtn=wx.Button(self.panel,-1,"Disconnect",pos=(470,0))
self.disconnectbtn=wx.Button(self.panel,-1,_("Disconnect"),pos=(470,0))
self.disconnectbtn.Bind(wx.EVT_BUTTON,self.disconnect)
self.printerControls.append(self.disconnectbtn)
uts.Add(self.disconnectbtn)
self.resetbtn=wx.Button(self.panel,-1,"Reset",pos=(560,0))
self.resetbtn=wx.Button(self.panel,-1,_("Reset"),pos=(560,0))
self.resetbtn.Bind(wx.EVT_BUTTON,self.reset)
uts.Add(self.resetbtn)
self.minibtn=wx.Button(self.panel,-1,"Mini mode",pos=(690,0))
self.minibtn=wx.Button(self.panel,-1,_("Mini mode"),pos=(690,0))
self.minibtn.Bind(wx.EVT_BUTTON,self.toggleview)
uts.Add((10,-1))
self.monitorbox=wx.CheckBox(self.panel,-1,"",pos=(450,37))
uts.Add((15,-1))
uts.Add(self.monitorbox)
uts.Add(wx.StaticText(self.panel,-1,"Monitor\nprinter",pos=(470,37)))
uts.Add(wx.StaticText(self.panel,-1,_("Monitor\nprinter"),pos=(470,37)))
self.monitorbox.Bind(wx.EVT_CHECKBOX,self.setmonitor)
uts.Add((15,-1),flag=wx.EXPAND)
@ -408,22 +418,22 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
#SECOND ROW
ubs=self.upperbottomsizer=wx.BoxSizer(wx.HORIZONTAL)
self.loadbtn=wx.Button(self.panel,-1,"Load file",pos=(0,40))
self.loadbtn=wx.Button(self.panel,-1,_("Load file"),pos=(0,40))
self.loadbtn.Bind(wx.EVT_BUTTON,self.loadfile)
ubs.Add(self.loadbtn)
self.uploadbtn=wx.Button(self.panel,-1,"SD Upload",pos=(90,40))
self.uploadbtn=wx.Button(self.panel,-1,_("SD Upload"),pos=(90,40))
self.uploadbtn.Bind(wx.EVT_BUTTON,self.upload)
self.printerControls.append(self.uploadbtn)
ubs.Add(self.uploadbtn)
self.sdprintbtn=wx.Button(self.panel,-1,"SD Print",pos=(180,40))
self.sdprintbtn=wx.Button(self.panel,-1,_("SD Print"),pos=(180,40))
self.sdprintbtn.Bind(wx.EVT_BUTTON,self.sdprintfile)
self.printerControls.append(self.sdprintbtn)
ubs.Add(self.sdprintbtn)
self.printbtn=wx.Button(self.panel,-1,"Print",pos=(270,40))
self.printbtn=wx.Button(self.panel,-1,_("Print"),pos=(270,40))
self.printbtn.Bind(wx.EVT_BUTTON,self.printfile)
self.printbtn.Disable()
ubs.Add(self.printbtn)
self.pausebtn=wx.Button(self.panel,-1,"Pause",pos=(360,40))
self.pausebtn=wx.Button(self.panel,-1,_("Pause"),pos=(360,40))
self.pausebtn.Bind(wx.EVT_BUTTON,self.pause)
ubs.Add(self.pausebtn)
ubs.Add((50,-1),flag=wx.EXPAND)
@ -437,7 +447,7 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
self.commandbox.Bind(wx.EVT_TEXT_ENTER,self.sendline)
#self.printerControls.append(self.commandbox)
lbrs.Add(self.commandbox)
self.sendbtn=wx.Button(self.panel,-1,"Send",pos=(700,420))
self.sendbtn=wx.Button(self.panel,-1,_("Send"),pos=(700,420))
self.sendbtn.Bind(wx.EVT_BUTTON,self.sendline)
#self.printerControls.append(self.sendbtn)
lbrs.Add(self.sendbtn)
@ -445,11 +455,11 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
#left pane
lls=self.lowerlsizer=wx.GridBagSizer()
lls.Add(wx.StaticText(self.panel,-1,"mm/min",pos=(60,69)),pos=(0,4),span=(1,4))
lls.Add(wx.StaticText(self.panel,-1,_("mm/min"),pos=(60,69)),pos=(0,4),span=(1,4))
self.xyfeedc=wx.SpinCtrl(self.panel,-1,str(self.settings.xy_feedrate),min=0,max=50000,size=(70,25),pos=(25,83))
lls.Add(wx.StaticText(self.panel,-1,"XY:",pos=(2,90-2)),pos=(1,0),span=(1,2))
lls.Add(wx.StaticText(self.panel,-1,_("XY:"),pos=(2,90-2)),pos=(1,0),span=(1,2))
lls.Add(self.xyfeedc,pos=(1,2),span=(1,4))
lls.Add(wx.StaticText(self.panel,-1,"Z:",pos=(90,90-2)),pos=(1,6),span=(1,2))
lls.Add(wx.StaticText(self.panel,-1,_("Z:"),pos=(90,90-2)),pos=(1,6),span=(1,2))
self.zfeedc=wx.SpinCtrl(self.panel,-1,str(self.settings.z_feedrate),min=0,max=50000,size=(70,25),pos=(105,83))
lls.Add(self.zfeedc,pos=(1,8),span=(1,4))
@ -466,7 +476,7 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
lls.Add(btn,pos=i[2],span=i[4])
lls.Add(wx.StaticText(self.panel,-1,"Heater:",pos=(0,343)),pos=(11,0),span=(1,1))
lls.Add(wx.StaticText(self.panel,-1,_("Heater:"),pos=(0,343)),pos=(11,0),span=(1,1))
htemp_choices=[self.temps[i]+" ("+i+")" for i in sorted(self.temps.keys(),key=lambda x:self.temps[x])]
if self.settings.last_temperature not in map(float,self.temps.values()):
htemp_choices = [str(self.settings.last_temperature)] + htemp_choices
@ -474,11 +484,11 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
choices=htemp_choices,style=wx.CB_DROPDOWN, size=(90,25),pos=(45,337))
self.htemp.SetValue("0")
lls.Add(self.htemp,pos=(11,1),span=(1,3))
self.settbtn=wx.Button(self.panel,-1,"Set",size=(38,-1),pos=(135,335))
self.settbtn=wx.Button(self.panel,-1,_("Set"),size=(38,-1),pos=(135,335))
self.settbtn.Bind(wx.EVT_BUTTON,self.do_settemp)
self.printerControls.append(self.settbtn)
lls.Add(self.settbtn,pos=(11,4),span=(1,2))
lls.Add(wx.StaticText(self.panel,-1,"Bed:",pos=(0,343)),pos=(12,0),span=(1,1))
lls.Add(wx.StaticText(self.panel,-1,_("Bed:"),pos=(0,343)),pos=(12,0),span=(1,1))
btemp_choices=[self.bedtemps[i]+" ("+i+")" for i in sorted(self.bedtemps.keys(),key=lambda x:self.bedtemps[x])]
if self.settings.last_bed_temperature not in map(float,self.bedtemps.values()):
btemp_choices = [str(self.settings.last_bed_temperature)] + btemp_choices
@ -486,7 +496,7 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
choices=btemp_choices,style=wx.CB_DROPDOWN, size=(90,25),pos=(45,367))
self.btemp.SetValue("0")
lls.Add(self.btemp,pos=(12,1),span=(1,3))
self.setbbtn=wx.Button(self.panel,-1,"Set",size=(38,-1),pos=(135,365))
self.setbbtn=wx.Button(self.panel,-1,_("Set"),size=(38,-1),pos=(135,365))
self.setbbtn.Bind(wx.EVT_BUTTON,self.do_bedtemp)
self.printerControls.append(self.setbbtn)
lls.Add(self.setbbtn,pos=(12,4),span=(1,2))
@ -497,21 +507,27 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
self.edist.SetBackgroundColour((225,200,200))
self.edist.SetForegroundColour("black")
lls.Add(self.edist,pos=(13,3),span=(1,2))
lls.Add(wx.StaticText(self.panel,-1,"mm",pos=(130,407)),pos=(13,5),span=(1,2))
lls.Add(wx.StaticText(self.panel,-1,_("mm"),pos=(130,407)),pos=(13,5),span=(1,2))
self.efeedc=wx.SpinCtrl(self.panel,-1,str(self.settings.e_feedrate),min=0,max=50000,size=(60,25),pos=(70,397+28))
self.efeedc.SetBackgroundColour((225,200,200))
self.efeedc.SetForegroundColour("black")
self.efeedc.Bind(wx.EVT_SPINCTRL,self.setfeeds)
lls.Add(self.efeedc,pos=(14,3),span=(1,2))
lls.Add(wx.StaticText(self.panel,-1,"mm/min",pos=(130,407+27)),pos=(14,5),span=(1,2))
lls.Add(wx.StaticText(self.panel,-1,_("mm/min"),pos=(130,407+27)),pos=(14,5),span=(1,2))
self.xyfeedc.Bind(wx.EVT_SPINCTRL,self.setfeeds)
self.zfeedc.Bind(wx.EVT_SPINCTRL,self.setfeeds)
self.zfeedc.SetBackgroundColour((180,255,180))
self.zfeedc.SetForegroundColour("black")
lls.Add((10,0),pos=(0,11),span=(1,1))
self.gviz=gviz.gviz(self.panel,(300,300),(200,200))
self.gviz=gviz.gviz(self.panel,(300,300),
bedsize=(self.settings.bed_size_x,self.settings.bed_size_y),
grid=(self.settings.preview_grid_step1,self.settings.preview_grid_step2),
extrusion_width=self.settings.preview_extrusion_width)
self.gviz.showall=1
self.gwindow=gviz.window([])
self.gwindow=gviz.window([],
bedsize=(self.settings.bed_size_x,self.settings.bed_size_y),
grid=(self.settings.preview_grid_step1,self.settings.preview_grid_step2),
extrusion_width=self.settings.preview_extrusion_width)
self.gviz.Bind(wx.EVT_LEFT_DOWN,self.showwin)
self.gwindow.Bind(wx.EVT_CLOSE,lambda x:self.gwindow.Hide())
cs=self.centersizer=wx.GridBagSizer()
@ -530,7 +546,7 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
self.topsizer.Add(self.lowersizer)
self.panel.SetSizer(self.topsizer)
self.status=self.CreateStatusBar()
self.status.SetStatusText("Not connected to printer.")
self.status.SetStatusText(_("Not connected to printer."))
self.panel.Bind(wx.EVT_MOUSE_EVENTS,self.editbutton)
self.Bind(wx.EVT_CLOSE, self.kill)
self.topsizer.Layout()
@ -571,14 +587,14 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
self.topsizer.Fit(self)
#self.SetSize(winsize)
wx.CallAfter(self.minibtn.SetLabel, "Mini mode")
wx.CallAfter(self.minibtn.SetLabel, _("Mini mode"))
else:
self.mini=True
self.uppersizer.Fit(self)
#self.SetSize(winssize)
wx.CallAfter(self.minibtn.SetLabel, "Full mode")
wx.CallAfter(self.minibtn.SetLabel, _("Full mode"))
def cbuttons_reload(self):
allcbs = []
@ -616,7 +632,7 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
self.topsizer.Layout()
def help_button(self):
print 'Defines custom button. Usage: button <num> "title" [/c "colour"] command'
print _('Defines custom button. Usage: button <num> "title" [/c "colour"] command')
def do_button(self,argstr):
def nextarg(rest):
@ -638,7 +654,7 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
pass
command=argstr.strip()
if num<0 or num>=64:
print "Custom button number should be between 0 and 63"
print _("Custom button number should be between 0 and 63")
return
while num >= len(self.custombuttons):
self.custombuttons+=[None]
@ -728,19 +744,19 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
popupmenu = wx.Menu()
obj = e.GetEventObject()
if hasattr(obj,"custombutton"):
item = popupmenu.Append(-1,"Edit custom button '%s'" % e.GetEventObject().GetLabelText())
item = popupmenu.Append(-1,_("Edit custom button '%s'") % e.GetEventObject().GetLabelText())
self.Bind(wx.EVT_MENU,lambda e,button=e.GetEventObject():self.cbutton_edit(e,button),item)
item = popupmenu.Append(-1,"Move left <<")
item = popupmenu.Append(-1,_("Move left <<"))
self.Bind(wx.EVT_MENU,lambda e,button=e.GetEventObject():self.cbutton_order(e,button,-1),item)
if obj.custombutton == 0: item.Enable(False)
item = popupmenu.Append(-1,"Move right >>")
item = popupmenu.Append(-1,_("Move right >>"))
self.Bind(wx.EVT_MENU,lambda e,button=e.GetEventObject():self.cbutton_order(e,button,1),item)
if obj.custombutton == 63: item.Enable(False)
pos = self.panel.ScreenToClient(e.GetEventObject().ClientToScreen(pos))
item = popupmenu.Append(-1,"Remove custom button '%s'" % e.GetEventObject().GetLabelText())
item = popupmenu.Append(-1,_("Remove custom button '%s'") % e.GetEventObject().GetLabelText())
self.Bind(wx.EVT_MENU,lambda e,button=e.GetEventObject():self.cbutton_remove(e,button),item)
else:
item = popupmenu.Append(-1,"Add custom button")
item = popupmenu.Append(-1,_("Add custom button"))
self.Bind(wx.EVT_MENU,self.cbutton_edit,item)
self.panel.PopupMenu(popupmenu, pos)
else:
@ -755,7 +771,7 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
self.onecmd(e.GetEventObject().properties[1])
self.cur_button=None
except:
print "event object missing"
print _("event object missing")
self.cur_button=None
raise
@ -783,12 +799,12 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
self.monitor_interval=float(l)
self.monitorbox.SetValue(self.monitor_interval>0)
except:
print "Invalid period given."
print _("Invalid period given.")
self.setmonitor(None)
if self.monitor:
print "Monitoring printer."
print _("Monitoring printer.")
else:
print "Done monitoring."
print _("Done monitoring.")
def setmonitor(self,e):
@ -807,17 +823,17 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
while(self.statuscheck):
string=""
if(self.p.online):
string+="Printer is online. "
string+=_("Printer is online. ")
try:
string+="Loaded "+os.path.split(self.filename)[1]+" "
string+=_("Loaded ")+os.path.split(self.filename)[1]+" "
except:
pass
string+=(self.tempreport.replace("\r","").replace("T","Hotend").replace("B","Bed").replace("\n","").replace("ok ",""))+" "
string+=(self.tempreport.replace("\r","").replace("T",_("Hotend")).replace("B",_("Bed")).replace("\n","").replace("ok ",""))+" "
wx.CallAfter(self.tempdisp.SetLabel,self.tempreport.strip().replace("ok ",""))
if self.sdprinting:
string+= " SD printing:%04.2f %%"%(self.percentdone,)
string+= _(" SD printing:%04.2f %%") % (self.percentdone,)
if self.p.printing:
string+= " Printing:%04.2f %%"%(100*float(self.p.queueindex)/len(self.p.mainqueue),)
string+= _(" Printing:%04.2f %%") % (100*float(self.p.queueindex)/len(self.p.mainqueue),)
wx.CallAfter(self.status.SetStatusText,string)
wx.CallAfter(self.gviz.Refresh)
if(self.monitor and self.p.online):
@ -825,7 +841,7 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
self.p.send_now("M27")
self.p.send_now("M105")
time.sleep(self.monitor_interval)
wx.CallAfter(self.status.SetStatusText,"Not connected to printer.")
wx.CallAfter(self.status.SetStatusText,_("Not connected to printer."))
except:
pass #if window has been closed
def capture(self, func, *args, **kwargs):
@ -871,13 +887,13 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
def waitforsdresponse(self,l):
if "file.open failed" in l:
wx.CallAfter(self.status.SetStatusText,"Opening file failed.")
wx.CallAfter(self.status.SetStatusText,_("Opening file failed."))
self.recvlisteners.remove(self.waitforsdresponse)
return
if "File opened" in l:
wx.CallAfter(self.status.SetStatusText,l)
if "File selected" in l:
wx.CallAfter(self.status.SetStatusText,"Starting print")
wx.CallAfter(self.status.SetStatusText,_("Starting print"))
self.sdprinting=1
self.p.send_now("M24")
self.startcb()
@ -900,7 +916,7 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
def filesloaded(self):
dlg=wx.SingleChoiceDialog(self, "Select the file to print", "Pick SD file", self.sdfiles)
dlg=wx.SingleChoiceDialog(self, _("Select the file to print"), _("Pick SD file"), self.sdfiles)
if(dlg.ShowModal()==wx.ID_OK):
target=dlg.GetStringSelection()
if len(target):
@ -928,14 +944,14 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
#print len(self.cout.getvalue().split())
self.stopsf=1
except:
print "Skeinforge execution failed."
print _("Skeinforge execution failed.")
self.stopsf=1
traceback.print_exc(file=sys.stdout)
def skein_monitor(self):
while(not self.stopsf):
try:
wx.CallAfter(self.status.SetStatusText,"Skeining...")#+self.cout.getvalue().split("\n")[-1])
wx.CallAfter(self.status.SetStatusText,_("Skeining..."))#+self.cout.getvalue().split("\n")[-1])
except:
pass
time.sleep(0.1)
@ -948,18 +964,18 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
if self.p.online:
wx.CallAfter(self.printbtn.Enable)
wx.CallAfter(self.status.SetStatusText,"Loaded "+self.filename+", %d lines"%(len(self.f),))
wx.CallAfter(self.status.SetStatusText,_("Loaded ")+self.filename+_(", %d lines") % (len(self.f),))
wx.CallAfter(self.pausebtn.Disable)
wx.CallAfter(self.printbtn.SetLabel,"Print")
wx.CallAfter(self.printbtn.SetLabel,_("Print"))
threading.Thread(target=self.loadviz).start()
except:
self.filename=fn
def skein(self,filename):
print "Skeining "+filename
print _("Skeining ") + filename
if not os.path.exists("skeinforge"):
print "Skeinforge not found. \nPlease copy Skeinforge into a directory named \"skeinforge\" in the same directory as this file."
print _("Skeinforge not found. \nPlease copy Skeinforge into a directory named \"skeinforge\" in the same directory as this file.")
return
if not os.path.exists("skeinforge/__init__.py"):
f=open("skeinforge/__init__.py","w")
@ -978,15 +994,15 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
basedir=os.path.split(self.filename)[0]
except:
pass
dlg=wx.FileDialog(self,"Open file to print",basedir,style=wx.FD_OPEN|wx.FD_FILE_MUST_EXIST)
dlg.SetWildcard("STL and GCODE files (;*.gcode;*.g;*.stl;*.STL;)")
dlg=wx.FileDialog(self,_("Open file to print"),basedir,style=wx.FD_OPEN|wx.FD_FILE_MUST_EXIST)
dlg.SetWildcard(_("STL and GCODE files (;*.gcode;*.g;*.stl;*.STL;)"))
if(filename is not None or dlg.ShowModal() == wx.ID_OK):
if filename is not None:
name=filename
else:
name=dlg.GetPath()
if not(os.path.exists(name)):
self.status.SetStatusText("File not found!")
self.status.SetStatusText(_("File not found!"))
return
path = os.path.split(name)[0]
if path != self.settings.last_file_path:
@ -998,16 +1014,16 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
of=open(self.filename)
self.f=[i.replace("\n","").replace("\r","") for i in of]
of.close
self.status.SetStatusText("Loaded "+name+", %d lines"%(len(self.f),))
wx.CallAfter(self.printbtn.SetLabel, "Print")
wx.CallAfter(self.pausebtn.SetLabel, "Pause")
self.status.SetStatusText(_("Loaded ") + name + _(", %d lines") % (len(self.f),))
wx.CallAfter(self.printbtn.SetLabel, _("Print"))
wx.CallAfter(self.pausebtn.SetLabel, _("Pause"))
wx.CallAfter(self.pausebtn.Disable)
if self.p.online:
wx.CallAfter(self.printbtn.Enable)
threading.Thread(target=self.loadviz).start()
def loadviz(self):
print pronsole.totalelength(self.f),"mm of filament used in this print"
print pronsole.totalelength(self.f), _("mm of filament used in this print")
self.gviz.clear()
self.gwindow.p.clear()
for i in self.f:
@ -1027,22 +1043,22 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
return
if self.f is None or not len(self.f):
wx.CallAfter(self.status.SetStatusText,"No file loaded. Please use load first.")
wx.CallAfter(self.status.SetStatusText, _("No file loaded. Please use load first."))
return
if not self.p.online:
wx.CallAfter(self.status.SetStatusText,"Not connected to printer.")
wx.CallAfter(self.status.SetStatusText,_("Not connected to printer."))
return
self.on_startprint()
self.p.startprint(self.f)
def on_startprint(self):
wx.CallAfter(self.pausebtn.SetLabel, "Pause")
wx.CallAfter(self.pausebtn.SetLabel, _("Pause"))
wx.CallAfter(self.pausebtn.Enable)
wx.CallAfter(self.printbtn.SetLabel, "Restart")
wx.CallAfter(self.printbtn.SetLabel, _("Restart"))
def endupload(self):
self.p.send_now("M29 ")
wx.CallAfter(self.status.SetStatusText,"File upload complete")
wx.CallAfter(self.status.SetStatusText, _("File upload complete"))
time.sleep(0.5)
self.p.clear=True
self.uploading=False
@ -1061,7 +1077,7 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
return
if not self.p.online:
return
dlg=wx.TextEntryDialog(self,"Enter a target filename in 8.3 format:","Pick SD filename",dosify(self.filename))
dlg=wx.TextEntryDialog(self, ("Enter a target filename in 8.3 format:"), _("Pick SD filename") ,dosify(self.filename))
if dlg.ShowModal()==wx.ID_OK:
self.p.send_now("M28 "+str(dlg.GetValue()))
self.recvlisteners+=[self.uploadtrigger]
@ -1077,14 +1093,14 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
return
self.p.pause()
self.paused=True
wx.CallAfter(self.pausebtn.SetLabel, "Resume")
wx.CallAfter(self.pausebtn.SetLabel, _("Resume"))
else:
self.paused=False
if self.sdprinting:
self.p.send_now("M24")
else:
self.p.resume()
wx.CallAfter(self.pausebtn.SetLabel, "Pause")
wx.CallAfter(self.pausebtn.SetLabel, _("Pause"))
def sdprintfile(self,event):
@ -1108,8 +1124,8 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
if self.paused:
self.p.paused=0
self.p.printing=0
wx.CallAfter(self.pausebtn.SetLabel, "Pause")
wx.CallAfter(self.printbtn.SetLabel, "Print")
wx.CallAfter(self.pausebtn.SetLabel, _("Pause"))
wx.CallAfter(self.printbtn.SetLabel, _("Print"))
self.paused=0
if self.sdprinting:
self.p.send_now("M26 S0")
@ -1135,22 +1151,22 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
if self.paused:
self.p.paused=0
self.p.printing=0
wx.CallAfter(self.pausebtn.SetLabel, "Pause")
wx.CallAfter(self.printbtn.SetLabel, "Print")
wx.CallAfter(self.pausebtn.SetLabel, _("Pause"))
wx.CallAfter(self.printbtn.SetLabel, _("Print"))
self.paused=0
if self.sdprinting:
self.p.send_now("M26 S0")
def reset(self,event):
dlg=wx.MessageDialog(self,"Are you sure you want to reset the printer?","Reset?",wx.YES|wx.NO)
dlg=wx.MessageDialog(self, _("Are you sure you want to reset the printer?"), _("Reset?"), wx.YES|wx.NO)
if dlg.ShowModal()==wx.ID_YES:
self.p.reset()
if self.paused:
self.p.paused=0
self.p.printing=0
wx.CallAfter(self.pausebtn.SetLabel, "Pause")
wx.CallAfter(self.printbtn.SetLabel, "Print")
wx.CallAfter(self.pausebtn.SetLabel, _("Pause"))
wx.CallAfter(self.printbtn.SetLabel, _("Print"))
self.paused=0
class macroed(wx.Dialog):
@ -1168,11 +1184,11 @@ class macroed(wx.Dialog):
title = wx.StaticText(self.panel,-1,title%macro_name)
title.SetFont(wx.Font(11,wx.NORMAL,wx.NORMAL,wx.BOLD))
titlesizer.Add(title,1)
self.okb = wx.Button(self.panel,-1,"Save")
self.okb.Bind(wx.EVT_BUTTON,self.save)
self.okb = wx.Button(self.panel, -1, ("Save"))
self.okb.Bind(wx.EVT_BUTTON, self.save)
titlesizer.Add(self.okb)
self.cancelb = wx.Button(self.panel,-1,"Cancel")
self.cancelb.Bind(wx.EVT_BUTTON,self.close)
self.cancelb = wx.Button(self.panel, -1, ("Cancel"))
self.cancelb.Bind(wx.EVT_BUTTON, self.close)
titlesizer.Add(self.cancelb)
topsizer=wx.BoxSizer(wx.VERTICAL)
topsizer.Add(titlesizer,0,wx.EXPAND)
@ -1222,9 +1238,9 @@ class macroed(wx.Dialog):
class options(wx.Dialog):
"""Options editor"""
def __init__(self,pronterface):
wx.Dialog.__init__(self,None,title="Edit settings")
wx.Dialog.__init__(self, None, title=_("Edit settings"))
topsizer=wx.BoxSizer(wx.VERTICAL)
vbox=wx.StaticBoxSizer(wx.StaticBox(self,label="Defaults"),wx.VERTICAL)
vbox=wx.StaticBoxSizer(wx.StaticBox(self, label=_("Defaults")) ,wx.VERTICAL)
topsizer.Add(vbox,1,wx.ALL+wx.EXPAND)
grid=wx.GridSizer(rows=0,cols=2,hgap=8,vgap=2)
vbox.Add(grid,0,wx.EXPAND)
@ -1246,7 +1262,7 @@ class options(wx.Dialog):
class ButtonEdit(wx.Dialog):
"""Custom button edit dialog"""
def __init__(self,pronterface):
wx.Dialog.__init__(self,None,title="Custom button",style=wx.DEFAULT_DIALOG_STYLE|wx.RESIZE_BORDER)
wx.Dialog.__init__(self, None, title=_("Custom button"),style=wx.DEFAULT_DIALOG_STYLE|wx.RESIZE_BORDER)
self.pronterface=pronterface
topsizer=wx.BoxSizer(wx.VERTICAL)
vbox=wx.StaticBoxSizer(wx.StaticBox(self,label=""),wx.VERTICAL)
@ -1254,10 +1270,10 @@ class ButtonEdit(wx.Dialog):
grid=wx.FlexGridSizer(rows=0,cols=2,hgap=4,vgap=2)
grid.AddGrowableCol(1,1)
vbox.Add(grid,0,wx.EXPAND)
grid.Add(wx.StaticText(self,-1,"Button title"),0,wx.BOTTOM+wx.RIGHT)
grid.Add(wx.StaticText(self,-1, _("Button title")), 0, wx.BOTTOM+wx.RIGHT)
self.name=wx.TextCtrl(self,-1,"")
grid.Add(self.name,1,wx.EXPAND)
grid.Add(wx.StaticText(self,-1,"Command"),0,wx.BOTTOM+wx.RIGHT)
grid.Add(wx.StaticText(self, -1, _("Command")), 0, wx.BOTTOM+wx.RIGHT)
self.command=wx.TextCtrl(self,-1,"")
xbox=wx.BoxSizer(wx.HORIZONTAL)
xbox.Add(self.command,1,wx.EXPAND)
@ -1266,7 +1282,7 @@ class ButtonEdit(wx.Dialog):
self.macrob.Bind(wx.EVT_BUTTON,self.macrob_handler)
xbox.Add(self.macrob,0)
grid.Add(xbox)
grid.Add(wx.StaticText(self,-1,"Color"),0,wx.BOTTOM+wx.RIGHT)
grid.Add(wx.StaticText(self,-1, _("Color")),0,wx.BOTTOM+wx.RIGHT)
self.color=wx.TextCtrl(self,-1,"")
grid.Add(self.color,1,wx.EXPAND)
topsizer.Add(self.CreateSeparatedButtonSizer(wx.OK+wx.CANCEL),0,wx.EXPAND)