diff --git a/FlatCAMApp.py b/FlatCAMApp.py
index 09798c87..056e0c8c 100644
--- a/FlatCAMApp.py
+++ b/FlatCAMApp.py
@@ -3810,24 +3810,23 @@ class App(QtCore.QObject):
# palette.setBrush(10, QtGui.QBrush(bgimage)) # 10 = Windowrole
# self.setPalette(palette)
-
logo = QtWidgets.QLabel()
logo.setPixmap(QtGui.QPixmap('share/flatcam_icon256.png'))
title = QtWidgets.QLabel(
- _(
- "FlatCAM
"
- "2D Computer-Aided Printed Circuit Board
"
- "Manufacturing.
"
- "
"
- "
"
- "Development "
- "here.
"
- "DOWNLOAD area "
- "here.
"
- "Issue tracker "
- "here.
"
- )
+ "FlatCAM
"
+ "%s
"
+ "%s.
"
+ "
"
+ "
"
+ "%s "
+ "here.
"
+ "%s area "
+ "here.
"
+ "%s "
+ "here.
" %
+ (_("2D Computer-Aided Printed Circuit Board"), _("Manufacturing"), _("Development"), _("DOWNLOAD"),
+ _("Issue tracker"))
)
title.setOpenExternalLinks(True)
diff --git a/README.md b/README.md
index 97340c02..bd375970 100644
--- a/README.md
+++ b/README.md
@@ -16,6 +16,7 @@ CAD program, and create G-Code for Isolation routing.
- added a grid layout in on_about()
- upgraded the Script Editor to be able to run Tcl commands in batches
- added some ToolTips for the buttons in the Code Editor
+- converted the big strings that hold the shortcut keys descriptions to smaller string to make translations easier
12.09.2019
diff --git a/flatcamGUI/FlatCAMGUI.py b/flatcamGUI/FlatCAMGUI.py
index 3770ded4..602869ac 100644
--- a/flatcamGUI/FlatCAMGUI.py
+++ b/flatcamGUI/FlatCAMGUI.py
@@ -1014,13 +1014,13 @@ class FlatCAMGUI(QtWidgets.QMainWindow):
self.sh_tab_layout.addWidget(self.sh_title)
self.sh_tab_layout.addLayout(self.sh_hlay)
- self.app_sh_msg = _(
+ self.app_sh_msg = (
'''General Shortcut list
F3 |
- SHOW SHORTCUT LIST |
+ %s |
|
@@ -1028,15 +1028,15 @@ class FlatCAMGUI(QtWidgets.QMainWindow):
1 |
- Switch to Project Tab |
+ %s |
2 |
- Switch to Selected Tab |
+ %s |
3 |
- Switch to Tool Tab |
+ %s |
|
@@ -1044,75 +1044,75 @@ class FlatCAMGUI(QtWidgets.QMainWindow):
B |
- New Gerber |
+ %s |
E |
- Edit Object (if selected) |
+ %s |
G |
- Grid On/Off |
+ %s |
J |
- Jump to Coordinates |
+ %s |
L |
- New Excellon |
+ %s |
M |
- Move Obj |
+ %s |
N |
- New Geometry |
+ %s |
O |
- Set Origin |
+ %s |
Q |
- Change Units |
+ %s |
P |
- Open Properties Tool |
+ %s |
R |
- Rotate by 90 degree CW |
+ %s |
S |
- Shell Toggle |
+ %s |
T |
- Add a Tool (when in Geometry Selected Tab or in Tools NCC or Tools Paint) |
+ %s |
V |
- Zoom Fit |
+ %s |
X |
- Flip on X_axis |
+ %s |
Y |
- Flip on Y_axis |
+ %s |
'-' |
- Zoom Out |
+ %s |
'=' |
- Zoom In |
+ %s |
|
@@ -1120,39 +1120,39 @@ class FlatCAMGUI(QtWidgets.QMainWindow):
CTRL+A |
- Select All |
+ %s |
CTRL+C |
- Copy Obj |
+ %s |
CTRL+E |
- Open Excellon File |
+ %s |
CTRL+G |
- Open Gerber File |
+ %s |
CTRL+N |
- New Project |
+ %s |
CTRL+M |
- Measurement Tool |
+ %s |
CTRL+O |
- Open Project |
+ %s |
CTRL+S |
- Save Project As |
+ %s |
CTRL+F10 |
- Toggle Plot Area |
+ %s |
|
@@ -1160,39 +1160,39 @@ class FlatCAMGUI(QtWidgets.QMainWindow):
SHIFT+C |
- Copy Obj_Name |
+ %s |
SHIFT+E |
- Toggle Code Editor |
+ %s |
SHIFT+G |
- Toggle the axis |
+ %s |
SHIFT+P |
- Open Preferences Window |
+ %s |
SHIFT+R |
- Rotate by 90 degree CCW |
+ %s |
SHIFT+S |
- Run a Script |
+ %s |
SHIFT+W |
- Toggle the workspace |
+ %s |
SHIFT+X |
- Skew on X axis |
+ %s |
SHIFT+Y |
- Skew on Y axis |
+ %s |
|
@@ -1200,59 +1200,59 @@ class FlatCAMGUI(QtWidgets.QMainWindow):
ALT+C |
- Calculators Tool |
+ %s |
ALT+D |
- 2-Sided PCB Tool |
+ %s |
ALT+K |
- Solder Paste Dispensing Tool |
+ %s |
ALT+L |
- Film PCB Tool |
+ %s |
ALT+N |
- Non-Copper Clearing Tool |
+ %s |
ALT+P |
- Paint Area Tool |
+ %s |
ALT+Q |
- PDF Import Tool |
+ %s |
ALT+R |
- Transformations Tool |
+ %s |
ALT+S |
- View File Source |
+ %s |
ALT+U |
- Cutout PCB Tool |
+ %s |
ALT+1 |
- Enable all Plots |
+ %s |
ALT+2 |
- Disable all Plots |
+ %s |
ALT+3 |
- Disable Non-selected Plots |
+ %s |
ALT+F10 |
- Toggle Full Screen |
+ %s |
|
@@ -1260,7 +1260,7 @@ class FlatCAMGUI(QtWidgets.QMainWindow):
CTRL+ALT+X |
- Abort current task (gracefully) |
+ %s |
|
@@ -1268,36 +1268,52 @@ class FlatCAMGUI(QtWidgets.QMainWindow):
F1 |
- Open Online Manual |
+ %s |
F4 |
- Open Online Tutorials |
+ %s |
Del |
- Delete Object |
+ %s |
Del |
- Alternate: Delete Tool |
+ %s |
'`' |
- (left to Key_1)Toogle Notebook Area (Left Side) |
+ %s |
SPACE |
- En(Dis)able Obj Plot |
+ %s |
Escape |
- Deselects all objects |
+ %s |
-
- '''
+ ''' % (
+ _("SHOW SHORTCUT LIST"), _("Switch to Project Tab"), _("Switch to Selected Tab"), _("Switch to Tool Tab"),
+ _("New Gerber"), _("Edit Object (if selected)"), _("Grid On/Off"), _("Jump to Coordinates"),
+ _("New Excellon"), _("Move Obj"), _("New Geometry"), _("Set Origin"), _("Change Units"),
+ _("Open Properties Tool"), _("Rotate by 90 degree CW"), _("Shell Toggle"),
+ _("Add a Tool (when in Geometry Selected Tab or in Tools NCC or Tools Paint)"), _("Zoom Fit"),
+ _("Flip on X_axis"), _("Flip on Y_axis"), _("Zoom Out"), _("Zoom In"), _("Select All"), _("Copy Obj"),
+ _("Open Excellon File"), _("Open Gerber File"), _("New Project"), _("Measurement Tool"), _("Open Project"),
+ _("Save Project As"), _("Toggle Plot Area"), _("Copy Obj_Name"), _("Toggle Code Editor"),
+ _("Toggle the axis"), _("Open Preferences Window"), _("Rotate by 90 degree CCW"), _("Run a Script"),
+ _("Toggle the workspace"), _("Skew on X axis"), _("Skew on Y axis"), _("Calculators Tool"),
+ _("2-Sided PCB Tool"), _("Solder Paste Dispensing Tool"), _("Film PCB Tool"), _("Non-Copper Clearing Tool"),
+ _("Paint Area Tool"), _("PDF Import Tool"), _("Transformations Tool"), _("View File Source"),
+ _("Cutout PCB Tool"), _("Enable all Plots"), _("Disable all Plots"), _("Disable Non-selected Plots"),
+ _("Toggle Full Screen"), _("Abort current task (gracefully)"), _("Open Online Manual"),
+ _("Open Online Tutorials"), _("Delete Object"), _("Alternate: Delete Tool"),
+ _("(left to Key_1)Toogle Notebook Area (Left Side)"), _("En(Dis)able Obj Plot"), _("Deselects all objects")
+ )
)
self.sh_app = QtWidgets.QTextEdit()
@@ -1307,88 +1323,90 @@ class FlatCAMGUI(QtWidgets.QMainWindow):
self.sh_app.setSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding)
self.sh_hlay.addWidget(self.sh_app)
- self.editor_sh_msg = _(
- '''Editor Shortcut list
-
- GEOMETRY EDITOR
-
-
+ editor_title = """
+ %s
+
+ """ % _("Editor Shortcut list")
+
+ geo_sh_messages = """
+ %s
+
A |
- Draw an Arc |
+ %s |
B |
- Buffer Tool |
+ %s |
C |
- Copy Geo Item |
+ %s |
D |
- Within Add Arc will toogle the ARC direction: CW or CCW |
+ %s |
E |
- Polygon Intersection Tool |
+ %s |
I |
- Paint Tool |
+ %s |
J |
- Jump to Location (x, y) |
+ %s |
K |
- Toggle Corner Snap |
+ %s |
M |
- Move Geo Item |
+ %s |
M |
- Within Add Arc will cycle through the ARC modes |
+ %s |
N |
- Draw a Polygon |
+ %s |
O |
- Draw a Circle |
+ %s |
P |
- Draw a Path |
+ %s |
R |
- Draw Rectangle |
+ %s |
S |
- Polygon Substraction Tool |
+ %s |
T |
- Add Text Tool |
+ %s |
U |
- Polygon Union Tool |
+ %s |
X |
- Flip shape on X axis |
+ %s |
Y |
- Flip shape on Y axis |
+ %s |
|
@@ -1396,11 +1414,11 @@ class FlatCAMGUI(QtWidgets.QMainWindow):
SHIFT+X |
- Skew shape on X axis |
+ %s |
SHIFT+Y |
- Skew shape on Y axis |
+ %s |
|
@@ -1408,15 +1426,15 @@ class FlatCAMGUI(QtWidgets.QMainWindow):
ALT+R |
- Editor Transformation Tool |
+ %s |
ALT+X |
- Offset shape on X axis |
+ %s |
ALT+Y |
- Offset shape on Y axis |
+ %s |
|
@@ -1424,15 +1442,15 @@ class FlatCAMGUI(QtWidgets.QMainWindow):
CTRL+M |
- Measurement Tool |
+ %s |
CTRL+S |
- Save Object and Exit Editor |
+ %s |
CTRL+X |
- Polygon Cut Tool |
+ %s |
|
@@ -1440,194 +1458,226 @@ class FlatCAMGUI(QtWidgets.QMainWindow):
Space |
- Rotate Geometry |
+ %s |
ENTER |
- Finish drawing for certain tools |
+ %s |
ESC |
- Abort and return to Select |
+ %s |
Del |
- Delete Shape |
+ %s |
-
- EXCELLON EDITOR
-
-
-
- A |
- Add Drill Array |
-
-
- C |
- Copy Drill(s) |
-
-
- D |
- Add Drill |
-
-
- J |
- Jump to Location (x, y) |
-
-
- M |
- Move Drill(s) |
-
-
- Q |
- Add Slot Array |
-
-
- R |
- Resize Drill(s) |
-
-
- T |
- Add a new Tool |
-
-
- W |
- Add Slot |
-
-
- |
- |
-
-
- Del |
- Delete Drill(s) |
-
-
- Del |
- Alternate: Delete Tool(s) |
-
-
- |
- |
-
-
- ESC |
- Abort and return to Select |
-
-
- CTRL+S |
- Save Object and Exit Editor |
-
-
-
-
-
- GERBER EDITOR
-
-
-
- A |
- Add Pad Array |
-
-
- B |
- Buffer |
-
-
- C |
- Copy |
-
-
- D |
- Add Disc |
-
-
- E |
- Add SemiDisc |
-
-
- J |
- Jump to Location (x, y) |
-
-
- M |
- Move |
-
-
- N |
- Add Region |
-
-
- P |
- Add Pad |
-
-
- R |
- Within Track & Region Tools will cycle in REVERSE the bend modes |
-
-
- S |
- Scale |
-
-
- T |
- Add Track |
-
-
- T |
- Within Track & Region Tools will cycle FORWARD the bend modes |
-
-
- |
- |
-
-
- Del |
- Delete |
-
-
- Del |
- Alternate: Delete Apertures |
-
-
- |
- |
-
-
- ESC |
- Abort and return to Select |
-
-
- CTRL+E |
- Eraser Tool |
-
-
- CTRL+S |
- Save Object and Exit Editor |
-
-
- |
- |
-
-
- ALT+A |
- Mark Area Tool |
-
-
- ALT+N |
- Poligonize Tool |
-
-
- ALT+R |
- Transformation Tool |
-
-
-
- '''
+ """ % (
+ _("GEOMETRY EDITOR"), _("Draw an Arc"), _("Buffer Tool"), _("Copy Geo Item"),
+ _("Within Add Arc will toogle the ARC direction: CW or CCW"), _("Polygon Intersection Tool"),
+ _("Geo Paint Tool"), _("Jump to Location (x, y)"), _("Toggle Corner Snap"), _("Move Geo Item"),
+ _("Within Add Arc will cycle through the ARC modes"), _("Draw a Polygon"), _("Draw a Circle"),
+ _("Draw a Path"), _("Draw Rectangle"), _("Polygon Substraction Tool"), _("Add Text Tool"),
+ _("Polygon Union Tool"), _("Flip shape on X axis"), _("Flip shape on Y axis"), _("Skew shape on X axis"),
+ _("Skew shape on Y axis"), _("Editor Transformation Tool"), _("Offset shape on X axis"),
+ _("Offset shape on Y axis"), _("Measurement Tool"), _("Save Object and Exit Editor"), _("Polygon Cut Tool"),
+ _("Rotate Geometry"), _("Finish drawing for certain tools"), _("Abort and return to Select"),
+ _("Delete Shape")
)
+
+ exc_sh_messages = """
+
+ %s
+
+
+
+ A |
+ %s |
+
+
+ C |
+ %s |
+
+
+ D |
+ %s |
+
+
+ J |
+ %s |
+
+
+ M |
+ %s |
+
+
+ Q |
+ %s |
+
+
+ R |
+ %s |
+
+
+ T |
+ %s |
+
+
+ W |
+ %s |
+
+
+ |
+ |
+
+
+ Del |
+ %s |
+
+
+ Del |
+ %s |
+
+
+ |
+ |
+
+
+ ESC |
+ %s |
+
+
+ CTRL+S |
+ %s |
+
+
+
+
+ """ % (
+ _("EXCELLON EDITOR"), _("Add Drill Array"), _("Copy Drill(s)"), _("Add Drill"),
+ _("Jump to Location (x, y)"), _("Move Drill(s)"), _("Add Slot Array"), _("Resize Drill(s)"),
+ _("Add a new Tool"), _("Add Slot"), _("Delete Drill(s)"), _("Alternate: Delete Tool(s)"),
+ _("Abort and return to Select"), _("Save Object and Exit Editor")
+ )
+
+ grb_sh_messages = """
+
+ %s
+
+
+
+ A |
+ %s |
+
+
+ B |
+ %s |
+
+
+ C |
+ %s |
+
+
+ D |
+ %s |
+
+
+ E |
+ %s |
+
+
+ J |
+ %s |
+
+
+ M |
+ %s |
+
+
+ N |
+ %s |
+
+
+ P |
+ %s |
+
+
+ R |
+ %s |
+
+
+ S |
+ %s |
+
+
+ T |
+ %s |
+
+
+ T |
+ %s |
+
+
+ |
+ |
+
+
+ Del |
+ %s |
+
+
+ Del |
+ %s |
+
+
+ |
+ |
+
+
+ ESC |
+ %s |
+
+
+ CTRL+E |
+ %s |
+
+
+ CTRL+S |
+ %s |
+
+
+ |
+ |
+
+
+ ALT+A |
+ %s |
+
+
+ ALT+N |
+ %s |
+
+
+ ALT+R |
+ %s |
+
+
+
+
+ """ % (
+ _("GERBER EDITOR"), _("Add Pad Array"), _("Buffer"), _("Copy"), _("Add Disc"), _("Add SemiDisc"),
+ _("Jump to Location (x, y)"), _("Move"), _("Add Region"), _("Add Pad"),
+ _("Within Track & Region Tools will cycle in REVERSE the bend modes"), _("Scale"), _("Add Track"),
+ _("Within Track & Region Tools will cycle FORWARD the bend modes"), _("Delete"),
+ _("Alternate: Delete Apertures"), _("Abort and return to Select"), _("Eraser Tool"),
+ _("Save Object and Exit Editor"), _("Mark Area Tool"), _("Poligonize Tool"), _("Transformation Tool")
+ )
+
+ self.editor_sh_msg = editor_title + geo_sh_messages + grb_sh_messages + exc_sh_messages
+
self.sh_editor = QtWidgets.QTextEdit()
self.sh_editor.setTextInteractionFlags(QtCore.Qt.NoTextInteraction)
self.sh_editor.setText(self.editor_sh_msg)