Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
P
Printrun
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
machinery
Printrun
Commits
1e91e807
Commit
1e91e807
authored
Sep 06, 2011
by
Cyril Laguilhon-Debat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removing Tab chars, adding "Clear" button, and resizing translations
parent
b03443cc
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
12 deletions
+28
-12
fr.po
locale/fr/LC_MESSAGES/fr.po
+7
-3
pronterface.mo
locale/fr/LC_MESSAGES/pronterface.mo
+0
-0
pronterface.py
pronterface.py
+21
-9
No files found.
locale/fr/LC_MESSAGES/fr.po
View file @
1e91e807
...
@@ -343,11 +343,11 @@ msgstr "Charger un fichier"
...
@@ -343,11 +343,11 @@ msgstr "Charger un fichier"
#: pronterface.py:426
#: pronterface.py:426
msgid "SD Upload"
msgid "SD Upload"
msgstr "Copier sur
la carte
SD"
msgstr "Copier sur SD"
#: pronterface.py:430
#: pronterface.py:430
msgid "SD Print"
msgid "SD Print"
msgstr "Imprimer depuis
la carte
SD"
msgstr "Imprimer depuis SD"
#: pronterface.py:438
#: pronterface.py:438
#: pronterface.py:1021
#: pronterface.py:1021
...
@@ -359,10 +359,14 @@ msgstr "Imprimer depuis la carte SD"
...
@@ -359,10 +359,14 @@ msgstr "Imprimer depuis la carte SD"
msgid "Pause"
msgid "Pause"
msgstr "Pause"
msgstr "Pause"
#: pronterface.py:45
2
#: pronterface.py:45
8
msgid "Send"
msgid "Send"
msgstr "Envoyer"
msgstr "Envoyer"
#: pronterface.py:462
msgid "Clear"
msgstr "Effacer"
#: pronterface.py:460
#: pronterface.py:460
#: pronterface.py:518
#: pronterface.py:518
msgid "mm/min"
msgid "mm/min"
...
...
locale/fr/LC_MESSAGES/pronterface.mo
View file @
1e91e807
No preview for this file type
pronterface.py
View file @
1e91e807
#!/usr/bin/env python
#!/usr/bin/env python
# Set up Internationalization using gettext
# Set up Internationalization using gettext
import
gettext
# searching for installed locales on /usr/share; uses relative folder if not found (windows)
gettext
.
install
(
'pronterface'
,
'./locale'
,
unicode
=
1
)
import
os
,
gettext
if
os
.
path
.
exists
(
'/usr/share/pronterface/locale'
):
gettext
.
install
(
'pronterface'
,
'/usr/share/pronterface/locale'
,
unicode
=
1
)
else
:
gettext
.
install
(
'pronterface'
,
'./locale'
,
unicode
=
1
)
try
:
try
:
import
wx
import
wx
except
:
except
:
print
_
(
"WX is not installed. This program requires WX to run."
)
print
_
(
"WX is not installed. This program requires WX to run."
)
raise
raise
import
printcore
,
os
,
sys
,
glob
,
time
,
threading
,
traceback
,
StringIO
,
gviz
,
traceback
,
cStringIO
import
printcore
,
sys
,
glob
,
time
,
threading
,
traceback
,
StringIO
,
gviz
,
traceback
,
cStringIO
try
:
try
:
os
.
chdir
(
os
.
path
.
split
(
__file__
)[
0
])
os
.
chdir
(
os
.
path
.
split
(
__file__
)[
0
])
except
:
except
:
...
@@ -273,19 +278,20 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
...
@@ -273,19 +278,20 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
def
popmenu
(
self
):
def
popmenu
(
self
):
self
.
menustrip
=
wx
.
MenuBar
()
self
.
menustrip
=
wx
.
MenuBar
()
# File menu
# File menu
m
=
wx
.
Menu
()
m
=
wx
.
Menu
()
self
.
Bind
(
wx
.
EVT_MENU
,
self
.
loadfile
,
m
.
Append
(
-
1
,
_
(
"&Open..."
),
_
(
" Opens 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"
)))
self
.
Bind
(
wx
.
EVT_MENU
,
self
.
do_editgcode
,
m
.
Append
(
-
1
,
_
(
"&Edit..."
),
_
(
" Edit open file"
)))
self
.
Bind
(
wx
.
EVT_MENU
,
self
.
OnExit
,
m
.
Append
(
wx
.
ID_EXIT
,
_
(
"E&xit"
),
_
(
" Closes the Window"
)))
self
.
Bind
(
wx
.
EVT_MENU
,
self
.
OnExit
,
m
.
Append
(
wx
.
ID_EXIT
,
_
(
"E&xit"
),
_
(
" Closes the Window"
)))
self
.
menustrip
.
Append
(
m
,
_
(
"&File"
))
self
.
menustrip
.
Append
(
m
,
_
(
"&File"
))
# Settings menu
# Settings menu
m
=
wx
.
Menu
()
m
=
wx
.
Menu
()
self
.
macros_menu
=
wx
.
Menu
()
self
.
macros_menu
=
wx
.
Menu
()
m
.
AppendSubMenu
(
self
.
macros_menu
,
_
(
"&Macros"
))
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
,
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
.
Bind
(
wx
.
EVT_MENU
,
lambda
*
e
:
options
(
self
),
m
.
Append
(
-
1
,
_
(
"&Options"
),
_
(
" Options dialog"
)))
if
sys
.
platform
!=
'darwin'
:
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
:
try
:
from
SkeinforgeQuickEditDialog
import
SkeinforgeQuickEditDialog
from
SkeinforgeQuickEditDialog
import
SkeinforgeQuickEditDialog
...
@@ -445,14 +451,17 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
...
@@ -445,14 +451,17 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
self
.
logbox
.
SetEditable
(
0
)
self
.
logbox
.
SetEditable
(
0
)
lrs
.
Add
(
self
.
logbox
)
lrs
.
Add
(
self
.
logbox
)
lbrs
=
wx
.
BoxSizer
(
wx
.
HORIZONTAL
)
lbrs
=
wx
.
BoxSizer
(
wx
.
HORIZONTAL
)
self
.
commandbox
=
wx
.
TextCtrl
(
self
.
panel
,
size
=
(
2
5
0
,
30
),
pos
=
(
440
,
420
),
style
=
wx
.
TE_PROCESS_ENTER
)
self
.
commandbox
=
wx
.
TextCtrl
(
self
.
panel
,
size
=
(
2
4
0
,
30
),
pos
=
(
440
,
420
),
style
=
wx
.
TE_PROCESS_ENTER
)
self
.
commandbox
.
Bind
(
wx
.
EVT_TEXT_ENTER
,
self
.
sendline
)
self
.
commandbox
.
Bind
(
wx
.
EVT_TEXT_ENTER
,
self
.
sendline
)
#self.printerControls.append(self.commandbox)
#self.printerControls.append(self.commandbox)
lbrs
.
Add
(
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"
),
size
=
(
55
,
28
),
pos
=
(
700
,
420
))
self
.
sendbtn
.
Bind
(
wx
.
EVT_BUTTON
,
self
.
sendline
)
self
.
sendbtn
.
Bind
(
wx
.
EVT_BUTTON
,
self
.
sendline
)
#self.printerControls.append(self.sendbtn)
#self.printerControls.append(self.sendbtn)
lbrs
.
Add
(
self
.
sendbtn
)
lbrs
.
Add
(
self
.
sendbtn
)
self
.
clearbtn
=
wx
.
Button
(
self
.
panel
,
-
1
,
_
(
"Clear"
),
size
=
(
55
,
28
),
pos
=
(
750
,
420
))
self
.
clearbtn
.
Bind
(
wx
.
EVT_BUTTON
,
self
.
clearOutput
)
lbrs
.
Add
(
self
.
clearbtn
)
lrs
.
Add
(
lbrs
)
lrs
.
Add
(
lbrs
)
#left pane
#left pane
...
@@ -819,6 +828,9 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
...
@@ -819,6 +828,9 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
wx
.
CallAfter
(
self
.
logbox
.
AppendText
,
">>>"
+
command
+
"
\n
"
)
wx
.
CallAfter
(
self
.
logbox
.
AppendText
,
">>>"
+
command
+
"
\n
"
)
self
.
onecmd
(
str
(
command
))
self
.
onecmd
(
str
(
command
))
self
.
commandbox
.
SetSelection
(
0
,
len
(
command
))
self
.
commandbox
.
SetSelection
(
0
,
len
(
command
))
def
clearOutput
(
self
,
e
):
self
.
logbox
.
Clear
()
def
statuschecker
(
self
):
def
statuschecker
(
self
):
try
:
try
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment