Przeglądaj źródła

- remade the layout in 2Sided Tool
- work in progress for translation in Romanian - 91%

Marius Stanciu 6 lat temu
rodzic
commit
abfa78d898

+ 35 - 35
FlatCAMApp.py

@@ -2537,7 +2537,7 @@ class App(QtCore.QObject):
             return_value = initialize(obj, self)
         except Exception as e:
             msg = _("[ERROR_NOTCL] An internal error has ocurred. See shell.\n")
-            msg += _("Object (%s) failed because: %s \n\n") % (kind, str(e))
+            msg += _("Object ({kind}) failed because: {error} \n\n").format(kind=kind, error=str(e))
             msg += traceback.format_exc()
             self.inform.emit(msg)
 
@@ -2615,17 +2615,17 @@ class App(QtCore.QObject):
         # self.inform.emit('[selected] %s created & selected: %s' %
         #                  (str(obj.kind).capitalize(), str(obj.options['name'])))
         if obj.kind == 'gerber':
-            self.inform.emit('_([selected]%s created/selected: <span style="color:%s;">%s</span>' %
-                             (obj.kind.capitalize(), 'green', str(obj.options['name'])))
+            self.inform.emit(_('[selected]{kind} created/selected: <span style="color:{color};">{name}</span>').format(
+                kind=obj.kind.capitalize(), color='green', name=str(obj.options['name'])))
         elif obj.kind == 'excellon':
-            self.inform.emit(_('[selected]%s created/selected: <span style="color:%s;">%s</span>') %
-                             (obj.kind.capitalize(), 'brown', str(obj.options['name'])))
+            self.inform.emit(_('[selected]{kind} created/selected: <span style="color:{color};">{name}</span>').format(
+                kind=obj.kind.capitalize(), color='brown', name=str(obj.options['name'])))
         elif obj.kind == 'cncjob':
-            self.inform.emit(_('[selected]%s created/selected: <span style="color:%s;">%s</span>') %
-                             (obj.kind.capitalize(), 'blue', str(obj.options['name'])))
+            self.inform.emit(_('[selected]{kind} created/selected: <span style="color:{color};">{name}</span>').format(
+                kind=obj.kind.capitalize(), color='blue', name=str(obj.options['name'])))
         elif obj.kind == 'geometry':
-            self.inform.emit(_('[selected]%s created/selected: <span style="color:%s;">%s</span>') %
-                             (obj.kind.capitalize(), 'red', str(obj.options['name'])))
+            self.inform.emit(_('[selected]{kind} created/selected: <span style="color:{color};">{name}</span>').format(
+                kind=obj.kind.capitalize(), color='red', name=str(obj.options['name'])))
 
         # update the SHELL auto-completer model with the name of the new object
         self.myKeywords.append(obj.options['name'])
@@ -4987,17 +4987,17 @@ class App(QtCore.QObject):
                         # self.inform.emit('[selected] %s: %s selected' %
                         #                  (str(curr_sel_obj.kind).capitalize(), str(curr_sel_obj.options['name'])))
                         if curr_sel_obj.kind == 'gerber':
-                            self.inform.emit(_('[selected]<span style="color:%s;">%s</span> selected') %
-                                             ('green', str(curr_sel_obj.options['name'])))
+                            self.inform.emit(_('[selected]<span style="color:{color};">{name}</span> selected').format(
+                                color='green', name=str(curr_sel_obj.options['name'])))
                         elif curr_sel_obj.kind == 'excellon':
-                            self.inform.emit(_('[selected]<span style="color:%s;">%s</span> selected') %
-                                             ('brown', str(curr_sel_obj.options['name'])))
+                            self.inform.emit(_('[selected]<span style="color:{color};">{name}</span> selected').format(
+                                color='brown', name=str(curr_sel_obj.options['name'])))
                         elif curr_sel_obj.kind == 'cncjob':
-                            self.inform.emit(_('[selected]<span style="color:%s;">%s</span> selected') %
-                                             ('blue', str(curr_sel_obj.options['name'])))
+                            self.inform.emit(_('[selected]<span style="color:{color};">{name}</span> selected').format(
+                                color='blue', name=str(curr_sel_obj.options['name'])))
                         elif curr_sel_obj.kind == 'geometry':
