瀏覽代碼

- fixed some of the strings that were left in the old way
- updated the POT file
- updated Romanian language partially

Marius Stanciu 6 年之前
父節點
當前提交
f6cd63021e

+ 12 - 29
FlatCAMApp.py

@@ -3834,31 +3834,14 @@ class App(QtCore.QObject):
 
                 tab_widget = QtWidgets.QTabWidget()
                 description_label = QtWidgets.QLabel(
-                    _(
-                        "FlatCAM {version} {beta} ({date}) - {arch}<br>"
-                        "<a href = \"http://flatcam.org/\">http://flatcam.org</a><br>"
-                    ).format(version=version,
-                             beta=('BETA' if beta else ''),
-                             date=version_date,
-                             arch=platform.architecture()[0])
+                    "FlatCAM {version} {beta} ({date}) - {arch}<br>"
+                    "<a href = \"http://flatcam.org/\">http://flatcam.org</a><br>".format(
+                        version=version,beta=('BETA' if beta else ''),
+                        date=version_date,
+                        arch=platform.architecture()[0])
                 )
                 description_label.setOpenExternalLinks(True)
 
-                programmers_label = QtWidgets.QLabel(
-                    _(
-                        "Juan Pablo Caram <BR>"
-                        "<BR>"
-                        "Denis Hayrullin<BR>"
-                        "Kamil Sopko<BR>"
-                        "Marius Stanciu<BR>"
-                        "Matthieu Berthomé<BR><Br>"
-                        "and many others found "
-                        "<a href = \"https://bitbucket.org/jpcgt/flatcam/pull-requests/?state=MERGED\">here.</a><BR>"
-                        "<BR>"
-                    )
-                )
-                programmers_label.setOpenExternalLinks(True)
-
                 license_label = QtWidgets.QLabel(
                     _(
                         '(c) Copyright 2014 Juan Pablo Caram.\n\n'
@@ -4400,7 +4383,7 @@ class App(QtCore.QObject):
             for ext in exc_list:
                 new_ext = new_ext + ext + ', '
             self.defaults["fa_excellon"] = new_ext
-            self.inform.emit(_("[success] Selected Excellon file extensions registered with FlatCAM."))
+            self.inform.emit('[success] %s' % _("Selected Excellon file extensions registered with FlatCAM."))
 
         if obj_type is None or obj_type == 'gcode':
             gco_list = self.ui.fa_defaults_form.fa_gcode_group.gco_list_text.get_value().replace(' ', '').split(',')
@@ -4616,7 +4599,7 @@ class App(QtCore.QObject):
 
         if not isinstance(obj, FlatCAMGeometry):
             self.inform.emit('[ERROR_NOTCL] %s: %s' %
-                             (_("Expected a FlatCAMGeometry, got %s"), type(obj)))
+                             (_("Expected a FlatCAMGeometry, got"), type(obj)))
             return
 
         obj.multigeo = False
@@ -4946,7 +4929,7 @@ class App(QtCore.QObject):
 
             self.plot_all()
             self.inform.emit('[success] %s: %s' %
-                             (_("Converted units to %s"), new_units))
+                             (_("Converted units to"), new_units))
             # self.ui.units_label.setText("[" + self.options["units"] + "]")
             self.set_screen_units(new_units)
         else:
@@ -5725,7 +5708,7 @@ class App(QtCore.QObject):
         if self.defaults["global_open_style"] is False:
             self.file_opened.emit("cncjob", filename)
         self.file_saved.emit("cncjob", filename)
-        self.inform.emit(_("Saved to: %s") % filename)
+        self.inform.emit('%s: %s' % (_("Saved to"), str(filename)))
 
     def handleFindGCode(self):
         self.report_usage("handleFindGCode()")
@@ -5854,8 +5837,8 @@ class App(QtCore.QObject):
                         return
                     self.paint_tool.on_tool_add(dia=float(val))
                 else:
