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
2afaf4c6
Commit
2afaf4c6
authored
Feb 26, 2012
by
Guillaume Seguin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use format strings as much as possible for translations
parent
9a20974d
Changes
2
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
166 additions
and
247 deletions
+166
-247
pronterface.pot
locale/pronterface.pot
+156
-236
pronterface.py
pronterface.py
+10
-11
No files found.
locale/pronterface.pot
View file @
2afaf4c6
This diff is collapsed.
Click to expand it.
pronterface.py
View file @
2afaf4c6
...
...
@@ -224,7 +224,7 @@ 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."
)
%
f
self
.
hsetpoint
=
f
self
.
hottgauge
.
SetTarget
(
int
(
f
))
if
f
>
0
:
...
...
@@ -260,7 +260,7 @@ 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."
)
%
f
self
.
bsetpoint
=
f
self
.
bedtgauge
.
SetTarget
(
int
(
f
))
if
f
>
0
:
...
...
@@ -408,7 +408,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 '
%
s' is being used by built-in command"
)
%
macro
return
elif
len
([
c
for
c
in
macro
if
not
c
.
isalnum
()
and
c
!=
"_"
]):
print
_
(
"Macro name may contain only alphanumeric symbols and underscores"
)
...
...
@@ -1170,14 +1170,13 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
if
self
.
p
.
printing
:
fractioncomplete
=
float
(
self
.
p
.
queueindex
)
/
len
(
self
.
p
.
mainqueue
)
string
+=
_
(
" Printing:
%04.2
f
%%
|"
)
%
(
100
*
float
(
self
.
p
.
queueindex
)
/
len
(
self
.
p
.
mainqueue
),)
string
+=
_
(
" Line#
"
)
+
str
(
self
.
p
.
queueindex
)
+
_
(
"of "
)
+
str
(
len
(
self
.
p
.
mainqueue
))
+
_
(
" lines |"
)
string
+=
_
(
" Line#
%
d of
%
d lines |"
)
%
(
self
.
p
.
queueindex
,
len
(
self
.
p
.
mainqueue
)
)
if
fractioncomplete
>
0.0
:
secondselapsed
=
int
(
time
.
time
()
-
self
.
starttime
)
secondsestimate
=
secondselapsed
/
fractioncomplete
secondsremain
=
secondsestimate
-
secondselapsed
string
+=
_
(
" Est: "
)
+
time
.
strftime
(
'
%
H:
%
M:
%
S'
,
time
.
gmtime
(
secondsremain
))
string
+=
_
(
" of: "
)
+
time
.
strftime
(
'
%
H:
%
M:
%
S'
,
time
.
gmtime
(
secondsestimate
))
string
+=
_
(
" Remaining | "
)
string
+=
_
(
" Est:
%
s of
%
s remaining | "
)
%
(
time
.
strftime
(
'
%
H:
%
M:
%
S'
,
time
.
gmtime
(
secondsremain
)),
time
.
strftime
(
'
%
H:
%
M:
%
S'
,
time
.
gmtime
(
secondsestimate
)))
string
+=
_
(
" Z:
%0.2
f mm"
)
%
self
.
curlayer
wx
.
CallAfter
(
self
.
status
.
SetStatusText
,
string
)
wx
.
CallAfter
(
self
.
gviz
.
Refresh
)
...
...
@@ -1384,7 +1383,7 @@ 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
),
))
self
.
status
.
SetStatusText
(
_
(
"Loaded
%
s,
%
d lines"
)
%
(
name
,
len
(
self
.
f
)
))
wx
.
CallAfter
(
self
.
printbtn
.
SetLabel
,
_
(
"Print"
))
wx
.
CallAfter
(
self
.
pausebtn
.
SetLabel
,
_
(
"Pause"
))
wx
.
CallAfter
(
self
.
pausebtn
.
Disable
)
...
...
@@ -1395,9 +1394,9 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
def
loadviz
(
self
):
Xtot
,
Ytot
,
Ztot
,
Xmin
,
Xmax
,
Ymin
,
Ymax
,
Zmin
,
Zmax
=
pronsole
.
measurements
(
self
.
f
)
print
pronsole
.
totalelength
(
self
.
f
),
_
(
"mm of filament used in this print
\n
"
)
print
_
(
"the print goes from
"
),
Xmin
,
_
(
"mm to"
),
Xmax
,
_
(
"mm in X
\n
and is"
),
Xtot
,
_
(
"mm wide
\n
"
)
print
_
(
"the print goes from
"
),
Ymin
,
_
(
"mm to"
),
Ymax
,
_
(
"mm in Y
\n
and is"
),
Ytot
,
_
(
"mm wide
\n
"
)
print
_
(
"the print goes from
"
),
Zmin
,
_
(
"mm to"
),
Zmax
,
_
(
"mm in Z
\n
and is"
),
Ztot
,
_
(
"mm high
\n
"
)
print
_
(
"the print goes from
%
f mm to
%
f mm in X
\n
and is
%
f mm wide
\n
"
)
%
(
Xmin
,
Xmax
,
Xtot
)
print
_
(
"the print goes from
%
f mm to
%
f mm in Y
\n
and is
%
f mm wide
\n
"
)
%
(
Ymin
,
Ymax
,
Ytot
)
print
_
(
"the print goes from
%
f mm to
%
f mm in Z
\n
and is
%
f mm high
\n
"
)
%
(
Zmin
,
Zmax
,
Ztot
)
print
_
(
"Estimated duration (pessimistic): "
),
pronsole
.
estimate_duration
(
self
.
f
)
#import time
#t0=time.time()
...
...
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