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
09a4bfac
Commit
09a4bfac
authored
Jan 09, 2012
by
Christian Metzen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
i18n for plater.py, including german translation
parent
824a5f17
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
210 additions
and
19 deletions
+210
-19
plater.mo
locale/de/LC_MESSAGES/plater.mo
+0
-0
plater.po
locale/de/LC_MESSAGES/plater.po
+89
-0
plater.pot
locale/plater.pot
+93
-0
plater.py
plater.py
+28
-19
No files found.
locale/de/LC_MESSAGES/plater.mo
0 → 100644
View file @
09a4bfac
File added
locale/de/LC_MESSAGES/plater.po
0 → 100644
View file @
09a4bfac
msgid ""
msgstr ""
"Project-Id-Version: Plater\n"
"POT-Creation-Date: 2012-01-09 15:07+CET\n"
"PO-Revision-Date: \n"
"Last-Translator: Christian Metzen <metzench@ccux-linux.de>\n"
"Language-Team: <LL@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Poedit-Language: German\n"
"X-Poedit-Country: GERMANY\n"
#: plater.py:223
msgid "Plate building tool"
msgstr "Plate building tool"
#: plater.py:229
msgid "Clear"
msgstr "Löschen"
#: plater.py:230
msgid "Load"
msgstr "Laden"
#: plater.py:232
msgid "Export"
msgstr "Exportieren"
#: plater.py:235
msgid "Done"
msgstr "Fertig"
#: plater.py:237
msgid "Cancel"
msgstr "Abbrechen"
#: plater.py:239
msgid "Snap to Z = 0"
msgstr "Einrasten auf Z = 0"
#: plater.py:240
msgid "Put at 100, 100"
msgstr "Auf 100, 100 setzen"
#: plater.py:241
msgid "Delete"
msgstr "Löschen"
#: plater.py:242
msgid "Auto"
msgstr "Auto"
#: plater.py:266
msgid "Autoplating"
msgstr "Autoplating"
#: plater.py:294
msgid "Bed full, sorry sir :("
msgstr "Das Druckbett ist voll! Sorry."
#: plater.py:304
msgid "Are you sure you want to clear the grid? All unsaved changes will be lost."
msgstr "Bist du sicher dass du das Raster leeren willst? Alle ungesicherten Änderungen gehen verloren."
#: plater.py:304
msgid "Clear the grid?"
msgstr "Raster leeren?"
#: plater.py:346
msgid "Pick file to save to"
msgstr "Wähle die zu sichernde Datei"
#: plater.py:347
msgid "STL files (;*.stl;)"
msgstr "STL Dateien (;*.stl;)"
#: plater.py:367
msgid "wrote "
msgstr "geschrieben"
#: plater.py:370
msgid "Pick file to load"
msgstr "Wähle die zu ladende Datei"
#: plater.py:371
msgid "STL files (;*.stl;)|*.stl|OpenSCAD files (;*.scad;)|*.scad"
msgstr "STL Dateien (;*.stl;)|*.stl|OpenSCAD Dateien (;*.scad;)|*.scad"
locale/plater.pot
0 → 100644
View file @
09a4bfac
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR ORGANIZATION
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"POT-Creation-Date: 2012-01-09 15:07+CET\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: ENCODING\n"
"Generated-By: pygettext.py 1.5\n"
#: plater.py:223
msgid "Plate building tool"
msgstr ""
#: plater.py:229
msgid "Clear"
msgstr ""
#: plater.py:230
msgid "Load"
msgstr ""
#: plater.py:232
msgid "Export"
msgstr ""
#: plater.py:235
msgid "Done"
msgstr ""
#: plater.py:237
msgid "Cancel"
msgstr ""
#: plater.py:239
msgid "Snap to Z = 0"
msgstr ""
#: plater.py:240
msgid "Put at 100, 100"
msgstr ""
#: plater.py:241
msgid "Delete"
msgstr ""
#: plater.py:242
msgid "Auto"
msgstr ""
#: plater.py:266
msgid "Autoplating"
msgstr ""
#: plater.py:294
msgid "Bed full, sorry sir :("
msgstr ""
#: plater.py:304
msgid "Are you sure you want to clear the grid? All unsaved changes will be lost."
msgstr ""
#: plater.py:304
msgid "Clear the grid?"
msgstr ""
#: plater.py:346
msgid "Pick file to save to"
msgstr ""
#: plater.py:347
msgid "STL files (;*.stl;)"
msgstr ""
#: plater.py:367
msgid "wrote "
msgstr ""
#: plater.py:370
msgid "Pick file to load"
msgstr ""
#: plater.py:371
msgid "STL files (;*.stl;)|*.stl|OpenSCAD files (;*.scad;)|*.scad"
msgstr ""
plater.py
View file @
09a4bfac
#!/usr/bin/env python
#!/usr/bin/env python
# Set up Internationalization using gettext
# searching for installed locales on /usr/share; uses relative folder if not found (windows)
import
os
,
gettext
,
Queue
,
re
if
os
.
path
.
exists
(
'/usr/share/pronterface/locale'
):
gettext
.
install
(
'plater'
,
'/usr/share/pronterface/locale'
,
unicode
=
1
)
else
:
gettext
.
install
(
'plater'
,
'./locale'
,
unicode
=
1
)
import
wx
import
wx
import
time
import
time
import
random
import
random
import
threading
import
threading
import
os
import
math
import
math
import
sys
import
sys
...
@@ -220,26 +229,26 @@ class showstl(wx.Window):
...
@@ -220,26 +229,26 @@ class showstl(wx.Window):
class
stlwin
(
wx
.
Frame
):
class
stlwin
(
wx
.
Frame
):
def
__init__
(
self
,
size
=
(
800
,
580
),
callback
=
None
,
parent
=
None
):
def
__init__
(
self
,
size
=
(
800
,
580
),
callback
=
None
,
parent
=
None
):
wx
.
Frame
.
__init__
(
self
,
parent
,
title
=
"Plate building tool"
,
size
=
size
)
wx
.
Frame
.
__init__
(
self
,
parent
,
title
=
_
(
"Plate building tool"
)
,
size
=
size
)
self
.
SetIcon
(
wx
.
Icon
(
"plater.ico"
,
wx
.
BITMAP_TYPE_ICO
))
self
.
SetIcon
(
wx
.
Icon
(
"plater.ico"
,
wx
.
BITMAP_TYPE_ICO
))
self
.
mainsizer
=
wx
.
BoxSizer
(
wx
.
HORIZONTAL
)
self
.
mainsizer
=
wx
.
BoxSizer
(
wx
.
HORIZONTAL
)
self
.
panel
=
wx
.
Panel
(
self
,
-
1
,
size
=
(
150
,
600
),
pos
=
(
0
,
0
))
self
.
panel
=
wx
.
Panel
(
self
,
-
1
,
size
=
(
150
,
600
),
pos
=
(
0
,
0
))
self
.
panel
.
SetBackgroundColour
((
10
,
10
,
10
))
self
.
panel
.
SetBackgroundColour
((
10
,
10
,
10
))
self
.
l
=
wx
.
ListBox
(
self
.
panel
,
size
=
(
300
,
180
),
pos
=
(
0
,
30
))
self
.
l
=
wx
.
ListBox
(
self
.
panel
,
size
=
(
300
,
180
),
pos
=
(
0
,
30
))
self
.
cl
=
wx
.
Button
(
self
.
panel
,
label
=
"Clear"
,
pos
=
(
0
,
205
))
self
.
cl
=
wx
.
Button
(
self
.
panel
,
label
=
_
(
"Clear"
)
,
pos
=
(
0
,
205
))
self
.
lb
=
wx
.
Button
(
self
.
panel
,
label
=
"Load"
,
pos
=
(
0
,
0
))
self
.
lb
=
wx
.
Button
(
self
.
panel
,
label
=
_
(
"Load"
)
,
pos
=
(
0
,
0
))
if
(
callback
is
None
):
if
(
callback
is
None
):
self
.
eb
=
wx
.
Button
(
self
.
panel
,
label
=
"Export"
,
pos
=
(
100
,
0
))
self
.
eb
=
wx
.
Button
(
self
.
panel
,
label
=
_
(
"Export"
)
,
pos
=
(
100
,
0
))
self
.
eb
.
Bind
(
wx
.
EVT_BUTTON
,
self
.
export
)
self
.
eb
.
Bind
(
wx
.
EVT_BUTTON
,
self
.
export
)
else
:
else
:
self
.
eb
=
wx
.
Button
(
self
.
panel
,
label
=
"Done"
,
pos
=
(
100
,
0
))
self
.
eb
=
wx
.
Button
(
self
.
panel
,
label
=
_
(
"Done"
)
,
pos
=
(
100
,
0
))
self
.
eb
.
Bind
(
wx
.
EVT_BUTTON
,
lambda
e
:
self
.
done
(
e
,
callback
))
self
.
eb
.
Bind
(
wx
.
EVT_BUTTON
,
lambda
e
:
self
.
done
(
e
,
callback
))
self
.
eb
=
wx
.
Button
(
self
.
panel
,
label
=
"Cancel"
,
pos
=
(
200
,
0
))
self
.
eb
=
wx
.
Button
(
self
.
panel
,
label
=
_
(
"Cancel"
)
,
pos
=
(
200
,
0
))
self
.
eb
.
Bind
(
wx
.
EVT_BUTTON
,
lambda
e
:
self
.
Destroy
())
self
.
eb
.
Bind
(
wx
.
EVT_BUTTON
,
lambda
e
:
self
.
Destroy
())
self
.
sb
=
wx
.
Button
(
self
.
panel
,
label
=
"Snap to Z = 0"
,
pos
=
(
00
,
255
))
self
.
sb
=
wx
.
Button
(
self
.
panel
,
label
=
_
(
"Snap to Z = 0"
)
,
pos
=
(
00
,
255
))
self
.
cb
=
wx
.
Button
(
self
.
panel
,
label
=
"Put at 100, 100"
,
pos
=
(
0
,
280
))
self
.
cb
=
wx
.
Button
(
self
.
panel
,
label
=
_
(
"Put at 100, 100"
)
,
pos
=
(
0
,
280
))
self
.
db
=
wx
.
Button
(
self
.
panel
,
label
=
"Delete"
,
pos
=
(
0
,
305
))
self
.
db
=
wx
.
Button
(
self
.
panel
,
label
=
_
(
"Delete"
)
,
pos
=
(
0
,
305
))
self
.
ab
=
wx
.
Button
(
self
.
panel
,
label
=
"Auto"
,
pos
=
(
0
,
330
))
self
.
ab
=
wx
.
Button
(
self
.
panel
,
label
=
_
(
"Auto"
)
,
pos
=
(
0
,
330
))
self
.
cl
.
Bind
(
wx
.
EVT_BUTTON
,
self
.
clear
)
self
.
cl
.
Bind
(
wx
.
EVT_BUTTON
,
self
.
clear
)
self
.
lb
.
Bind
(
wx
.
EVT_BUTTON
,
self
.
right
)
self
.
lb
.
Bind
(
wx
.
EVT_BUTTON
,
self
.
right
)
self
.
sb
.
Bind
(
wx
.
EVT_BUTTON
,
self
.
snap
)
self
.
sb
.
Bind
(
wx
.
EVT_BUTTON
,
self
.
snap
)
...
@@ -263,7 +272,7 @@ class stlwin(wx.Frame):
...
@@ -263,7 +272,7 @@ class stlwin(wx.Frame):
#self.SetClientSize(size)
#self.SetClientSize(size)
def
autoplate
(
self
,
event
):
def
autoplate
(
self
,
event
):
print
"Autoplating"
print
_
(
"Autoplating"
)
separation
=
2
separation
=
2
bedsize
=
[
200
,
200
,
100
]
bedsize
=
[
200
,
200
,
100
]
cursor
=
[
0
,
0
,
0
]
cursor
=
[
0
,
0
,
0
]
...
@@ -291,7 +300,7 @@ class stlwin(wx.Frame):
...
@@ -291,7 +300,7 @@ class stlwin(wx.Frame):
max
[
1
]
=
cursor
[
1
]
+
x
max
[
1
]
=
cursor
[
1
]
+
x
cursor
[
0
]
+=
x
+
separation
cursor
[
0
]
+=
x
+
separation
if
(
cursor
[
1
]
+
y
)
>=
bedsize
[
1
]:
if
(
cursor
[
1
]
+
y
)
>=
bedsize
[
1
]:
print
"Bed full, sorry sir :("
print
_
(
"Bed full, sorry sir :("
)
self
.
Refresh
()
self
.
Refresh
()
return
return
centreoffset
=
[(
bedsize
[
0
]
-
max
[
0
])
/
2
,
(
bedsize
[
1
]
-
max
[
1
])
/
2
]
centreoffset
=
[(
bedsize
[
0
]
-
max
[
0
])
/
2
,
(
bedsize
[
1
]
-
max
[
1
])
/
2
]
...
@@ -301,7 +310,7 @@ class stlwin(wx.Frame):
...
@@ -301,7 +310,7 @@ class stlwin(wx.Frame):
self
.
Refresh
()
self
.
Refresh
()
def
clear
(
self
,
event
):
def
clear
(
self
,
event
):
result
=
wx
.
MessageBox
(
'Are you sure you want to clear the grid? All unsaved changes will be lost.'
,
'Clear the grid?'
,
result
=
wx
.
MessageBox
(
_
(
'Are you sure you want to clear the grid? All unsaved changes will be lost.'
),
_
(
'Clear the grid?'
)
,
wx
.
YES_NO
|
wx
.
ICON_QUESTION
)
wx
.
YES_NO
|
wx
.
ICON_QUESTION
)
if
(
result
==
2
):
if
(
result
==
2
):
self
.
models
=
{}
self
.
models
=
{}
...
@@ -343,8 +352,8 @@ class stlwin(wx.Frame):
...
@@ -343,8 +352,8 @@ class stlwin(wx.Frame):
self
.
Destroy
()
self
.
Destroy
()
def
export
(
self
,
event
):
def
export
(
self
,
event
):
dlg
=
wx
.
FileDialog
(
self
,
"Pick file to save to"
,
self
.
basedir
,
style
=
wx
.
FD_SAVE
)
dlg
=
wx
.
FileDialog
(
self
,
_
(
"Pick file to save to"
)
,
self
.
basedir
,
style
=
wx
.
FD_SAVE
)
dlg
.
SetWildcard
(
"STL files (;*.stl;)"
)
dlg
.
SetWildcard
(
_
(
"STL files (;*.stl;)"
)
)
if
(
dlg
.
ShowModal
()
==
wx
.
ID_OK
):
if
(
dlg
.
ShowModal
()
==
wx
.
ID_OK
):
name
=
dlg
.
GetPath
()
name
=
dlg
.
GetPath
()
self
.
writefiles
(
name
)
self
.
writefiles
(
name
)
...
@@ -364,11 +373,11 @@ class stlwin(wx.Frame):
...
@@ -364,11 +373,11 @@ class stlwin(wx.Frame):
facets
+=
i
.
facets
facets
+=
i
.
facets
sf
.
close
()
sf
.
close
()
stltool
.
emitstl
(
name
,
facets
,
"plater_export"
)
stltool
.
emitstl
(
name
,
facets
,
"plater_export"
)
print
"wrote "
,
name
print
_
(
"wrote "
)
,
name
def
right
(
self
,
event
):
def
right
(
self
,
event
):
dlg
=
wx
.
FileDialog
(
self
,
"Pick file to load"
,
self
.
basedir
,
style
=
wx
.
FD_OPEN
|
wx
.
FD_FILE_MUST_EXIST
)
dlg
=
wx
.
FileDialog
(
self
,
_
(
"Pick file to load"
)
,
self
.
basedir
,
style
=
wx
.
FD_OPEN
|
wx
.
FD_FILE_MUST_EXIST
)
dlg
.
SetWildcard
(
"STL files (;*.stl;)|*.stl|OpenSCAD files (;*.scad;)|*.scad"
)
dlg
.
SetWildcard
(
_
(
"STL files (;*.stl;)|*.stl|OpenSCAD files (;*.scad;)|*.scad"
)
)
if
(
dlg
.
ShowModal
()
==
wx
.
ID_OK
):
if
(
dlg
.
ShowModal
()
==
wx
.
ID_OK
):
name
=
dlg
.
GetPath
()
name
=
dlg
.
GetPath
()
if
(
name
.
lower
()
.
endswith
(
".stl"
)):
if
(
name
.
lower
()
.
endswith
(
".stl"
)):
...
...
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