-                    self.inform.emit(
-                        _("[WARNING_NOTCL] Adding Tool cancelled ..."))
+                    self.inform.emit('[WARNING_NOTCL] %s...' %
+                                     _("Adding Tool cancelled"))
             # and only if the tool is Solder Paste Dispensing Tool
             elif tool_widget == self.paste_tool.toolName:
                 if ok:
@@ -8017,7 +8000,7 @@ class App(QtCore.QObject):
             pass
 
         # add the tab if it was closed
-        self.ui.plot_tab_area.addTab(self.ui.cncjob_tab, _('%s') % name)
+        self.ui.plot_tab_area.addTab(self.ui.cncjob_tab, '%s' % name)
         self.ui.cncjob_tab.setObjectName('cncjob_tab')
 
         # delete the absolute and relative position and messages in the infobar

+ 13 - 7
FlatCAMObj.py

@@ -210,7 +210,10 @@ class FlatCAMObj(QtCore.QObject):
             self.default_data["name"] = self.ui.name_entry.get_value()
             self.app.collection.update_view()
             if silent:
-                self.app.inform.emit(_("[success] Name changed from {old} to {new}").format(old=old_name, new=new_name))
+                self.app.inform.emit('[success] %s: %s %s: %s' % (
+                    _("Name changed from"), str(old_name), _("to"), str(new_name)
+                )
+                                     )
 
     def on_offset_button_click(self):
         self.app.report_usage("obj_on_offset_button")
@@ -4465,9 +4468,12 @@ class FlatCAMGeometry(FlatCAMObj, Geometry):
 
         try:
             if self.special_group:
-                self.app.inform.emit('[WARNING_NOTCL] %s' %
-                                     _("This Geometry can't be processed because it is %s geometry."
-                ) % str(self.special_group))
+                self.app.inform.emit('[WARNING_NOTCL] %s %s %s.' %
+                                     (_("This Geometry can't be processed because it is"),
+                                      str(self.special_group),
+                                      _("geometry")
+                                      )
+                                     )
                 return
         except AttributeError:
             pass
@@ -4756,9 +4762,9 @@ class FlatCAMGeometry(FlatCAMObj, Geometry):
                 # dia_cnc_dict['solid_geometry'] = cascaded_union([geo['geom'] for geo in dia_cnc_dict['gcode_parsed']])
                 try:
                     dia_cnc_dict['solid_geometry'] = tool_solid_geometry
-                    self.app.inform.emit('[success] %s' % _("Finished G-Code processing..."))
+                    self.app.inform.emit('[success] %s...' % _("Finished G-Code processing"))
                 except Exception as e:
-                    self.app.inform.emit('[ERROR] %s' % _("G-Code processing failed with error: %s") % str(e))
+                    self.app.inform.emit('[ERROR] %s: %s' % (_("G-Code processing failed with error"), str(e)))
 
                 app_obj.progress.emit(80)
 
@@ -4990,7 +4996,7 @@ class FlatCAMGeometry(FlatCAMObj, Geometry):
                     dia_cnc_dict['solid_geometry'] = tool_solid_geometry
                     self.app.inform.emit('[success] %s' % _("Finished G-Code processing..."))
                 except Exception as e:
-                    self.app.inform.emit('[ERROR] %s' % _("G-Code processing failed with error: %s") % str(e))
+                    self.app.inform.emit('[ERROR] %s: %s' % (_("G-Code processing failed with error"), str(e)))
 
                 # tell gcode_parse from which point to start drawing the lines depending on what kind of
                 # object is the source of gcode

+ 1 - 1
FlatCAMTranslation.py

@@ -89,7 +89,7 @@ def on_language_apply_click(app, restart=False):
     if restart:
         msgbox = QtWidgets.QMessageBox()
         msgbox.setText(_("The application will restart."))