-                            self.inform.emit(_('[selected]<span style="color:%s;">%s</span> selected') %
-                                             ('red', str(curr_sel_obj.options['name'])))
+                            self.inform.emit(_('[selected]<span style="color:{color};">{name}</span> selected').format(
+                                color='red', name=str(curr_sel_obj.options['name'])))
 
                     elif self.collection.get_active().options['name'] not in objects_under_the_click_list:
                         self.collection.set_all_inactive()
@@ -5010,17 +5010,17 @@ class App(QtCore.QObject):
                         # self.inform.emit('[selected] %s: %s selected' %
                         #                  (str(curr_sel_obj.kind).capitalize(), str(curr_sel_obj.options['name'])))
                         if curr_sel_obj.kind == 'gerber':
-                            self.inform.emit(_('[selected]<span style="color:%s;">%s</span> selected') %
-                                             ('green', str(curr_sel_obj.options['name'])))
+                            self.inform.emit(_('[selected]<span style="color:{color};">{name}</span> selected').format(
+                                color='green', name=str(curr_sel_obj.options['name'])))
                         elif curr_sel_obj.kind == 'excellon':
-                            self.inform.emit(_('[selected]<span style="color:%s;">%s</span> selected') %
-                                             ('brown', str(curr_sel_obj.options['name'])))
+                            self.inform.emit(_('[selected]<span style="color:{color};">{name}</span> selected').format(
+                                color='brown', name=str(curr_sel_obj.options['name'])))
                         elif curr_sel_obj.kind == 'cncjob':
-                            self.inform.emit(_('[selected]<span style="color:%s;">%s</span> selected') %
-                                             ('blue', str(curr_sel_obj.options['name'])))
+                            self.inform.emit(_('[selected]<span style="color:{color};">{name}</span> selected').format(
+                                color='blue', name=str(curr_sel_obj.options['name'])))
                         elif curr_sel_obj.kind == 'geometry':
-                            self.inform.emit(_('[selected]<span style="color:%s;">%s</span> selected') %
-                                             ('red', str(curr_sel_obj.options['name'])))
+                            self.inform.emit(_('[selected]<span style="color:{color};">{name}</span> selected').format(
+                                color='red', name=str(curr_sel_obj.options['name'])))
 
                     else:
                         self.collection.set_all_inactive()
@@ -5058,17 +5058,17 @@ class App(QtCore.QObject):
                     # self.inform.emit('[selected] %s: %s selected' %
                     #                  (str(curr_sel_obj.kind).capitalize(), str(curr_sel_obj.options['name'])))
                     if curr_sel_obj.kind == 'gerber':
-                        self.inform.emit(_('[selected]<span style="color:%s;">%s</span> selected') %
-                                         ('green', str(curr_sel_obj.options['name'])))
+                        self.inform.emit(_('[selected]<span style="color:{color};">{name}</span> selected').format(
+                            color='green', name=str(curr_sel_obj.options['name'])))
                     elif curr_sel_obj.kind == 'excellon':
-                        self.inform.emit(_('[selected]<span style="color:%s;">%s</span> selected') %
-                                         ('brown', str(curr_sel_obj.options['name'])))
+                        self.inform.emit(_('[selected]<span style="color:{color};">{name}</span> selected').format(
+                            color='brown', name=str(curr_sel_obj.options['name'])))
                     elif curr_sel_obj.kind == 'cncjob':
-                        self.inform.emit(_('[selected]<span style="color:%s;">%s</span> selected') %
-                                         ('blue', str(curr_sel_obj.options['name'])))
+                        self.inform.emit(_('[selected]<span style="color:{color};">{name}</span> selected').format(
+                            color='blue', name=str(curr_sel_obj.options['name'])))
                     elif curr_sel_obj.kind == 'geometry':
-                        self.inform.emit(_('[selected]<span style="color:%s;">%s</span> selected') %
-                                         ('red', str(curr_sel_obj.options['name'])))
+                        self.inform.emit(_('[selected]<span style="color:{color};">{name}</span> selected').format(
+                            color='red', name=str(curr_sel_obj.options['name'])))
 
                     # for obj in self.collection.get_list():
                     #     obj.plot()
