- added a fix in the Gerber parser when adding the geometry in the self.apertures dict for the case that the current aperture is None (Allegro does that)
- finished support for internationalization by adding a set of .po/.mo files for the English language. Unfortunately the final action can be done only when Beta will be out of Beta (no more changes) or when I will decide to stop working on this app. - changed the tooltip for 'feedrate_rapids' parameter to point out that this parameter is useful only for the Marlin postprocessor
This commit is contained in:
@@ -19,13 +19,6 @@ import FlatCAMTranslation as fcTranslate
|
||||
fcTranslate.apply_language('ObjectCollection')
|
||||
|
||||
|
||||
def _tr(text):
|
||||
try:
|
||||
return _(text)
|
||||
except:
|
||||
return text
|
||||
|
||||
|
||||
class KeySensitiveListView(QtWidgets.QTreeView):
|
||||
"""
|
||||
QtGui.QListView extended to emit a signal on key press.
|
||||
@@ -76,7 +69,7 @@ class KeySensitiveListView(QtWidgets.QTreeView):
|
||||
# file drop from outside application
|
||||
if drop_indicator == QtWidgets.QAbstractItemView.OnItem:
|
||||
if self.filename == "":
|
||||
self.app.inform.emit(_tr("Open cancelled."))
|
||||
self.app.inform.emit(_("Open cancelled."))
|
||||
else:
|
||||
if self.filename.lower().rpartition('.')[-1] in self.app.grb_list:
|
||||
self.app.worker_task.emit({'fcn': self.app.open_gerber,
|
||||
@@ -398,7 +391,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(_tr("Object renamed from %s to %s") % (old_name, new_name))
|
||||
self.app.inform.emit(_("Object renamed from %s to %s") % (old_name, new_name))
|
||||
|
||||
return True
|
||||
|
||||
@@ -692,16 +685,16 @@ class ObjectCollection(QtCore.QAbstractItemModel):
|
||||
obj = current.indexes()[0].internalPointer().obj
|
||||
|
||||
if obj.kind == 'gerber':
|
||||
self.app.inform.emit(_tr('[selected]<span style="color:%s;">%s</span> selected') %
|
||||
self.app.inform.emit(_('[selected]<span style="color:%s;">%s</span> selected') %
|
||||
('green', str(obj.options['name'])))
|
||||
elif obj.kind == 'excellon':
|
||||
self.app.inform.emit(_tr('[selected]<span style="color:%s;">%s</span> selected') %
|
||||
self.app.inform.emit(_('[selected]<span style="color:%s;">%s</span> selected') %
|
||||
('brown', str(obj.options['name'])))
|
||||
elif obj.kind == 'cncjob':
|
||||
self.app.inform.emit(_tr('[selected]<span style="color:%s;">%s</span> selected') %
|
||||
self.app.inform.emit(_('[selected]<span style="color:%s;">%s</span> selected') %
|
||||
('blue', str(obj.options['name'])))
|
||||
elif obj.kind == 'geometry':
|
||||
self.app.inform.emit(_tr('[selected]<span style="color:%s;">%s</span> selected') %
|
||||
self.app.inform.emit(_('[selected]<span style="color:%s;">%s</span> selected') %
|
||||
('red', str(obj.options['name'])))
|
||||
|
||||
except IndexError:
|
||||
@@ -732,7 +725,7 @@ class ObjectCollection(QtCore.QAbstractItemModel):
|
||||
try:
|
||||
a_idx.build_ui()
|
||||
except Exception as e:
|
||||
self.app.inform.emit(_tr("[ERROR] Cause of error: %s") % str(e))
|
||||
self.app.inform.emit(_("[ERROR] Cause of error: %s") % str(e))
|
||||
raise
|
||||
|
||||
def get_list(self):
|
||||
|
||||
Reference in New Issue
Block a user