- some message strings cleanup

This commit is contained in:
Marius Stanciu
2020-04-24 07:23:14 +03:00
committed by Marius
parent 26dd29e7dd
commit 7df7e17569
19 changed files with 102 additions and 127 deletions

View File

@@ -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,

View File

@@ -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]})

View File

@@ -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

View File

@@ -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'

View File

@@ -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'

View File

@@ -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]})

View File

@@ -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)

View File

@@ -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]})

View File

@@ -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