@@ -5849,7 +5849,7 @@ class App(QtCore.QObject):
         try:
             filename, _f = QtWidgets.QFileDialog.getSaveFileName(
                 caption=_("Save Project As ..."),
-                directory=_('%s/Project_%s') % (str(self.get_last_save_folder()), str(self.date.replace('-', ''))),
+                directory=_('{l_save}/Project_{date}').format(l_save=str(self.get_last_save_folder()), date=str(self.date.replace('-', ''))),
                 filter=filter_)
         except TypeError:
             filename, _f = QtWidgets.QFileDialog.getSaveFileName(caption=_("Save Project As ..."), filter=filter_)
@@ -6537,7 +6537,7 @@ class App(QtCore.QObject):
                 self.inform.emit(_('[ERROR_NOTCL] Failed to open file: %s') % filename)
                 return "fail"
             except ParseError as err:
-                app_obj.inform.emit(_("[ERROR_NOTCL] Failed to parse file: %s. %s") % (filename,  str(err)))
+                app_obj.inform.emit(_("[ERROR_NOTCL] Failed to parse file: {name}. {error}").format(name=filename,  error=str(err)))
                 app_obj.progress.emit(0)
                 self.log.error(str(err))
                 return "fail"

+ 2 - 2
FlatCAMEditor.py

@@ -5335,7 +5335,7 @@ class FlatCAMExcEditor(QtCore.QObject):
         # we add a new entry in the tool2tooldia dict
         self.tool2tooldia[len(self.olddia_newdia)] = tool_dia
 
-        self.app.inform.emit(_("[success]Added new tool with dia: %s %s") % (str(tool_dia), str(self.units)))
+        self.app.inform.emit(_("[success]Added new tool with dia: {dia} {units}").format(dia=str(tool_dia), units=str(self.units)))
 
         self.build_ui()
 
@@ -5399,7 +5399,7 @@ class FlatCAMExcEditor(QtCore.QObject):
 
             self.olddia_newdia.pop(deleted_tool_dia, None)
 
-            self.app.inform.emit(_("[success]Deleted tool with dia: %s %s") % (str(deleted_tool_dia), str(self.units)))
+            self.app.inform.emit(_("[success]Deleted tool with dia: {del_dia} {units}").format(del_dia=str(deleted_tool_dia), units=str(self.units)))
 
         self.replot()
         # self.app.inform.emit("Could not delete selected tool")

+ 3 - 4
FlatCAMObj.py

@@ -190,7 +190,7 @@ class FlatCAMObj(QtCore.QObject):
             log.debug("on_name_activate() --> Could not remove the old object name from auto-completer model list")
 
         self.options["name"] = self.ui.name_entry.get_value()
-        self.app.inform.emit(_("[success]Name changed from %s to %s") % (old_name, new_name))
+        self.app.inform.emit(_("[success]Name changed from {old} to {new}").format(old=old_name, new=new_name))
 
     def on_offset_button_click(self):
         self.app.report_usage("obj_on_offset_button")
