- some message strings cleanup
This commit is contained in:
parent
26dd29e7dd
commit
7df7e17569
|
@ -13,6 +13,7 @@ CHANGELOG for FlatCAM beta
|
|||
- added a placeholder text to 2Sided Tool
|
||||
- added a new menu entry in the context menu of the Tcl Shell: 'Save Log' which will save the content of the Tcl Shell browser window to a file
|
||||
- the status bar messages that are echoed in the Tcl Shell will no longer have all text colored but only the identifier
|
||||
- some message strings cleanup
|
||||
|
||||
23.04.2020
|
||||
|
||||
|
|
|
@ -2961,7 +2961,7 @@ class App(QtCore.QObject):
|
|||
|
||||
if project_name == "":
|
||||
if silent is False:
|
||||
self.inform.emit(_("Open cancelled."))
|
||||
self.inform.emit(_("Cancelled."))
|
||||
else:
|
||||
# self.open_project(project_name)
|
||||
run_from_arg = True
|
||||
|
@ -3881,7 +3881,7 @@ class App(QtCore.QObject):
|
|||
filename = self.data_path + '/factory_defaults.FlatConfig'
|
||||
|
||||
if filename == "":
|
||||
self.inform.emit('[WARNING_NOTCL] %s' % _("Preferences default restore was cancelled."))
|
||||
self.inform.emit('[WARNING_NOTCL] %s' % _("Cancelled."))
|
||||
else:
|
||||
try:
|
||||
f = open(filename)
|
||||
|
@ -3930,7 +3930,7 @@ class App(QtCore.QObject):
|
|||
filename = str(filename)
|
||||
|
||||
if filename == "":
|
||||
self.inform.emit('[WARNING_NOTCL] %s' % _("FlatCAM preferences import cancelled."))
|
||||
self.inform.emit('[WARNING_NOTCL] %s' % _("Cancelled."))
|
||||
else:
|
||||
try:
|
||||
f = open(filename)
|
||||
|
@ -3985,7 +3985,7 @@ class App(QtCore.QObject):
|
|||
defaults_from_file = {}
|
||||
|
||||
if filename == "":
|
||||
self.inform.emit('[WARNING_NOTCL] %s' % _("FlatCAM preferences export cancelled."))
|
||||
self.inform.emit('[WARNING_NOTCL] %s' % _("Cancelled."))
|
||||
return
|
||||
else:
|
||||
try:
|
||||
|
@ -4060,7 +4060,7 @@ class App(QtCore.QObject):
|
|||
filename = str(filename)
|
||||
|
||||
if filename == "":
|
||||
self.inform.emit('[WARNING_NOTCL] %s' % _("Saving to file cancelled."))
|
||||
self.inform.emit('[WARNING_NOTCL] %s' % _("Cancelled."))
|
||||
return
|
||||
else:
|
||||
try:
|
||||
|
@ -6104,7 +6104,7 @@ class App(QtCore.QObject):
|
|||
val_x = float(self.defaults['global_gridx'])
|
||||
val_y = float(self.defaults['global_gridy'])
|
||||
|
||||
self.inform.emit('[WARNING_NOTCL]%s' % _("Units conversion cancelled."))
|
||||
self.inform.emit('[WARNING_NOTCL]%s' % _("Cancelled."))
|
||||
|
||||
self.defaults_read_form()
|
||||
|
||||
|
@ -7368,7 +7368,7 @@ class App(QtCore.QObject):
|
|||
self.report_usage("on_locate()")
|
||||
|
||||
if obj is None:
|
||||
self.inform.emit('[WARNING_NOTCL] %s' % _("There is no object selected..."))
|
||||
self.inform.emit('[WARNING_NOTCL] %s' % _("No object selected."))
|
||||
return 'fail'
|
||||
|
||||
class DialogBoxChoice(QtWidgets.QDialog):
|
||||
|
@ -9470,7 +9470,7 @@ class App(QtCore.QObject):
|
|||
color=QtGui.QColor("gray"))
|
||||
|
||||
if len(filenames) == 0:
|
||||
self.inform.emit('[WARNING_NOTCL] %s' % _("Open Gerber cancelled."))
|
||||
self.inform.emit('[WARNING_NOTCL] %s' % _("Cancelled."))
|
||||
else:
|
||||
for filename in filenames:
|
||||
if filename != '':
|
||||
|
@ -9507,8 +9507,7 @@ class App(QtCore.QObject):
|
|||
color=QtGui.QColor("gray"))
|
||||
|
||||
if len(filenames) == 0:
|
||||
self.inform.emit('[WARNING_NOTCL]%s' %
|
||||
_(" Open Excellon cancelled."))
|
||||
self.inform.emit('[WARNING_NOTCL]%s' % _("Cancelled."))
|
||||
else:
|
||||
for filename in filenames:
|
||||
if filename != '':
|
||||
|
@ -9550,8 +9549,7 @@ class App(QtCore.QObject):
|
|||
color=QtGui.QColor("gray"))
|
||||
|
||||
if len(filenames) == 0:
|
||||
self.inform.emit('[WARNING_NOTCL] %s' %
|
||||
_("Open G-Code cancelled."))
|
||||
self.inform.emit('[WARNING_NOTCL] %s' % _("Cancelled."))
|
||||
else:
|
||||
for filename in filenames:
|
||||
if filename != '':
|
||||
|
@ -9580,8 +9578,7 @@ class App(QtCore.QObject):
|
|||
filename = str(filename)
|
||||
|
||||
if filename == "":
|
||||
self.inform.emit('[WARNING_NOTCL] %s' %
|
||||
_("Open Project cancelled."))
|
||||
self.inform.emit('[WARNING_NOTCL] %s' % _("Cancelled."))
|
||||
else:
|
||||
# self.worker_task.emit({'fcn': self.open_project,
|
||||
# 'params': [filename]})
|
||||
|
@ -9621,7 +9618,7 @@ class App(QtCore.QObject):
|
|||
color=QtGui.QColor("gray"))
|
||||
|
||||
if len(filenames) == 0:
|
||||
self.inform.emit('[WARNING_NOTCL] %s' % _("Open HPGL2 file cancelled."))
|
||||
self.inform.emit('[WARNING_NOTCL] %s' % _("Cancelled."))
|
||||
else:
|
||||
for filename in filenames:
|
||||
if filename != '':
|
||||
|
@ -9646,8 +9643,7 @@ class App(QtCore.QObject):
|
|||
filter=_filter_)
|
||||
|
||||
if filename == "":
|
||||
self.inform.emit('[WARNING_NOTCL] %s' %
|
||||
_("Open Config cancelled."))
|
||||
self.inform.emit('[WARNING_NOTCL] %s' % _("Cancelled."))
|
||||
else:
|
||||
self.open_config_file(filename)
|
||||
|
||||
|
@ -9662,8 +9658,7 @@ class App(QtCore.QObject):
|
|||
|
||||
obj = self.collection.get_active()
|
||||
if obj is None:
|
||||
self.inform.emit('[WARNING_NOTCL] %s' %
|
||||
_("No object selected."))
|
||||
self.inform.emit('[WARNING_NOTCL] %s' % _("No object selected."))
|
||||
msg = _("Please Select a Geometry object to export")
|
||||
msgbox = QtWidgets.QMessageBox()
|
||||
msgbox.setInformativeText(msg)
|
||||
|
@ -9700,8 +9695,7 @@ class App(QtCore.QObject):
|
|||
filename = str(filename)
|
||||
|
||||
if filename == "":
|
||||
self.inform.emit('[WARNING_NOTCL]%s' %
|
||||
_(" Export SVG cancelled."))
|
||||
self.inform.emit('[WARNING_NOTCL]%s' % _("Cancelled."))
|
||||
return
|
||||
else:
|
||||
self.export_svg(name, filename)
|
||||
|
@ -9737,7 +9731,7 @@ class App(QtCore.QObject):
|
|||
filename = str(filename)
|
||||
|
||||
if filename == "":
|
||||
self.inform.emit(_("Export PNG cancelled."))
|
||||
self.inform.emit(_("Cancelled."))
|
||||
return
|
||||
else:
|
||||
if self.is_legacy is False:
|
||||
|
@ -9760,8 +9754,7 @@ class App(QtCore.QObject):
|
|||
|
||||
obj = self.collection.get_active()
|
||||
if obj is None:
|
||||
self.inform.emit('[WARNING_NOTCL] %s' %
|
||||
_("No object selected. Please select an Gerber object to export."))
|
||||
self.inform.emit('[WARNING_NOTCL] %s' % _("No object selected."))
|
||||
return
|
||||
|
||||
# Check for more compatible types and add as required
|
||||
|
@ -9784,8 +9777,7 @@ class App(QtCore.QObject):
|
|||
filename = str(filename)
|
||||
|
||||
if filename == "":
|
||||
self.inform.emit('[WARNING_NOTCL] %s' %
|
||||
_("Save Gerber source file cancelled."))
|
||||
self.inform.emit('[WARNING_NOTCL] %s' % _("Cancelled."))
|
||||
return
|
||||
else:
|
||||
self.save_source_file(name, filename)
|
||||
|
@ -9804,14 +9796,12 @@ class App(QtCore.QObject):
|
|||
|
||||
obj = self.collection.get_active()
|
||||
if obj is None:
|
||||
self.inform.emit('[WARNING_NOTCL] %s' %
|
||||
_("No object selected. Please select an Script object to export."))
|
||||
self.inform.emit('[WARNING_NOTCL] %s' % _("No object selected."))
|
||||
return
|
||||
|
||||
# Check for more compatible types and add as required
|
||||
if not isinstance(obj, FlatCAMScript):
|
||||
self.inform.emit('[ERROR_NOTCL] %s' %
|
||||
_("Failed. Only Script objects can be saved as TCL Script files..."))
|
||||
self.inform.emit('[ERROR_NOTCL] %s' % _("Failed. Only Script objects can be saved as TCL Script files..."))
|
||||
return
|
||||
|
||||
name = self.collection.get_active().options["name"]
|
||||
|
@ -9828,8 +9818,7 @@ class App(QtCore.QObject):
|
|||
filename = str(filename)
|
||||
|
||||
if filename == "":
|
||||
self.inform.emit('[WARNING_NOTCL] %s' %
|
||||
_("Save Script source file cancelled."))
|
||||
self.inform.emit('[WARNING_NOTCL] %s' % _("Cancelled."))
|
||||
return
|
||||
else:
|
||||
self.save_source_file(name, filename)
|
||||
|
@ -9848,14 +9837,12 @@ class App(QtCore.QObject):
|
|||
|
||||
obj = self.collection.get_active()
|
||||
if obj is None:
|
||||
self.inform.emit('[WARNING_NOTCL] %s' %
|
||||
_("No object selected. Please select an Document object to export."))
|
||||
self.inform.emit('[WARNING_NOTCL] %s' % _("No object selected."))
|
||||
return
|
||||
|
||||
# Check for more compatible types and add as required
|
||||
if not isinstance(obj, FlatCAMScript):
|
||||
self.inform.emit('[ERROR_NOTCL] %s' %
|
||||
_("Failed. Only Document objects can be saved as Document files..."))
|
||||
self.inform.emit('[ERROR_NOTCL] %s' % _("Failed. Only Document objects can be saved as Document files..."))
|
||||
return
|
||||
|
||||
name = self.collection.get_active().options["name"]
|
||||
|
@ -9872,8 +9859,7 @@ class App(QtCore.QObject):
|
|||
filename = str(filename)
|
||||
|
||||
if filename == "":
|
||||
self.inform.emit('[WARNING_NOTCL] %s' %
|
||||
_("Save Document source file cancelled."))
|
||||
self.inform.emit('[WARNING_NOTCL] %s' % _("Cancelled."))
|
||||
return
|
||||
else:
|
||||
self.save_source_file(name, filename)
|
||||
|
@ -9892,14 +9878,12 @@ class App(QtCore.QObject):
|
|||
|
||||
obj = self.collection.get_active()
|
||||
if obj is None:
|
||||
self.inform.emit('[WARNING_NOTCL] %s' %
|
||||
_("No object selected. Please select an Excellon object to export."))
|
||||
self.inform.emit('[WARNING_NOTCL] %s' % _("No object selected."))
|
||||
return
|
||||
|
||||
# Check for more compatible types and add as required
|
||||
if not isinstance(obj, FlatCAMExcellon):
|
||||
self.inform.emit('[ERROR_NOTCL] %s' %
|
||||
_("Failed. Only Excellon objects can be saved as Excellon files..."))
|
||||
self.inform.emit('[ERROR_NOTCL] %s' % _("Failed. Only Excellon objects can be saved as Excellon files..."))
|
||||
return
|
||||
|
||||
name = self.collection.get_active().options["name"]
|
||||
|
@ -9916,8 +9900,7 @@ class App(QtCore.QObject):
|
|||
filename = str(filename)
|
||||
|
||||
if filename == "":
|
||||
self.inform.emit('[WARNING_NOTCL] %s' %
|
||||
_("Saving Excellon source file cancelled."))
|
||||
self.inform.emit('[WARNING_NOTCL] %s' % _("Cancelled."))
|
||||
return
|
||||
else:
|
||||
self.save_source_file(name, filename)
|
||||
|
@ -9936,8 +9919,7 @@ class App(QtCore.QObject):
|
|||
|
||||
obj = self.collection.get_active()
|
||||
if obj is None:
|
||||
self.inform.emit('[WARNING_NOTCL] %s' %
|
||||
_("No object selected. Please Select an Excellon object to export."))
|
||||
self.inform.emit('[WARNING_NOTCL] %s' % _("No object selected."))
|
||||
return
|
||||
|
||||
# Check for more compatible types and add as required
|
||||
|
@ -9959,7 +9941,7 @@ class App(QtCore.QObject):
|
|||
filename = str(filename)
|
||||
|
||||
if filename == "":
|
||||
self.inform.emit('[WARNING_NOTCL] %s' % _("Export Excellon cancelled."))
|
||||
self.inform.emit('[WARNING_NOTCL] %s' % _("Cancelled."))
|
||||
return
|
||||
else:
|
||||
used_extension = filename.rpartition('.')[2]
|
||||
|
@ -9981,14 +9963,12 @@ class App(QtCore.QObject):
|
|||
|
||||
obj = self.collection.get_active()
|
||||
if obj is None:
|
||||
self.inform.emit('[WARNING_NOTCL] %s' %
|
||||
_("No object selected. Please Select an Gerber object to export."))
|
||||
self.inform.emit('[WARNING_NOTCL] %s' % _("No object selected."))
|
||||
return
|
||||
|
||||
# Check for more compatible types and add as required
|
||||
if not isinstance(obj, FlatCAMGerber):
|
||||
self.inform.emit('[ERROR_NOTCL] %s' %
|
||||
_("Failed. Only Gerber objects can be saved as Gerber files..."))
|
||||
self.inform.emit('[ERROR_NOTCL] %s' % _("Failed. Only Gerber objects can be saved as Gerber files..."))
|
||||
return
|
||||
|
||||
name = self.collection.get_active().options["name"]
|
||||
|
@ -10005,7 +9985,7 @@ class App(QtCore.QObject):
|
|||
filename = str(filename)
|
||||
|
||||
if filename == "":
|
||||
self.inform.emit('[WARNING_NOTCL] %s' % _("Export Gerber cancelled."))
|
||||
self.inform.emit('[WARNING_NOTCL] %s' % _("Cancelled."))
|
||||
return
|
||||
else:
|
||||
used_extension = filename.rpartition('.')[2]
|
||||
|
@ -10061,7 +10041,7 @@ class App(QtCore.QObject):
|
|||
filename = str(filename)
|
||||
|
||||
if filename == "":
|
||||
self.inform.emit('[WARNING_NOTCL] %s' % _("Export DXF cancelled."))
|
||||
self.inform.emit('[WARNING_NOTCL] %s' % _("Cancelled."))
|
||||
return
|
||||
else:
|
||||
self.export_dxf(name, filename)
|
||||
|
@ -10093,7 +10073,7 @@ class App(QtCore.QObject):
|
|||
filenames = [str(filename) for filename in filenames]
|
||||
|
||||
if len(filenames) == 0:
|
||||
self.inform.emit('[WARNING_NOTCL] %s' % _("Open SVG cancelled."))
|
||||
self.inform.emit('[WARNING_NOTCL] %s' % _("Cancelled."))
|
||||
else:
|
||||
for filename in filenames:
|
||||
if filename != '':
|
||||
|
@ -10125,7 +10105,7 @@ class App(QtCore.QObject):
|
|||
filenames = [str(filename) for filename in filenames]
|
||||
|
||||
if len(filenames) == 0:
|
||||
self.inform.emit('[WARNING_NOTCL] %s' % _("Open DXF cancelled."))
|
||||
self.inform.emit('[WARNING_NOTCL] %s' % _("Cancelled."))
|
||||
else:
|
||||
for filename in filenames:
|
||||
if filename != '':
|
||||
|
@ -10362,7 +10342,7 @@ class App(QtCore.QObject):
|
|||
|
||||
if len(filenames) == 0:
|
||||
if silent is False:
|
||||
self.inform.emit('[WARNING_NOTCL] %s' % _("Open TCL script cancelled."))
|
||||
self.inform.emit('[WARNING_NOTCL] %s' % _("Cancelled."))
|
||||
else:
|
||||
for filename in filenames:
|
||||
if filename != '':
|
||||
|
@ -10406,7 +10386,7 @@ class App(QtCore.QObject):
|
|||
|
||||
if filename == "":
|
||||
if silent is False:
|
||||
self.inform.emit('[WARNING_NOTCL] %s' % _("Run TCL script cancelled."))
|
||||
self.inform.emit('[WARNING_NOTCL] %s' % _("Cancelled."))
|
||||
else:
|
||||
if self.cmd_line_headless != 1:
|
||||
if self.ui.shell_dock.isHidden():
|
||||
|
@ -10483,7 +10463,7 @@ class App(QtCore.QObject):
|
|||
filename = str(filename)
|
||||
|
||||
if filename == '':
|
||||
self.inform.emit('[WARNING_NOTCL] %s' % _("Save Project cancelled."))
|
||||
self.inform.emit('[WARNING_NOTCL] %s' % _("Cancelled."))
|
||||
return
|
||||
|
||||
if use_thread is True:
|
||||
|
@ -10538,7 +10518,7 @@ class App(QtCore.QObject):
|
|||
filename = str(filename)
|
||||
|
||||
if filename == '':
|
||||
self.inform.emit('[WARNING_NOTCL] %s' % _("Save Object PDF cancelled."))
|
||||
self.inform.emit('[WARNING_NOTCL] %s' % _("Cancelled."))
|
||||
return
|
||||
|
||||
if use_thread is True:
|
||||
|
|
|
@ -368,7 +368,7 @@ class BookmarkManager(QtWidgets.QWidget):
|
|||
filename = str(filename)
|
||||
|
||||
if filename == "":
|
||||
self.app.inform.emit('[WARNING_NOTCL] %s' % _("FlatCAM bookmarks export cancelled."))
|
||||
self.app.inform.emit('[WARNING_NOTCL] %s' % _("Cancelled."))
|
||||
return
|
||||
else:
|
||||
try:
|
||||
|
@ -410,7 +410,7 @@ class BookmarkManager(QtWidgets.QWidget):
|
|||
filename = str(filename)
|
||||
|
||||
if filename == "":
|
||||
self.app.inform.emit('[WARNING_NOTCL] %s' % _("FlatCAM bookmarks import cancelled."))
|
||||
self.app.inform.emit('[WARNING_NOTCL] %s' % _("Cancelled."))
|
||||
else:
|
||||
try:
|
||||
with open(filename) as f:
|
||||
|
@ -1104,7 +1104,7 @@ class ToolsDB(QtWidgets.QWidget):
|
|||
filename = str(filename)
|
||||
|
||||
if filename == "":
|
||||
self.app.inform.emit('[WARNING_NOTCL] %s' % _("FlatCAM Tools DB export cancelled."))
|
||||
self.app.inform.emit('[WARNING_NOTCL] %s' % _("Cancelled."))
|
||||
return
|
||||
else:
|
||||
try:
|
||||
|
@ -1150,7 +1150,7 @@ class ToolsDB(QtWidgets.QWidget):
|
|||
filename, _f = QtWidgets.QFileDialog.getOpenFileName(caption=_("Import FlatCAM Tools DB"), filter=filter__)
|
||||
|
||||
if filename == "":
|
||||
self.app.inform.emit('[WARNING_NOTCL] %s' % _("FlatCAM Tools DB import cancelled."))
|
||||
self.app.inform.emit('[WARNING_NOTCL] %s' % _("Cancelled."))
|
||||
else:
|
||||
try:
|
||||
with open(filename) as f:
|
||||
|
@ -2534,7 +2534,7 @@ class ToolsDB2(QtWidgets.QWidget):
|
|||
filename = str(filename)
|
||||
|
||||
if filename == "":
|
||||
self.app.inform.emit('[WARNING_NOTCL] %s' % _("FlatCAM Tools DB export cancelled."))
|
||||
self.app.inform.emit('[WARNING_NOTCL] %s' % _("Cancelled."))
|
||||
return
|
||||
else:
|
||||
try:
|
||||
|
@ -2580,7 +2580,7 @@ class ToolsDB2(QtWidgets.QWidget):
|
|||
filename, _f = QtWidgets.QFileDialog.getOpenFileName(caption=_("Import FlatCAM Tools DB"), filter=filter__)
|
||||
|
||||
if filename == "":
|
||||
self.app.inform.emit('[WARNING_NOTCL] %s' % _("FlatCAM Tools DB import cancelled."))
|
||||
self.app.inform.emit('[WARNING_NOTCL] %s' % _("Cancelled."))
|
||||
else:
|
||||
try:
|
||||
with open(filename) as f:
|
||||
|
|
|
@ -119,7 +119,7 @@ class KeySensitiveListView(QtWidgets.QTreeView):
|
|||
# file drop from outside application
|
||||
if drop_indicator == QtWidgets.QAbstractItemView.OnItem:
|
||||
if self.filename == "":
|
||||
self.app.inform.emit(_("Open cancelled."))
|
||||
self.app.inform.emit(_("Cancelled."))
|
||||
else:
|
||||
if self.filename.lower().rpartition('.')[-1] in self.app.grb_list:
|
||||
self.app.worker_task.emit({'fcn': self.app.open_gerber,
|
||||
|
|
|
@ -1021,8 +1021,7 @@ class FCDrillResize(FCShapeTool):
|
|||
self.geometry.append(DrawToolShape(new_poly))
|
||||
else:
|
||||
# unexpected geometry so we cancel
|
||||
self.draw_app.app.inform.emit('[ERROR_NOTCL] %s' %
|
||||
_("Cancelled."))
|
||||
self.draw_app.app.inform.emit('[ERROR_NOTCL] %s' % _("Cancelled."))
|
||||
return
|
||||
|
||||
# remove the geometry with the old size
|
||||
|
@ -1090,8 +1089,7 @@ class FCDrillResize(FCShapeTool):
|
|||
except KeyError:
|
||||
# if the exception happen here then we are not dealing with slots neither
|
||||
# therefore something else is not OK so we return
|
||||
self.draw_app.app.inform.emit('[ERROR_NOTCL] %s' %
|
||||
_("Cancelled."))
|
||||
self.draw_app.app.inform.emit('[ERROR_NOTCL] %s' % _("Cancelled."))
|
||||
return
|
||||
|
||||
# this simple hack is used so we can delete form self.draw_app.selected but
|
||||
|
|
|
@ -581,7 +581,7 @@ class PaintOptionsTool(FlatCAMTool):
|
|||
|
||||
def on_paint(self):
|
||||
if not self.fcdraw.selected:
|
||||
self.app.inform.emit('[WARNING_NOTCL] %s' % _("Paint cancelled. No shape selected."))
|
||||
self.app.inform.emit('[WARNING_NOTCL] %s' % _("Cancelled. No shape selected."))
|
||||
return
|
||||
|
||||
tooldia = self.painttooldia_entry.get_value()
|
||||
|
@ -1053,7 +1053,7 @@ class TransformEditorTool(FlatCAMTool):
|
|||
|
||||
def template(self):
|
||||
if not self.draw_app.selected:
|
||||
self.app.inform.emit('[WARNING_NOTCL] %s' % _("Transformation cancelled. No shape selected."))
|
||||
self.app.inform.emit('[WARNING_NOTCL] %s' % _("Cancelled. No shape selected."))
|
||||
return
|
||||
|
||||
self.draw_app.select_tool("select")
|
||||
|
@ -3022,7 +3022,7 @@ class FCBuffer(FCShapeTool):
|
|||
|
||||
def on_buffer(self):
|
||||
if not self.draw_app.selected:
|
||||
self.app.inform.emit('[WARNING_NOTCL] %s' % _("Buffer cancelled. No shape selected."))
|
||||
self.app.inform.emit('[WARNING_NOTCL] %s' % _("Cancelled. No shape selected."))
|
||||
return
|
||||
|
||||
try:
|
||||
|
@ -3050,7 +3050,7 @@ class FCBuffer(FCShapeTool):
|
|||
|
||||
def on_buffer_int(self):
|
||||
if not self.draw_app.selected:
|
||||
self.app.inform.emit('[WARNING_NOTCL] %s' % _("Buffer cancelled. No shape selected."))
|
||||
self.app.inform.emit('[WARNING_NOTCL] %s' % _("Cancelled. No shape selected."))
|
||||
return
|
||||
|
||||
try:
|
||||
|
@ -3078,7 +3078,7 @@ class FCBuffer(FCShapeTool):
|
|||
|
||||
def on_buffer_ext(self):
|
||||
if not self.draw_app.selected:
|
||||
self.app.inform.emit('[WARNING_NOTCL] %s' % _("Buffer cancelled. No shape selected."))
|
||||
self.app.inform.emit('[WARNING_NOTCL] %s' % _("Cancelled. No shape selected."))
|
||||
return
|
||||
|
||||
try:
|
||||
|
@ -4499,8 +4499,7 @@ class FlatCAMGeoEditor(QtCore.QObject):
|
|||
|
||||
def on_copy_click(self):
|
||||
if not self.selected:
|
||||
self.app.inform.emit('[WARNING_NOTCL] %s' %
|
||||
_("Copy cancelled. No shape selected."))
|
||||
self.app.inform.emit('[WARNING_NOTCL] %s' % _("Cancelled. No shape selected."))
|
||||
return
|
||||
|
||||
self.app.ui.geo_copy_btn.setChecked(True)
|
||||
|
|
|
@ -4262,8 +4262,7 @@ class FlatCAMGrbEditor(QtCore.QObject):
|
|||
# self.draw_app.select_tool('select')
|
||||
self.complete = True
|
||||
current_tool = 'select'
|
||||
self.app.inform.emit('[WARNING_NOTCL] %s' %
|
||||
_("Cancelled. No aperture is selected"))
|
||||
self.app.inform.emit('[WARNING_NOTCL] %s' % _("Cancelled. No aperture is selected"))
|
||||
|
||||
# This is to make the group behave as radio group
|
||||
if current_tool in self.tools_gerber:
|
||||
|
@ -5599,8 +5598,7 @@ class TransformEditorTool(FlatCAMTool):
|
|||
|
||||
def template(self):
|
||||
if not self.fcdraw.selected:
|
||||
self.app.inform.emit('[WARNING_NOTCL] %s' %
|
||||
_("Transformation cancelled. No shape selected."))
|
||||
self.app.inform.emit('[WARNING_NOTCL] %s' % _("Cancelled. No shape selected."))
|
||||
return
|
||||
|
||||
self.draw_app.select_tool("select")
|
||||
|
|
|
@ -220,7 +220,7 @@ class TextEditor(QtWidgets.QWidget):
|
|||
filename = str(FCFileSaveDialog.get_saved_filename(caption=_("Export Code ..."), filter=_filter_)[0])
|
||||
|
||||
if filename == "":
|
||||
self.app.inform.emit('[WARNING_NOTCL] %s' % _("Export Code cancelled."))
|
||||
self.app.inform.emit('[WARNING_NOTCL] %s' % _("Cancelled."))
|
||||
return
|
||||
else:
|
||||
try:
|
||||
|
|
|
@ -3614,8 +3614,7 @@ class FlatCAMGUI(QtWidgets.QMainWindow):
|
|||
self.app.grb_editor.delete_selected()
|
||||
self.app.grb_editor.plot_all()
|
||||
else:
|
||||
self.app.inform.emit('[WARNING_NOTCL] %s' %
|
||||
_("Cancelled. Nothing selected to delete."))
|
||||
self.app.inform.emit('[WARNING_NOTCL] %s' % _("Cancelled. Nothing selected to delete."))
|
||||
return
|
||||
|
||||
# Delete aperture in apertures table if delete key event comes from the Selected Tab
|
||||
|
@ -3699,8 +3698,7 @@ class FlatCAMGUI(QtWidgets.QMainWindow):
|
|||
self.app.grb_editor.active_tool.set_origin(
|
||||
(self.app.grb_editor.snap_x, self.app.grb_editor.snap_y))
|
||||
else:
|
||||
self.app.inform.emit('[WARNING_NOTCL] %s' %
|
||||
_("Cancelled. Nothing selected to copy."))
|
||||
self.app.inform.emit('[WARNING_NOTCL] %s' % _("Cancelled. Nothing selected to copy."))
|
||||
return
|
||||
|
||||
# Add Disc Tool
|
||||
|
@ -3746,8 +3744,7 @@ class FlatCAMGUI(QtWidgets.QMainWindow):
|
|||
self.app.grb_editor.active_tool.set_origin(
|
||||
(self.app.grb_editor.snap_x, self.app.grb_editor.snap_y))
|
||||
else:
|
||||
self.app.inform.emit('[WARNING_NOTCL] %s' %
|
||||
_("Cancelled. Nothing selected to move."))
|
||||
self.app.inform.emit('[WARNING_NOTCL] %s' % _("Cancelled. Nothing selected to move."))
|
||||
return
|
||||
|
||||
# Add Region Tool
|
||||
|
@ -3828,8 +3825,7 @@ class FlatCAMGUI(QtWidgets.QMainWindow):
|
|||
self.app.exc_editor.delete_selected()
|
||||
self.app.exc_editor.replot()
|
||||
else:
|
||||
self.app.inform.emit('[WARNING_NOTCL] %s' %
|
||||
_("Cancelled. Nothing selected to delete."))
|
||||
self.app.inform.emit('[WARNING_NOTCL] %s' % _("Cancelled. Nothing selected to delete."))
|
||||
return
|
||||
|
||||
# Delete tools in tools table if delete key event comes from the Selected Tab
|
||||
|
@ -3945,8 +3941,7 @@ class FlatCAMGUI(QtWidgets.QMainWindow):
|
|||
self.app.exc_editor.active_tool.set_origin(
|
||||
(self.app.exc_editor.snap_x, self.app.exc_editor.snap_y))
|
||||
else:
|
||||
self.app.inform.emit('[WARNING_NOTCL] %s' %
|
||||
_("Cancelled. Nothing selected to copy."))
|
||||
self.app.inform.emit('[WARNING_NOTCL] %s' % _("Cancelled. Nothing selected to copy."))
|
||||
return
|
||||
|
||||
# Add Drill Hole Tool
|
||||
|
@ -3975,8 +3970,7 @@ class FlatCAMGUI(QtWidgets.QMainWindow):
|
|||
self.app.exc_editor.active_tool.set_origin(
|
||||
(self.app.exc_editor.snap_x, self.app.exc_editor.snap_y))
|
||||
else:
|
||||
self.app.inform.emit('[WARNING_NOTCL] %s' %
|
||||
_("Cancelled. Nothing selected to move."))
|
||||
self.app.inform.emit('[WARNING_NOTCL] %s' % _("Cancelled. Nothing selected to move."))
|
||||
return
|
||||
|
||||
# Add Array of Slots Hole Tool
|
||||
|
@ -4131,7 +4125,7 @@ class FlatCAMGUI(QtWidgets.QMainWindow):
|
|||
self.filename = str(url.toLocalFile())
|
||||
|
||||
if self.filename == "":
|
||||
self.app.inform.emit("Open cancelled.")
|
||||
self.app.inform.emit("Cancelled.")
|
||||
else:
|
||||
extension = self.filename.lower().rpartition('.')[-1]
|
||||
|
||||
|
|
|
@ -751,7 +751,7 @@ class Film(FlatCAMTool):
|
|||
filename = str(filename)
|
||||
|
||||
if str(filename) == "":
|
||||
self.app.inform.emit('[WARNING_NOTCL] %s' % _("Export positive film cancelled."))
|
||||
self.app.inform.emit('[WARNING_NOTCL] %s' % _("Cancelled."))
|
||||
return
|
||||
else:
|
||||
pagesize = self.pagesize_combo.get_value()
|
||||
|
@ -897,7 +897,7 @@ class Film(FlatCAMTool):
|
|||
filename = str(filename)
|
||||
|
||||
if str(filename) == "":
|
||||
self.app.inform.emit('[WARNING_NOTCL] %s' % _("Export negative film cancelled."))
|
||||
self.app.inform.emit('[WARNING_NOTCL] %s' % _("Cancelled."))
|
||||
return
|
||||
else:
|
||||
self.export_negative(name, boxname, filename, border,
|
||||
|
|
|
@ -244,7 +244,7 @@ class ToolImage(FlatCAMTool):
|
|||
self.mask_b_entry.get_value()]
|
||||
|
||||
if filename == "":
|
||||
self.app.inform.emit(_("Open cancelled."))
|
||||
self.app.inform.emit(_("Cancelled."))
|
||||
else:
|
||||
self.app.worker_task.emit({'fcn': self.import_image,
|
||||
'params': [filename, type_obj, dpi, mode, mask]})
|
||||
|
|
|
@ -111,7 +111,7 @@ class ToolMove(FlatCAMTool):
|
|||
self.draw_sel_bbox()
|
||||
else:
|
||||
self.toggle()
|
||||
self.app.inform.emit('[WARNING_NOTCL] %s' % _("MOVE action cancelled. No object(s) to move."))
|
||||
self.app.inform.emit('[WARNING_NOTCL] %s' % _("Cancelled. No object(s) to move."))
|
||||
|
||||
def on_left_click(self, event):
|
||||
# mouse click will be accepted only if the left button is clicked
|
||||
|
@ -267,7 +267,7 @@ class ToolMove(FlatCAMTool):
|
|||
def on_key_press(self, event):
|
||||
if event.key == 'escape':
|
||||
# abort the move action
|
||||
self.app.inform.emit('[WARNING_NOTCL] %s' % _("Move action cancelled."))
|
||||
self.app.inform.emit('[WARNING_NOTCL] %s' % _("Cancelled."))
|
||||
self.toggle()
|
||||
return
|
||||
|
||||
|
|
|
@ -1457,7 +1457,7 @@ class NonCopperClear(FlatCAMTool, Gerber):
|
|||
|
||||
if float('%.*f' % (self.decimals, tool_dia)) in tool_dias:
|
||||
if muted is None:
|
||||
self.app.inform.emit('[WARNING_NOTCL] %s' % _("Adding tool cancelled. Tool already in Tool Table."))
|
||||
self.app.inform.emit('[WARNING_NOTCL] %s' % _("Cancelled. Tool already in Tool Table."))
|
||||
# self.tools_table.itemChanged.connect(self.on_tool_edit)
|
||||
self.blockSignals(False)
|
||||
|
||||
|
@ -1520,7 +1520,7 @@ class NonCopperClear(FlatCAMTool, Gerber):
|
|||
break
|
||||
restore_dia_item = self.tools_table.item(row, 1)
|
||||
restore_dia_item.setText(str(old_tool_dia))
|
||||
self.app.inform.emit('[WARNING_NOTCL] %s' % _("Edit cancelled. "
|
||||
self.app.inform.emit('[WARNING_NOTCL] %s' % _("Cancelled. "
|
||||
"New diameter value is already in the Tool Table."))
|
||||
self.blockSignals(False)
|
||||
self.build_ui()
|
||||
|
@ -4010,7 +4010,7 @@ class NonCopperClear(FlatCAMTool, Gerber):
|
|||
tool_dias.append(float('%.*f' % (self.decimals, (v[tool_v]))))
|
||||
|
||||
if float('%.*f' % (self.decimals, tooldia)) in tool_dias:
|
||||
self.app.inform.emit('[WARNING_NOTCL] %s' % _("Adding tool cancelled. Tool already in Tool Table."))
|
||||
self.app.inform.emit('[WARNING_NOTCL] %s' % _("Cancelled. Tool already in Tool Table."))
|
||||
self.ui_connect()
|
||||
return 'fail'
|
||||
|
||||
|
|
|
@ -1193,7 +1193,7 @@ class ToolPaint(FlatCAMTool, Gerber):
|
|||
|
||||
if float('%.*f' % (self.decimals, tool_dia)) in tool_dias:
|
||||
if muted is None:
|
||||
self.app.inform.emit('[WARNING_NOTCL] %s' % _("Adding tool cancelled. Tool already in Tool Table."))
|
||||
self.app.inform.emit('[WARNING_NOTCL] %s' % _("Cancelled. Tool already in Tool Table."))
|
||||
self.tools_table.itemChanged.connect(self.on_tool_edit)
|
||||
return
|
||||
else:
|
||||
|
@ -1254,7 +1254,7 @@ class ToolPaint(FlatCAMTool, Gerber):
|
|||
restore_dia_item = self.tools_table.item(row, 1)
|
||||
restore_dia_item.setText(str(old_tool_dia))
|
||||
self.app.inform.emit('[WARNING_NOTCL] %s' %
|
||||
_("Edit cancelled. New diameter value is already in the Tool Table."))
|
||||
_("Cancelled. New diameter value is already in the Tool Table."))
|
||||
self.blockSignals(False)
|
||||
self.build_ui()
|
||||
|
||||
|
@ -4074,7 +4074,7 @@ class ToolPaint(FlatCAMTool, Gerber):
|
|||
tool_dias.append(float('%.*f' % (self.decimals, (v[tool_v]))))
|
||||
|
||||
if float('%.*f' % (self.decimals, tooldia)) in tool_dias:
|
||||
self.app.inform.emit('[WARNING_NOTCL] %s' % _("Adding tool cancelled. Tool already in Tool Table."))
|
||||
self.app.inform.emit('[WARNING_NOTCL] %s' % _("Cancelled. Tool already in Tool Table."))
|
||||
self.ui_connect()
|
||||
return 'fail'
|
||||
|
||||
|
|
|
@ -298,7 +298,7 @@ class PcbWizard(FlatCAMTool):
|
|||
filename = str(filename)
|
||||
|
||||
if filename == "":
|
||||
self.app.inform.emit(_("Open cancelled."))
|
||||
self.app.inform.emit(_("Cancelled."))
|
||||
else:
|
||||
self.app.worker_task.emit({'fcn': self.load_excellon, 'params': [filename]})
|
||||
|
||||
|
@ -321,7 +321,7 @@ class PcbWizard(FlatCAMTool):
|
|||
filename = str(filename)
|
||||
|
||||
if filename == "":
|
||||
self.app.inform.emit(_("Open cancelled."))
|
||||
self.app.inform.emit(_("Cancelled."))
|
||||
else:
|
||||
self.app.worker_task.emit({'fcn': self.load_inf, 'params': [filename]})
|
||||
|
||||
|
|
|
@ -113,7 +113,7 @@ class Properties(FlatCAMTool):
|
|||
def properties(self):
|
||||
obj_list = self.app.collection.get_selected()
|
||||
if not obj_list:
|
||||
self.app.inform.emit('[ERROR_NOTCL] %s' % _("Properties Tool was not displayed. No object selected."))
|
||||
self.app.inform.emit('[ERROR_NOTCL] %s' % _("No object selected."))
|
||||
self.app.ui.notebook.setTabText(2, _("Tools"))
|
||||
self.properties_frame.hide()
|
||||
self.app.ui.notebook.setCurrentWidget(self.app.ui.project_tab)
|
||||
|
|
|
@ -788,7 +788,7 @@ class QRCode(FlatCAMTool):
|
|||
filename = str(filename)
|
||||
|
||||
if filename == "":
|
||||
self.app.inform.emit('[WARNING_NOTCL]%s' % _(" Export PNG cancelled."))
|
||||
self.app.inform.emit('[WARNING_NOTCL]%s' % _("Cancelled."))
|
||||
return
|
||||
else:
|
||||
self.app.worker_task.emit({'fcn': job_thread_qr_png, 'params': [self.app, filename]})
|
||||
|
@ -835,7 +835,7 @@ class QRCode(FlatCAMTool):
|
|||
filename = str(filename)
|
||||
|
||||
if filename == "":
|
||||
self.app.inform.emit('[WARNING_NOTCL]%s' % _(" Export SVG cancelled."))
|
||||
self.app.inform.emit('[WARNING_NOTCL]%s' % _("Cancelled."))
|
||||
return
|
||||
else:
|
||||
self.app.worker_task.emit({'fcn': job_thread_qr_svg, 'params': [self.app, filename]})
|
||||
|
|
|
@ -914,14 +914,12 @@ class SolderPaste(FlatCAMTool):
|
|||
|
||||
if float('%.*f' % (self.decimals, tool_dia)) in tool_dias:
|
||||
if muted is None:
|
||||
self.app.inform.emit('[WARNING_NOTCL] %s' %
|
||||
_("Adding Nozzle tool cancelled. Tool already in Tool Table."))
|
||||
self.app.inform.emit('[WARNING_NOTCL] %s' % _("Cancelled. Tool already in Tool Table."))
|
||||
self.tools_table.itemChanged.connect(self.on_tool_edit)
|
||||
return
|
||||
else:
|
||||
if muted is None:
|
||||
self.app.inform.emit('[success] %s' %
|
||||
_("New Nozzle tool added to Tool Table."))
|
||||
self.app.inform.emit('[success] %s' % _("New Nozzle tool added to Tool Table."))
|
||||
self.tooltable_tools.update({
|
||||
int(self.tooluid): {
|
||||
'tooldia': float('%.*f' % (self.decimals, tool_dia)),
|
||||
|
@ -976,7 +974,7 @@ class SolderPaste(FlatCAMTool):
|
|||
restore_dia_item = self.tools_table.item(row, 1)
|
||||
restore_dia_item.setText(str(old_tool_dia))
|
||||
self.app.inform.emit('[WARNING_NOTCL] %s' %
|
||||
_("Edit cancelled. New diameter value is already in the Tool Table."))
|
||||
_("Cancelled. New diameter value is already in the Tool Table."))
|
||||
self.build_ui()
|
||||
|
||||
def on_tool_delete(self, rows_to_delete=None, all=None):
|
||||
|
@ -1241,12 +1239,10 @@ class SolderPaste(FlatCAMTool):
|
|||
if not geo_obj.tools[tooluid_key]['solid_geometry']:
|
||||
a += 1
|
||||
if a == len(geo_obj.tools):
|
||||
self.app.inform.emit('[ERROR_NOTCL] %s' %
|
||||
_('Cancelled. Empty file, it has no geometry...'))
|
||||
self.app.inform.emit('[ERROR_NOTCL] %s' % _('Cancelled. Empty file, it has no geometry...'))
|
||||
return 'fail'
|
||||
|
||||
app_obj.inform.emit('[success] %s...' %
|
||||
_("Solder Paste geometry generated successfully"))
|
||||
app_obj.inform.emit('[success] %s...' % _("Solder Paste geometry generated successfully"))
|
||||
return
|
||||
|
||||
# if we still have geometry not processed at the end of the tools then we failed
|
||||
|
|
|
@ -7,8 +7,16 @@ from copy import deepcopy
|
|||
from shapely.ops import cascaded_union
|
||||
from shapely.geometry import Polygon, LineString, LinearRing
|
||||
|
||||
import gettext
|
||||
import FlatCAMTranslation as fcTranslate
|
||||
import builtins
|
||||
|
||||
log = logging.getLogger('base')
|
||||
|
||||
fcTranslate.apply_language('strings')
|
||||
if '_' not in builtins.__dict__:
|
||||
_ = gettext.gettext
|
||||
|
||||
|
||||
class TclCommandGeoCutout(TclCommandSignaled):
|
||||
"""
|
||||
|
@ -137,7 +145,7 @@ class TclCommandGeoCutout(TclCommandSignaled):
|
|||
name = args['name']
|
||||
else:
|
||||
self.app.inform.emit(
|
||||
"[WARNING]The name of the object for which cutout is done is missing. Add it and retry.")
|
||||
"[WARNING] %s" % _("The name of the object for which cutout is done is missing. Add it and retry."))
|
||||
return
|
||||
|
||||
if 'margin' in args:
|
||||
|
@ -173,12 +181,13 @@ class TclCommandGeoCutout(TclCommandSignaled):
|
|||
return "Could not retrieve object: %s" % name
|
||||
|
||||
if 0 in {dia}:
|
||||
self.app.inform.emit("[WARNING]Tool Diameter is zero value. Change it to a positive real number.")
|
||||
self.app.inform.emit(
|
||||
"[WARNING] %s" % _("Tool Diameter is zero value. Change it to a positive real number."))
|
||||
return "Tool Diameter is zero value. Change it to a positive real number."
|
||||
|
||||
if gaps not in ['lr', 'tb', '2lr', '2tb', '4', '8']:
|
||||
self.app.inform.emit("[WARNING]Gaps value can be only one of: 'lr', 'tb', '2lr', '2tb', 4 or 8. "
|
||||
"Fill in a correct value and retry. ")
|
||||
self.app.inform.emit(
|
||||
"[WARNING] %s" % _("Gaps value can be only one of: 'lr', 'tb', '2lr', '2tb', 4 or 8."))
|
||||
return
|
||||
|
||||
# Get min and max data for each object as we just cut rectangles across X or Y
|
||||
|
@ -290,7 +299,7 @@ class TclCommandGeoCutout(TclCommandSignaled):
|
|||
|
||||
app_obj.disable_plots(objects=[cutout_obj])
|
||||
|
||||
app_obj.inform.emit("[success] Any-form Cutout operation finished.")
|
||||
app_obj.inform.emit("[success] %s" % _("Any-form Cutout operation finished."))
|
||||
|
||||
self.app.new_object('geometry', outname, geo_init, plot=False)
|
||||
|
||||
|
@ -348,11 +357,11 @@ class TclCommandGeoCutout(TclCommandSignaled):
|
|||
geo_obj.options['ymin'] = cutout_obj.options['ymin']
|
||||
geo_obj.options['xmax'] = cutout_obj.options['xmax']
|
||||
geo_obj.options['ymax'] = cutout_obj.options['ymax']
|
||||
app_obj.inform.emit("[success] Any-form Cutout operation finished.")
|
||||
app_obj.inform.emit("[success] %s" % _("Any-form Cutout operation finished."))
|
||||
|
||||
self.app.new_object('geometry', outname, geo_init, plot=False)
|
||||
|
||||
cutout_obj = self.app.collection.get_by_name(outname)
|
||||
else:
|
||||
self.app.inform.emit("[ERROR]Cancelled. Object type is not supported.")
|
||||
self.app.inform.emit("[ERROR] %s" % _("Cancelled. Object type is not supported."))
|
||||
return
|
||||
|
|
Loading…
Reference in New Issue