-        msgbox.setInformativeText(_("Are you sure do you want to change the current language to %s?") %
+        msgbox.setInformativeText('$s %s?' % _("Are you sure do you want to change the current language to"),
                                   name.capitalize())
         msgbox.setWindowTitle(_("Apply Language ..."))
         msgbox.setWindowIcon(QtGui.QIcon('share/language32.png'))

+ 3 - 0
README.md

@@ -17,6 +17,9 @@ CAD program, and create G-Code for Isolation routing.
 - 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
+- fixed some of the strings that were left in the old way
+- updated the POT file
+- updated Romanian language partially
 
 12.09.2019
 

+ 4 - 4
camlib.py

@@ -6665,10 +6665,10 @@ class CNCjob(Geometry):
                 # if the offset is less than half of the total length or less than half of the total width of the
                 # solid geometry it's obvious we can't do the offset
                 if -offset > ((c - a) / 2) or -offset > ((d - b) / 2):
-                    self.app.inform.emit(_('[ERROR_NOTCL] %s' %
-                                           "The Tool Offset value is too negative to use "
-                                           "for the current_geometry.\n"
-                                           "Raise the value (in module) and try again."))
+                    self.app.inform.emit('[ERROR_NOTCL] %s' % _(
+                        "The Tool Offset value is too negative to use "
+                        "for the current_geometry.\n"
+                        "Raise the value (in module) and try again."))
                     return 'fail'
                 # hack: make offset smaller by 0.0000000001 which is insignificant difference but allow the job
                 # to continue

+ 2 - 2
flatcamEditors/FlatCAMExcEditor.py

@@ -1065,8 +1065,8 @@ class FCDrillResize(FCShapeTool):
             # we reactivate the signals after the after the tool editing
             self.draw_app.tools_table_exc.itemChanged.connect(self.draw_app.on_tool_edit)
 
-            self.draw_app.app.inform.emit('[success] Done. %s' %
-                                          _("Drill/Slot Resize completed."))
+            self.draw_app.app.inform.emit('[success] %s' %
+                                          _("Done. Drill/Slot Resize completed."))
         else:
             self.draw_app.app.inform.emit('[WARNING_NOTCL] %s' %
                                           _("Cancelled. No drills/slots selected for resize ..."))

+ 10 - 6
flatcamEditors/FlatCAMGeoEditor.py

@@ -632,8 +632,9 @@ class TransformEditorTool(FlatCAMTool):
 
         self.transform_lay = QtWidgets.QVBoxLayout()
         self.layout.addLayout(self.transform_lay)
+
         # ## Title
-        title_label = QtWidgets.QLabel("%s" % (_('Editor %s') % self.toolName))
+        title_label = QtWidgets.QLabel("%s %s" % (_('Editor'), str(self.toolName)))
         title_label.setStyleSheet("""
                 QLabel
                 {
@@ -2354,7 +2355,7 @@ class FCPath(FCPolygon):
 
         self.draw_app.in_action = False
         self.complete = True
-        self.draw_app.app.inform.emit(_("[success] Done. Path completed."))
+        self.draw_app.app.inform.emit('[success] %s' % _("Done. Path completed."))
 
     def utility_geometry(self, data=None):
         if len(self.points) > 0:
@@ -4583,9 +4584,12 @@ class FlatCAMGeoEditor(QtCore.QObject):
                         local_results += list(cp.get_objects())
                 except Exception as e:
                     log.debug("Could not Paint the polygons. %s" % str(e))
-                    self.app.inform.emit('[ERROR] %s' %
-                                         _("Could not do Paint. Try a different combination of parameters. "
-                          "Or a different method of Paint\n%s") % str(e))
+                    self.app.inform.emit('[ERROR] %s\n%s' %
+                                         (_("Could not do Paint. Try a different combination of"
+                                            " parameters. Or a different method of Paint"),
+                                          str(e)
+                                          )
+                                         )
                     return
 
                 # add the result to the results list
@@ -4595,7 +4599,7 @@ class FlatCAMGeoEditor(QtCore.QObject):
         for r in results:
             self.add_shape(DrawToolShape(r))
         self.app.inform.emit(
-            _("[success] Paint done."))
+            '[success] %s' % _("Paint done."))
         self.replot()
 
 

+ 4 - 3
flatcamEditors/FlatCAMGrbEditor.py

@@ -1520,7 +1520,7 @@ class FCSemiDisc(FCShapeTool):
     def on_key(self, key):
         if key == 'D' or key == QtCore.Qt.Key_D:
             self.direction = 'cw' if self.direction == 'ccw' else 'ccw'
-            return _('Direction: %s') % self.direction.upper()
+            return '%s: %s' % (_('Direction'), self.direction.upper())
 
         if key == 'M' or key == QtCore.Qt.Key_M:
             # delete the possible points made before this action; we want to start anew
@@ -3764,7 +3764,8 @@ class FlatCAMGrbEditor(QtCore.QObject):
 
         # and then add it to the storage elements (each storage elements is a member of a list
         def job_thread(aperture_id):
-            with self.app.proc_container.new(_("Adding aperture: %s geo ...") % str(aperture_id)):
+            with self.app.proc_container.new('%s: %s %s...' %
+                                             (_("Adding aperture"),  str(aperture_id), _("geo"))):
                 storage_elem = []
                 self.storage_dict[aperture_id] = {}
 
@@ -4849,7 +4850,7 @@ class TransformEditorTool(FlatCAMTool):
         self.layout.addLayout(self.transform_lay)
 
         # Title
-        title_label = QtWidgets.QLabel("%s" % (_('Editor %s') % self.toolName))
+        title_label = QtWidgets.QLabel("%s %s" % (_('Editor'),  self.toolName))
         title_label.setStyleSheet("""
                 QLabel
                 {

+ 31 - 19
flatcamGUI/FlatCAMGUI.py

@@ -2640,7 +2640,7 @@ class FlatCAMGUI(QtWidgets.QMainWindow):
 
                             if self.app.geo_editor.active_tool.complete:
                                 self.app.geo_editor.on_shape_complete()
-                                self.app.inform.emit(_("[success] Done."))
+                                self.app.inform.emit('[success] %s' % _("Done."))
                             # automatically make the selection tool active after completing current action
                             self.app.geo_editor.select_tool('select')
                             return
@@ -2652,7 +2652,7 @@ class FlatCAMGUI(QtWidgets.QMainWindow):
 
                             if self.app.geo_editor.active_tool.complete:
                                 self.app.geo_editor.on_shape_complete()
-                                self.app.inform.emit(_("[success] Done."))
+                                self.app.inform.emit('[success] %s' % _("Done."))
                             # automatically make the selection tool active after completing current action
                             self.app.geo_editor.select_tool('select')
 
@@ -2660,7 +2660,8 @@ class FlatCAMGUI(QtWidgets.QMainWindow):
                 if key == QtCore.Qt.Key_Escape or key == 'Escape':
                     # TODO: ...?
                     # self.on_tool_select("select")
-                    self.app.inform.emit(_("[WARNING_NOTCL] Cancelled."))
+                    self.app.inform.emit('[WARNING_NOTCL] %s' %
+                                         _("Cancelled."))
 
                     self.app.geo_editor.delete_utility_geometry()
 
@@ -2868,7 +2869,7 @@ class FlatCAMGUI(QtWidgets.QMainWindow):
                 # Abort the current action
                 if key == QtCore.Qt.Key_Escape or key == 'Escape':
                     # self.on_tool_select("select")
-                    self.app.inform.emit(_("[WARNING_NOTCL] Cancelled."))
+                    self.app.inform.emit('[WARNING_NOTCL] %s' % _("Cancelled."))
 
                     self.app.grb_editor.delete_utility_geometry()
 
@@ -2884,7 +2885,8 @@ class FlatCAMGUI(QtWidgets.QMainWindow):
                         self.app.grb_editor.delete_selected()
                         self.app.grb_editor.plot_all()
                     else:
-                        self.app.inform.emit(_("[WARNING_NOTCL] 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
@@ -2968,7 +2970,8 @@ 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] Cancelled. Nothing selected to copy."))
+                            self.app.inform.emit('[WARNING_NOTCL] %s' %
+                                                 _("Cancelled. Nothing selected to copy."))
                         return
 
                     # Add Disc Tool
@@ -3014,7 +3017,8 @@ 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] Cancelled. Nothing selected to move."))
+                            self.app.inform.emit('[WARNING_NOTCL] %s' %
+                                                 _("Cancelled. Nothing selected to move."))
                         return
 
                     # Add Region Tool
@@ -3079,7 +3083,7 @@ class FlatCAMGUI(QtWidgets.QMainWindow):
                 if key == QtCore.Qt.Key_Escape or key == 'Escape':
                     # TODO: ...?
                     # self.on_tool_select("select")
-                    self.app.inform.emit(_("[WARNING_NOTCL] Cancelled."))
+                    self.app.inform.emit('[WARNING_NOTCL] %s' % _("Cancelled."))
 
                     self.app.exc_editor.delete_utility_geometry()
 
@@ -3096,7 +3100,8 @@ class FlatCAMGUI(QtWidgets.QMainWindow):
                         self.app.exc_editor.delete_selected()
                         self.app.exc_editor.replot()
                     else:
-                        self.app.inform.emit(_("[WARNING_NOTCL] 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
@@ -3163,7 +3168,8 @@ 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] Cancelled. Nothing selected to copy."))
+                        self.app.inform.emit('[WARNING_NOTCL] %s' %
+                                             _("Cancelled. Nothing selected to copy."))
                     return
 
                 # Add Drill Hole Tool
@@ -3209,7 +3215,8 @@ 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] Cancelled. Nothing selected to move."))
+                        self.app.inform.emit('[WARNING_NOTCL] %s' %
+                                             _("Cancelled. Nothing selected to move."))
                     return
 
                 # Add Array of Slote Hole Tool
@@ -3243,12 +3250,16 @@ class FlatCAMGUI(QtWidgets.QMainWindow):
                     val, ok = tool_add_popup.get_value()
                     if ok:
                         self.app.exc_editor.on_tool_add(tooldia=val)
-                        self.app.inform.emit(
-                            _("[success] Added new tool with dia: {dia} {units}").format(dia='%.4f' % float(val),
-                                                                                         units=str(self.units)))
+                        formated_val = '%.4f' % float(val)
+                        self.app.inform.emit('[success] %s: %s %s' %
+                                             (_("Added new tool with dia"),
+                                              formated_val,
+                                              str(self.units)
+                                              )
+                                             )
                     else:
                         self.app.inform.emit(
-                            _("[WARNING_NOTCL] Adding Tool cancelled ..."))
+                            '[WARNING_NOTCL] %s' % _("Adding Tool cancelled ..."))
                     return
 
                 # Zoom Fit
@@ -3392,7 +3403,8 @@ class FlatCAMGUI(QtWidgets.QMainWindow):
 
     def closeEvent(self, event):
         if self.app.save_in_progress:
-            self.app.inform.emit(_("[WARNING_NOTCL] Application is saving the project. Please wait ..."))
+            self.app.inform.emit('[WARNING_NOTCL] %s' %
+                                 _("Application is saving the project. Please wait ..."))
         else:
             grect = self.geometry()
 
@@ -4828,7 +4840,7 @@ class GerberEditorPrefGroupUI(OptionsGroupUI):
         self.adddim_entry = FCEntry()
         grid0.addWidget(self.adddim_entry, 5, 1)
 
-        self.grb_array_linear_label = QtWidgets.QLabel(_('<b>%s:</b>' % 'Linear Pad Array'))
+        self.grb_array_linear_label = QtWidgets.QLabel('<b>%s:</b>' % _('Linear Pad Array'))
         grid0.addWidget(self.grb_array_linear_label, 6, 0, 1, 2)
 
         # Linear Pad Array direction
@@ -5697,7 +5709,7 @@ class ExcellonEditorPrefGroupUI(OptionsGroupUI):
         grid0.addWidget(self.drill_axis_radio, 4, 1)
 
         # Linear Drill Array pitch distance
-        self.drill_pitch_label = QtWidgets.QLabel(_('%s:' % 'Pitch'))
+        self.drill_pitch_label = QtWidgets.QLabel('%s:' % _('Pitch'))
         self.drill_pitch_label.setToolTip(
             _("Pitch = Distance between elements of the array.")
         )
@@ -6117,7 +6129,7 @@ class GeometryAdvOptPrefGroupUI(OptionsGroupUI):
         self.layout.addLayout(grid1)
 
         # Toolchange X,Y
-        toolchange_xy_label = QtWidgets.QLabel(_('%s:' % 'Toolchange X-Y'))
+        toolchange_xy_label = QtWidgets.QLabel('%s:' %  _('Toolchange X-Y'))
         toolchange_xy_label.setToolTip(
             _("Toolchange X,Y position.")
         )

+ 1 - 1
flatcamTools/ToolCutOut.py

@@ -572,7 +572,7 @@ class CutOut(FlatCAMTool):
             return "Could not retrieve object: %s" % name
 
         if cutout_obj is None:
-            self.app.inform.emit('[ERROR_NOTCL] %s: %s' % (_("Object not found: %s"), cutout_obj))
+            self.app.inform.emit('[ERROR_NOTCL] %s: %s' % (_("Object not found"), str(name)))
 
         try:
             dia = float(self.dia.get_value())

+ 2 - 2
flatcamTools/ToolNonCopperClear.py

@@ -1080,11 +1080,11 @@ class NonCopperClear(FlatCAMTool, Gerber):
         try:
             self.ncc_obj = self.app.collection.get_by_name(self.obj_name)
         except Exception as e:
-            self.app.inform.emit('[ERROR_NOTCL] %s' % _("Could not retrieve object: %s") % self.obj_name)
+            self.app.inform.emit('[ERROR_NOTCL] %s: %s' % (_("Could not retrieve object"),  str(self.obj_name)))
             return "Could not retrieve object: %s" % self.obj_name
 
         if self.ncc_obj is None:
-            self.app.inform.emit('[ERROR_NOTCL] %s' % _("Object not found: %s") % self.ncc_obj)
+            self.app.inform.emit('[ERROR_NOTCL] %s: %s' % (_("Object not found"), str(self.obj_name)))
             return
 
         # use the selected tools in the tool table; get diameters for non-copper clear

+ 1 - 1
flatcamTools/ToolPDF.py

@@ -217,7 +217,7 @@ class ToolPDF(FlatCAMTool):
                 time.sleep(0.1)
         except Exception as e:
             log.debug("ToolPDF.open_pdf() --> %s" % str(e))
-        self.app.inform.emit(_("[success] Opened: %s") % filename)
+        self.app.inform.emit('[success] %s: %s' % (_("Opened"),  str(filename)))
 
     def layer_rendering_as_excellon(self, filename, ap_dict, layer_nr):
         outname = filename.split('/')[-1].split('\\')[-1] + "_%s" % str(layer_nr)

+ 10 - 10
flatcamTools/ToolPaint.py

@@ -1233,11 +1233,11 @@ class ToolPaint(FlatCAMTool, Gerber):
         # No polygon?
         if poly is None:
             self.app.log.warning('No polygon found.')
-            self.app.inform.emit(_('[WARNING] No polygon found.'))
+            self.app.inform.emit('[WARNING] %s' % _('No polygon found.'))
             return
 
         proc = self.app.proc_container.new(_("Painting polygon..."))
-        self.app.inform.emit(_("Paint Tool. Painting polygon at location: %s") % str(inside_pt))
+        self.app.inform.emit('%s: %s' % (_("Paint Tool. Painting polygon at location"), str(inside_pt)))
 
         name = outname if outname is not None else self.obj_name + "_paint"
 
@@ -1748,7 +1748,7 @@ class ToolPaint(FlatCAMTool, Gerber):
             # print("Indexing...", end=' ')
             # geo_obj.make_index()
 
-            self.app.inform.emit(_("[success] Paint All Done."))
+            self.app.inform.emit('[success] %s' % _("Paint All Done."))
 
         # Initializes the new geometry object
         def gen_paintarea_rest_machining(geo_obj, app_obj):
@@ -2149,9 +2149,9 @@ class ToolPaint(FlatCAMTool, Gerber):
                         return "fail"
                     except Exception as e:
                         log.debug("Could not Paint the polygons. %s" % str(e))
-                        self.app.inform.emit('[ERROR] %s' %
-                                             _("Could not do Paint All. Try a different combination of parameters. "
-                                               "Or a different Method of paint\n%s") % str(e))
+                        self.app.inform.emit('[ERROR] %s\n%s' %
+                                             (_("Could not do Paint All. Try a different combination of parameters. "
+                                               "Or a different Method of paint"), str(e)))
                         return
 
                     pol_nr += 1
@@ -2209,7 +2209,7 @@ class ToolPaint(FlatCAMTool, Gerber):
             # print("Indexing...", end=' ')
             # geo_obj.make_index()
 
-            self.app.inform.emit(_("[success] Paint Area Done."))
+            self.app.inform.emit('[success] %s' % _("Paint Area Done."))
 
         # Initializes the new geometry object
         def gen_paintarea_rest_machining(geo_obj, app_obj):
@@ -2307,9 +2307,9 @@ class ToolPaint(FlatCAMTool, Gerber):
                         return "fail"
                     except Exception as e:
                         log.debug("Could not Paint the polygons. %s" % str(e))
-                        self.app.inform.emit('[ERROR] %s' %
-                                             _("Could not do Paint All. Try a different combination of parameters. "
-                                               "Or a different Method of paint\n%s") % str(e))
+                        self.app.inform.emit('[ERROR] %s\n%s' %
+                                             (_("Could not do Paint All. Try a different combination of parameters. "
+                                               "Or a different Method of paint"), str(e)))
                         return
 
                     pol_nr += 1

+ 1 - 1
flatcamTools/ToolShell.py

@@ -68,7 +68,7 @@ class TermWidget(QWidget):
         if detail is None:
             self._edit.setPlainText(_("...proccessing..."))
         else:
-            self._edit.setPlainText(_("...proccessing... [%s]") % detail)
+            self._edit.setPlainText('%s [%s]' % (_("...proccessing..."),  detail))
 
         self._edit.setDisabled(True)
         self._edit.setFocus()

+ 2 - 2
flatcamTools/ToolSub.py

@@ -311,7 +311,7 @@ class ToolSub(FlatCAMTool):
 
         log.debug("Working on promise: %s" % str(apid))
 
-        with self.app.proc_container.new(_("Parsing aperture %s geometry ..." % str(apid))):
+        with self.app.proc_container.new('%s %s %s...' % (_("Parsing aperture", str(apid), _("geometry")))):
             for geo_el in geo:
                 new_el = dict()
 
@@ -520,7 +520,7 @@ class ToolSub(FlatCAMTool):
         if tool == "single":
             text = _("Parsing solid_geometry ...")
         else:
-            text = _("Parsing tool %s geometry ...") % str(tool)
+            text = '%s %s %s...' % (_("Parsing tool"), str(tool), _("geometry"))
 
         with self.app.proc_container.new(text):
             # resulting paths are closed resulting into Polygons

+ 2 - 1
flatcamTools/ToolTransform.py

@@ -800,7 +800,8 @@ class ToolTransform(FlatCAMTool):
                                 sel_obj.options['skew_y'] = num
                             self.app.object_changed.emit(sel_obj)
                         sel_obj.plot()
-                    self.app.inform.emit(_('[success] Skew on the %s axis done ...') % str(axis))
+                    self.app.inform.emit('[success] %s %s %s...' %
+                                         (_('Skew on the'),  str(axis), _("axis done")))
                     self.app.progress.emit(100)
 
                 except Exception as e:

二進制
locale/en/LC_MESSAGES/strings.mo


File diff suppressed because it is too large
+ 324 - 292
locale/en/LC_MESSAGES/strings.po


二進制
locale/ro/LC_MESSAGES/strings.mo


File diff suppressed because it is too large
+ 362 - 251
locale/ro/LC_MESSAGES/strings.po


File diff suppressed because it is too large
+ 326 - 230
locale_template/strings.pot


Some files were not shown because too many files changed in this diff