@@ -2467,7 +2467,7 @@ class FlatCAMExcellon(FlatCAMObj, Excellon):
             tools_csv = ','.join(tools)
             ret_val = job_obj.generate_from_excellon_by_tool(self, tools_csv,
                                                              drillz=float(self.options['drillz']),
-                                                             toolchange=float(self.options["toolchange"]),
+                                                             toolchange=self.options["toolchange"],
                                                              toolchangexy=self.app.defaults["excellon_toolchangexy"],
                                                              toolchangez=float(self.options["toolchangez"]),
                                                              startz=float(self.options["startz"]) if
@@ -5108,7 +5108,7 @@ class FlatCAMCNCjob(FlatCAMObj, CNCjob):
 
         # flag to store if the CNCJob is part of a special group of CNCJob objects that can't be processed by the
         # default engine of FlatCAM. They generated by some of tools and are special cases of CNCJob objects.
-        self. special_group = None
+        self.special_group = None
 
         # for now it show if the plot will be done for multi-tool CNCJob (True) or for single tool
         # (like the one in the TCL Command), False
@@ -5623,7 +5623,6 @@ class FlatCAMCNCjob(FlatCAMObj, CNCjob):
     def on_toolchange_custom_clicked(self, signal):
         try:
             if 'toolchange_custom' not in str(self.options['ppname_e']).lower():
-                print(self.options['ppname_e'])
                 if self.ui.toolchange_cb.get_value():
                     self.ui.toolchange_cb.set_value(False)
                     self.app.inform.emit(

+ 9 - 9
ObjectCollection.py

@@ -399,7 +399,7 @@ class ObjectCollection(QtCore.QAbstractItemModel):
                         "setData() --> Could not remove the old object name from auto-completer model list")
 
                 obj.build_ui()
-                self.app.inform.emit(_("Object renamed from %s to %s") % (old_name, new_name))
+                self.app.inform.emit(_("Object renamed from {old} to {new}").format(old=old_name, new=new_name))
 
         return True
 
@@ -693,17 +693,17 @@ class ObjectCollection(QtCore.QAbstractItemModel):
             obj = current.indexes()[0].internalPointer().obj
 
             if obj.kind == 'gerber':
-                self.app.inform.emit(_('[selected]<span style="color:%s;">%s</span> selected') %
-                                 ('green', str(obj.options['name'])))
+                self.app.inform.emit(_('[selected]<span style="color:{color};">{name}</span> selected').format(
+                    color='green', name=str(obj.options['name'])))
             elif obj.kind == 'excellon':
-                self.app.inform.emit(_('[selected]<span style="color:%s;">%s</span> selected') %
-                                 ('brown', str(obj.options['name'])))
+                self.app.inform.emit(_('[selected]<span style="color:{color};">{name}</span> selected').format(
+                    color='brown', name=str(obj.options['name'])))
             elif obj.kind == 'cncjob':
-                self.app.inform.emit(_('[selected]<span style="color:%s;">%s</span> selected') %
-                                 ('blue', str(obj.options['name'])))
+                self.app.inform.emit(_('[selected]<span style="color:{color};">{name}</span> selected').format(
+                    color='blue', name=str(obj.options['name'])))
             elif obj.kind == 'geometry':
-                self.app.inform.emit(_('[selected]<span style="color:%s;">%s</span> selected') %
-                                 ('red', str(obj.options['name'])))
+                self.app.inform.emit(_('[selected]<span style="color:{color};">{name}</span> selected').format(
+                    color='red', name=str(obj.options['name'])))
 
         except IndexError:
             FlatCAMApp.App.log.debug("on_list_selection_change(): Index Error (Nothing selected?)")

+ 3 - 0
README.md

@@ -13,6 +13,9 @@ CAD program, and create G-Code for Isolation routing.
 
 - remade the layout in 2Sided Tool
 - work in progress for translation in Romanian - 91%
+- changed some of the app strings formatting to work better with Poedit translation software
+- fixed bug in Drillcncjob TclCommand
+
 
 16.03.2019
 

+ 7 - 2
camlib.py

@@ -4227,7 +4227,7 @@ class Excellon(Geometry):
         except Exception as e:
             log.error("Excellon PARSING FAILED. Line %d: %s" % (line_num, eline))
             msg = _("[ERROR_NOTCL] An internal error has ocurred. See shell.\n")
-            msg += _('[ERROR] Excellon Parser error.\nParsing Failed. Line %d: %s\n') % (line_num, eline)
+            msg += _('[ERROR] Excellon Parser error.\nParsing Failed. Line {l_nr}: {line}\n').format(l_nr=line_num, line=eline)
             msg += traceback.format_exc()
             self.app.inform.emit(msg)
 
@@ -5200,7 +5200,12 @@ class CNCjob(Geometry):
                             else:
                                 current_tooldia = float('%.3f' % float(exobj.tools[tool]["C"]))
 
-                            z_offset = float(self.tool_offset[current_tooldia]) * (-1)
+                            # TODO apply offset only when using the GUI, for TclCommand this will create an error
+                            # because the values for Z offset are created in build_ui()
+                            try:
+                                z_offset = float(self.tool_offset[current_tooldia]) * (-1)
+                            except KeyError:
+                                z_offset = 0
                             self.z_cut += z_offset
 
                             # Drillling!

+ 1 - 1
flatcamGUI/FlatCAMGUI.py

@@ -2478,7 +2478,7 @@ class FlatCAMGUI(QtWidgets.QMainWindow):
                     if ok:
                         self.app.exc_editor.on_tool_add(tooldia=val)
                         self.app.inform.emit(
-                            _("[success]Added new tool with dia: %s %s") % ('%.4f' % float(val), str(self.units)))
+                            _("[success]Added new tool with dia: {dia} {units}").format(dia='%.4f' % float(val), units=str(self.units)))
                     else:
                         self.app.inform.emit(
                             _("[WARNING_NOTCL] Adding Tool cancelled ..."))

+ 3 - 3
flatcamGUI/ObjectUI.py

@@ -1631,8 +1631,8 @@ class CNCObjectUI(ObjectUI):
         self.tc_variable_combo.setItemData(4, _("x_toolchange = X coord for Toolchange"), Qt.ToolTipRole)
         self.tc_variable_combo.setItemData(5, _("y_toolchange = Y coord for Toolchange"), Qt.ToolTipRole)
         self.tc_variable_combo.setItemData(6, _("z_toolchange = Z coord for Toolchange"), Qt.ToolTipRole)
-        self.tc_variable_combo.setItemData(7, _("z_cut = Z coord for Toolchange"), Qt.ToolTipRole)
-        self.tc_variable_combo.setItemData(8, _("z_move = Z coord for Toolchange"), Qt.ToolTipRole)
+        self.tc_variable_combo.setItemData(7, _("z_cut = depth where to cut"), Qt.ToolTipRole)
+        self.tc_variable_combo.setItemData(8, _("z_move = height where to travel"), Qt.ToolTipRole)
         self.tc_variable_combo.setItemData(9, _("z_depthpercut = the step value for multidepth cut"), Qt.ToolTipRole)
         self.tc_variable_combo.setItemData(10, _("spindlesspeed = the value for the spindle speed"), Qt.ToolTipRole)
         self.tc_variable_combo.setItemData(11, _("dwelltime = time to dwell to allow the spindle to reach it's set RPM"),
@@ -1649,7 +1649,7 @@ class CNCObjectUI(ObjectUI):
         # cnclay1.addWidget(self.tc_insert_buton)
 
         h_lay = QtWidgets.QHBoxLayout()
-        h_lay.setAlignment(QtCore.Qt.AlignRight | QtCore.Qt.AlignVCenter)
+        h_lay.setAlignment(QtCore.Qt.AlignVCenter)
         self.custom_box.addLayout(h_lay)
 
         # Edit GCode Button

+ 2 - 2
flatcamTools/ToolMeasurement.py

@@ -323,8 +323,8 @@ class Measurement(FlatCAMTool):
 
                     self.stop_entry.set_value("(%.4f, %.4f)" % pos)
 
-                    self.app.inform.emit(_("MEASURING: Result D(x) = %.4f | D(y) = %.4f | Distance = %.4f") %
-                                         (abs(dx), abs(dy), abs(d)))
+                    self.app.inform.emit(_("MEASURING: Result D(x) = {d_x} | D(y) = {d_y} | Distance = {d_z}").format(
+                        d_x='%4f' % abs(dx), d_y='%4f' % abs(dy), d_z='%4f' % abs(d)))
 
                     self.distance_x_entry.set_value('%.4f' % abs(dx))
                     self.distance_y_entry.set_value('%.4f' % abs(dy))

+ 2 - 2
flatcamTools/ToolPanelize.py

@@ -520,8 +520,8 @@ class Panelize(FlatCAMTool):
             self.app.inform.emit(_("[success]Panel done..."))
         else:
             self.constrain_flag = False
-            self.app.inform.emit(_("[WARNING] Too big for the constrain area. Final panel has %s columns and %s rows") %
-                                 (columns, rows))
+            self.app.inform.emit(_("[WARNING] Too big for the constrain area. Final panel has {col} columns and {row} rows").format(
+                col=columns, row=rows))
 
         proc = self.app.proc_container.new(_("Generating panel ... Please wait."))
 

BIN
locale/ro/LC_MESSAGES/strings.mo


Plik diff jest za duży
+ 191 - 463
locale/ro/LC_MESSAGES/strings.po


+ 20 - 18
locale_template/strings_file.pot

@@ -6,15 +6,17 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: \n"
-"POT-Creation-Date: 2019-03-13 16:15+0200\n"
+"POT-Creation-Date: 2019-03-17 05:37+0200\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=cp1252\n"
+"Content-Type: text/plain; charset=CP1252\n"
 "Content-Transfer-Encoding: 8bit\n"
 "Generated-By: pygettext.py 1.5\n"
 "X-Generator: Poedit 2.2.1\n"
+"X-Poedit-Basepath: ..\n"
+"X-Poedit-SearchPath-0: .\n"
 
 #: D:\1.DEV\FlatCAM_beta\camlib.py:200
 msgid "[ERROR_NOTCL] self.solid_geometry is neither BaseGeometry or list."
@@ -97,7 +99,7 @@ msgstr ""
 #: D:\1.DEV\FlatCAM_beta\camlib.py:4230
 msgid ""
 "[ERROR] Excellon Parser error.\n"
-"Parsing Failed. Line %d: %s\n"
+"Parsing Failed. Line {l_nr}: {line}\n"
 msgstr ""
 
 #: D:\1.DEV\FlatCAM_beta\camlib.py:4307
@@ -301,10 +303,11 @@ msgstr ""
 msgid "Converting units to "
 msgstr ""
 
-#: D:\1.DEV\FlatCAM_beta\FlatCAMApp.py:2621
-#: D:\1.DEV\FlatCAM_beta\FlatCAMApp.py:2624
-#: D:\1.DEV\FlatCAM_beta\FlatCAMApp.py:2627
-msgid "[selected]%s created/selected: <span style=\"color:%s;\">%s</span>"
+#: D:\1.DEV\FlatCAM_beta\FlatCAMApp.py:2618
+#: D:\1.DEV\FlatCAM_beta\FlatCAMApp.py:2622
+#: D:\1.DEV\FlatCAM_beta\FlatCAMApp.py:2626
+#: D:\1.DEV\FlatCAM_beta\FlatCAMApp.py:2630
+msgid "[selected]{kind} created/selected: <span style="color:{color};">{name}</span>"
 msgstr ""
 
 #: D:\1.DEV\FlatCAM_beta\FlatCAMApp.py:2865
@@ -588,7 +591,7 @@ msgstr ""
 #: D:\1.DEV\FlatCAM_beta\ObjectCollection.py:699
 #: D:\1.DEV\FlatCAM_beta\ObjectCollection.py:702
 #: D:\1.DEV\FlatCAM_beta\ObjectCollection.py:705
-msgid "[selected]<span style=\"color:%s;\">%s</span> selected"
+msgid "[selected]<span style="color:{color};">{name}</span> selected"
 msgstr ""
 
 #: D:\1.DEV\FlatCAM_beta\FlatCAMApp.py:5187
@@ -812,7 +815,7 @@ msgid "Save Project As ..."
 msgstr ""
 
 #: D:\1.DEV\FlatCAM_beta\FlatCAMApp.py:5852
-msgid "%s/Project_%s"
+msgid "{l_save}/Project_{date}"
 msgstr ""
 
 #: D:\1.DEV\FlatCAM_beta\FlatCAMApp.py:5860
@@ -900,7 +903,7 @@ msgid "[ERROR_NOTCL] Failed to open file: %s"
 msgstr ""
 
 #: D:\1.DEV\FlatCAM_beta\FlatCAMApp.py:6540
-msgid "[ERROR_NOTCL] Failed to parse file: %s. %s"
+msgid "[ERROR_NOTCL] Failed to parse file: {name}. {error}"
 msgstr ""
 
 #: D:\1.DEV\FlatCAM_beta\FlatCAMApp.py:6546
@@ -2313,7 +2316,7 @@ msgstr ""
 
 #: D:\1.DEV\FlatCAM_beta\FlatCAMEditor.py:5338
 #: D:\1.DEV\FlatCAM_beta\flatcamGUI\FlatCAMGUI.py:2481
-msgid "[success]Added new tool with dia: %s %s"
+msgid "[success]Added new tool with dia: {dia} {units}"
 msgstr ""
 
 #: D:\1.DEV\FlatCAM_beta\FlatCAMEditor.py:5369
@@ -2321,7 +2324,7 @@ msgid "[WARNING_NOTCL]Select a tool in Tool Table"
 msgstr ""
 
 #: D:\1.DEV\FlatCAM_beta\FlatCAMEditor.py:5402
-msgid "[success]Deleted tool with dia: %s %s"
+msgid "[success]Deleted tool with dia: {del_dia} {units}"
 msgstr ""
 
 #: D:\1.DEV\FlatCAM_beta\FlatCAMEditor.py:5799
@@ -6264,7 +6267,7 @@ msgid "Hello!"
 msgstr ""
 
 #: D:\1.DEV\FlatCAM_beta\FlatCAMObj.py:193
-msgid "[success]Name changed from %s to %s"
+msgid "[success]Name changed from {old} to {new}"
 msgstr ""
 
 #: D:\1.DEV\FlatCAM_beta\FlatCAMObj.py:531
@@ -6540,7 +6543,7 @@ msgid "[ERROR] There is no postprocessor file."
 msgstr ""
 
 #: D:\1.DEV\FlatCAM_beta\ObjectCollection.py:402
-msgid "Object renamed from %s to %s"
+msgid "Object renamed from {old} to {new}"
 msgstr ""
 
 #: D:\1.DEV\FlatCAM_beta\ObjectCollection.py:736
@@ -8198,7 +8201,7 @@ msgid "MEASURING: Click on the Destination point ..."
 msgstr ""
 
 #: D:\1.DEV\FlatCAM_beta\flatcamTools\ToolMeasurement.py:326
-msgid "MEASURING: Result D(x) = %.4f | D(y) = %.4f | Distance = %.4f"
+msgid "MEASURING: Result D(x) = {d_x} | D(y) = {d_y} | Distance = {d_z}"
 msgstr ""
 
 #: D:\1.DEV\FlatCAM_beta\flatcamTools\ToolMove.py:81
@@ -8610,10 +8613,9 @@ msgstr ""
 msgid "[success]Panel done..."
 msgstr ""
 
-#: D:\1.DEV\FlatCAM_beta\flatcamTools\ToolPanelize.py:520
+#: D:\1.DEV\FlatCAM_beta\flatcamTools\ToolPanelize.py:523
 msgid ""
-"[WARNING] Too big for the constrain area. Final panel has %s columns and %s "
-"rows"
+"[WARNING] Too big for the constrain area. Final panel has {col} columns and {row} rows"
 msgstr ""
 
 #: D:\1.DEV\FlatCAM_beta\flatcamTools\ToolPanelize.py:528

+ 17 - 0
tclCommands/TclCommandDrillcncjob.py

@@ -81,6 +81,11 @@ class TclCommandDrillcncjob(TclCommandSignaled):
         if not isinstance(obj, FlatCAMExcellon):
             self.raise_tcl_error('Expected FlatCAMExcellon, got %s %s.' % (name, type(obj)))
 
+        xmin = obj.options['xmin']
+        ymin = obj.options['ymin']
+        xmax = obj.options['xmax']
+        ymax = obj.options['ymax']
+
         def job_init(job_obj, app_obj):
 
             drillz = args["drillz"] if "drillz" in args else obj.options["drillz"]
@@ -93,10 +98,22 @@ class TclCommandDrillcncjob(TclCommandSignaled):
             job_obj.pp_excellon_name = args["ppname_e"] if "ppname_e" in args \
                 else obj.options["ppname_e"]
 
+            job_obj.coords_decimals = int(self.app.defaults["cncjob_coords_decimals"])
+            job_obj.fr_decimals = int(self.app.defaults["cncjob_fr_decimals"])
+
+            job_obj.options['type'] = 'Excellon'
+
             toolchange = True if "toolchange" in args and args["toolchange"] == 1 else False
             toolchangez = args["toolchangez"] if "toolchangez" in args else obj.options["toolchangez"]
             job_obj.toolchangexy = args["toolchangexy"] if "toolchangexy" in args else obj.options["toolchangexy"]
 
+            job_obj.toolchange_xy_type = "excellon"
+
+            job_obj.options['xmin'] = xmin
+            job_obj.options['ymin'] = ymin
+            job_obj.options['xmax'] = xmax
+            job_obj.options['ymax'] = ymax
+
             endz = args["endz"] if "endz" in args else obj.options["endz"]
 
             tools = args["tools"] if "tools" in args else 'all'

Niektóre pliki nie zostały wyświetlone z powodu dużej ilości zmienionych plików