Bläddra i källkod

- some strings updated; update on the Romanian translate

Marius Stanciu 6 år sedan
förälder
incheckning
e397e26484

+ 58 - 25
FlatCAMApp.py

@@ -4314,23 +4314,41 @@ 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] {kind} created/selected: <span style="color:{color};">{name}</span>').format(
-                kind=obj.kind.capitalize(), color='green', name=str(obj.options['name'])))
+            self.inform.emit('[selected] {kind} {tx}: <span style="color:{color};">{name}</span>'.format(
+                kind=obj.kind.capitalize(),
+                color='green',
+                name=str(obj.options['name']), tx=_("created/selected"))
+            )
         elif obj.kind == 'excellon':
-            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'])))
+            self.inform.emit('[selected] {kind} {tx}: <span style="color:{color};">{name}</span>'.format(
+                kind=obj.kind.capitalize(),
+                color='brown',
+                name=str(obj.options['name']), tx=_("created/selected"))
+            )
         elif obj.kind == 'cncjob':
-            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'])))
+            self.inform.emit('[selected] {kind} {tx}: <span style="color:{color};">{name}</span>'.format(
+                kind=obj.kind.capitalize(),
+                color='blue',
+                name=str(obj.options['name']), tx=_("created/selected"))
+            )
         elif obj.kind == 'geometry':
-            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'])))
+            self.inform.emit('[selected] {kind} {tx}: <span style="color:{color};">{name}</span>'.format(
+                kind=obj.kind.capitalize(),
+                color='red',
+                name=str(obj.options['name']), tx=_("created/selected"))
+            )
         elif obj.kind == 'script':
-            self.inform.emit(_('[selected] {kind} created/selected: <span style="color:{color};">{name}</span>').format(
-                kind=obj.kind.capitalize(), color='orange', name=str(obj.options['name'])))
+            self.inform.emit('[selected] {kind} {tx}: <span style="color:{color};">{name}</span>'.format(
+                kind=obj.kind.capitalize(),
+                color='orange',
+                name=str(obj.options['name']), tx=_("created/selected"))
+            )
         elif obj.kind == 'document':
-            self.inform.emit(_('[selected] {kind} created/selected: <span style="color:{color};">{name}</span>').format(
-                kind=obj.kind.capitalize(), color='darkCyan', name=str(obj.options['name'])))
+            self.inform.emit('[selected] {kind} {tx}: <span style="color:{color};">{name}</span>'.format(
+                kind=obj.kind.capitalize(),
+                color='darkCyan',
+                name=str(obj.options['name']), tx=_("created/selected"))
+            )
 
         # update the SHELL auto-completer model with the name of the new object
         self.shell._edit.set_model_data(self.myKeywords)
@@ -8856,17 +8874,29 @@ class App(QtCore.QObject):
     def selected_message(self, curr_sel_obj):
         if curr_sel_obj:
             if curr_sel_obj.kind == 'gerber':
-                self.inform.emit(_('[selected]<span style="color:{color};">{name}</span> selected').format(
-                    color='green', name=str(curr_sel_obj.options['name'])))
+                self.inform.emit('[selected]<span style="color:{color};">{name}</span> {tx}'.format(
+                    color='green',
+                    name=str(curr_sel_obj.options['name']),
+                    tx=_("selected"))
+                )
             elif curr_sel_obj.kind == 'excellon':
-                self.inform.emit(_('[selected]<span style="color:{color};">{name}</span> selected').format(
-                    color='brown', name=str(curr_sel_obj.options['name'])))
+                self.inform.emit('[selected]<span style="color:{color};">{name}</span> {tx}'.format(
+                    color='brown',
+                    name=str(curr_sel_obj.options['name']),
+                    tx=_("selected"))
+                )
             elif curr_sel_obj.kind == 'cncjob':
-                self.inform.emit(_('[selected]<span style="color:{color};">{name}</span> selected').format(
-                    color='blue', name=str(curr_sel_obj.options['name'])))
+                self.inform.emit('[selected]<span style="color:{color};">{name}</span> {tx}'.format(
+                    color='blue',
+                    name=str(curr_sel_obj.options['name']),
+                    tx=_("selected"))
+                )
             elif curr_sel_obj.kind == 'geometry':
-                self.inform.emit(_('[selected]<span style="color:{color};">{name}</span> selected').format(
-                    color='red', name=str(curr_sel_obj.options['name'])))
+                self.inform.emit('[selected]<span style="color:{color};">{name}</span> {tx}'.format(
+                    color='red',
+                    name=str(curr_sel_obj.options['name']),
+                    tx=_("selected"))
+                )
 
     def delete_hover_shape(self):
         self.hover_shapes.clear()
@@ -10166,8 +10196,10 @@ class App(QtCore.QObject):
         try:
             filename, _f = QtWidgets.QFileDialog.getSaveFileName(
                 caption=_("Save Project As ..."),
-                directory=_('{l_save}/Project_{date}').format(l_save=str(self.get_last_save_folder()), date=self.date),
-                filter=filter_)
+                directory=('{l_save}/{proj}_{date}').format(l_save=str(self.get_last_save_folder()), date=self.date,
+                                                             proj=_("Project")),
+                filter=filter_
+            )
         except TypeError:
             filename, _f = QtWidgets.QFileDialog.getSaveFileName(caption=_("Save Project As ..."), filter=filter_)
 
@@ -10208,7 +10240,7 @@ class App(QtCore.QObject):
 
         try:
             obj_active = self.collection.get_active()
-            obj_name = obj_active.options['name']
+            obj_name = _(str(obj_active.options['name']))
         except AttributeError as err:
             log.debug("App.on_file_save_object_pdf() --> %s" % str(err))
             self.inform.emit('[ERROR_NOTCL] %s' % _("No object selected."))
@@ -10218,10 +10250,11 @@ class App(QtCore.QObject):
         try:
             filename, _f = QtWidgets.QFileDialog.getSaveFileName(
                 caption=_("Save Object as PDF ..."),
-                directory=_('{l_save}/{obj_name}_{date}').format(l_save=str(self.get_last_save_folder()),
+                directory=('{l_save}/{obj_name}_{date}').format(l_save=str(self.get_last_save_folder()),
                                                                  obj_name=obj_name,
                                                                  date=self.date),
-                filter=filter_)
+                filter=filter_
+            )
         except TypeError:
             filename, _f = QtWidgets.QFileDialog.getSaveFileName(caption=_("Save Object as PDF ..."), filter=filter_)
 

+ 30 - 12
ObjectCollection.py

@@ -785,23 +785,41 @@ class ObjectCollection(QtCore.QAbstractItemModel):
             self.item_selected.emit(obj.options['name'])
 
             if obj.kind == 'gerber':
-                self.app.inform.emit(_('[selected]<span style="color:{color};">{name}</span> selected').format(
-                    color='green', name=str(obj.options['name'])))
+                self.app.inform.emit('[selected]<span style="color:{color};">{name}</span> {tx}'.format(
+                    color='green',
+                    name=str(obj.options['name']),
+                    tx=_("selected"))
+                )
             elif obj.kind == 'excellon':
-                self.app.inform.emit(_('[selected]<span style="color:{color};">{name}</span> selected').format(
-                    color='brown', name=str(obj.options['name'])))
+                self.app.inform.emit('[selected]<span style="color:{color};">{name}</span> {tx}'.format(
+                    color='brown',
+                    name=str(obj.options['name']),
+                    tx=_("selected"))
+                )
             elif obj.kind == 'cncjob':
-                self.app.inform.emit(_('[selected]<span style="color:{color};">{name}</span> selected').format(
-                    color='blue', name=str(obj.options['name'])))
+                self.app.inform.emit('[selected]<span style="color:{color};">{name}</span> {tx}'.format(
+                    color='blue',
+                    name=str(obj.options['name']),
+                    tx=_("selected"))
+                )
             elif obj.kind == 'geometry':
-                self.app.inform.emit(_('[selected]<span style="color:{color};">{name}</span> selected').format(
-                    color='red', name=str(obj.options['name'])))
+                self.app.inform.emit('[selected]<span style="color:{color};">{name}</span> {tx}'.format(
+                    color='red',
+                    name=str(obj.options['name']),
+                    tx=_("selected"))
+                )
             elif obj.kind == 'script':
-                self.app.inform.emit(_('[selected]<span style="color:{color};">{name}</span> selected').format(
-                    color='orange', name=str(obj.options['name'])))
+                self.app.inform.emit('[selected]<span style="color:{color};">{name}</span> {tx}'.format(
+                    color='orange',
+                    name=str(obj.options['name']),
+                    tx=_("selected"))
+                )
             elif obj.kind == 'document':
-                self.app.inform.emit(_('[selected]<span style="color:{color};">{name}</span> selected').format(
-                    color='darkCyan', name=str(obj.options['name'])))
+                self.app.inform.emit('[selected]<span style="color:{color};">{name}</span> {tx}'.format(
+                    color='darkCyan',
+                    name=str(obj.options['name']),
+                    tx=_("selected"))
+                )
         except IndexError:
             self.item_selected.emit('none')
             # FlatCAMApp.App.log.debug("on_list_selection_change(): Index Error (Nothing selected?)")

+ 1 - 0
README.md

@@ -13,6 +13,7 @@ CAD program, and create G-Code for Isolation routing.
 
 - HPGL2 import: added support for circles, arcs and 3-point arcs. Everything works only for absolute coordinates.
 - removed the .plt extension from Gcode extensions
+- some strings updated; update on the Romanian translate
 
 12.12.2019
 

+ 0 - 2
flatcamEditors/FlatCAMGeoEditor.py

@@ -455,8 +455,6 @@ class PaintOptionsTool(FlatCAMTool):
         ovlabel = QtWidgets.QLabel('%s:' % _('Overlap Rate'))
         ovlabel.setToolTip(
             _("How much (fraction) of the tool width to overlap each tool pass.\n"
-              "Example:\n"
-              "A value here of 0.25 means 25%% from the tool diameter found above.\n\n"
               "Adjust the value starting with lower values\n"
               "and increasing it if areas that should be painted are still \n"
               "not painted.\n"

+ 9 - 9
flatcamGUI/ObjectUI.py

@@ -1910,7 +1910,7 @@ class CNCObjectUI(ObjectUI):
 
         self.prepend_text = FCTextArea()
         self.prepend_text.setPlaceholderText(
-            _("Type here any G-Code commands you would "
+            _("Type here any G-Code commands you would\n"
               "like to add at the beginning of the G-Code file.")
         )
         self.custom_box.addWidget(self.prepend_text)
@@ -1926,8 +1926,8 @@ class CNCObjectUI(ObjectUI):
 
         self.append_text = FCTextArea()
         self.append_text.setPlaceholderText(
-            _("Type here any G-Code commands you would "
-              "like to append to the generated file. "
+            _("Type here any G-Code commands you would\n"
+              "like to append to the generated file.\n"
               "I.e.: M2 (End of program)")
         )
         self.custom_box.addWidget(self.append_text)
@@ -1958,12 +1958,12 @@ class CNCObjectUI(ObjectUI):
         self.toolchange_text = FCTextArea()
         self.toolchange_text.setPlaceholderText(
             _(
-                "Type here any G-Code commands you would "
-                "like to be executed when Toolchange event is encountered. "
-                "This will constitute a Custom Toolchange GCode, "
-                "or a Toolchange Macro. "
-                "The FlatCAM variables are surrounded by '%' symbol. \n"
-                "WARNING: it can be used only with a preprocessor file "
+                "Type here any G-Code commands you would\n"
+                "like to be executed when Toolchange event is encountered.\n"
+                "This will constitute a Custom Toolchange GCode,\n"
+                "or a Toolchange Macro.\n"
+                "The FlatCAM variables are surrounded by '%' symbol.\n"
+                "WARNING: it can be used only with a preprocessor file\n"
                 "that has 'toolchange_custom' in it's name."
             )
         )

+ 13 - 13
flatcamGUI/PreferencesUI.py

@@ -3780,7 +3780,7 @@ class CNCJobOptPrefGroupUI(OptionsGroupUI):
 
         self.prepend_text = FCTextArea()
         self.prepend_text.setPlaceholderText(
-            _("Type here any G-Code commands you would "
+            _("Type here any G-Code commands you would\n"
               "like to add at the beginning of the G-Code file.")
         )
         self.layout.addWidget(self.prepend_text)
@@ -3797,8 +3797,8 @@ class CNCJobOptPrefGroupUI(OptionsGroupUI):
 
         self.append_text = FCTextArea()
         self.append_text.setPlaceholderText(
-            _("Type here any G-Code commands you would "
-              "like to append to the generated file. "
+            _("Type here any G-Code commands you would\n"
+              "like to append to the generated file.\n"
               "I.e.: M2 (End of program)")
         )
         self.layout.addWidget(self.append_text)
@@ -3850,12 +3850,12 @@ class CNCJobAdvOptPrefGroupUI(OptionsGroupUI):
         self.toolchange_text = FCTextArea()
         self.toolchange_text.setPlaceholderText(
             _(
-                "Type here any G-Code commands you would "
-                "like to be executed when Toolchange event is encountered. "
-                "This will constitute a Custom Toolchange GCode, "
-                "or a Toolchange Macro. "
-                "The FlatCAM variables are surrounded by '%' symbol. \n"
-                "WARNING: it can be used only with a preprocessor file "
+                "Type here any G-Code commands you would\n"
+                "like to be executed when Toolchange event is encountered.\n"
+                "This will constitute a Custom Toolchange GCode,\n"
+                "or a Toolchange Macro.\n"
+                "The FlatCAM variables are surrounded by '%' symbol.\n"
+                "WARNING: it can be used only with a preprocessor file\n"
                 "that has 'toolchange_custom' in it's name."
             )
         )
@@ -4852,7 +4852,7 @@ class ToolsFilmPrefGroupUI(OptionsGroupUI):
         self.orientation_label = QtWidgets.QLabel('%s:' % _("Page Orientation"))
         self.orientation_label.setToolTip(_("Can be:\n"
                                             "- Portrait\n"
-                                            "- Lanscape"))
+                                            "- Landscape"))
 
         self.orientation_radio = RadioSet([{'label': _('Portrait'), 'value': 'p'},
                                            {'label': _('Landscape'), 'value': 'l'},
@@ -6123,7 +6123,7 @@ class Tools2CThievingPrefGroupUI(OptionsGroupUI):
         ], orientation='vertical', stretch=False)
         self.reference_label = QtWidgets.QLabel(_("Reference:"))
         self.reference_label.setToolTip(
-            _("- 'Itself' - the copper Thieving extent is based on the object that is copper cleared.\n "
+            _("- 'Itself' - the copper Thieving extent is based on the object that is copper cleared.\n"
               "- 'Area Selection' - left mouse click to start selection of the area to be filled.\n"
               "- 'Reference Object' - will do copper thieving within the area specified by another object.")
         )
@@ -6137,7 +6137,7 @@ class Tools2CThievingPrefGroupUI(OptionsGroupUI):
         ], stretch=False)
         self.bbox_type_label = QtWidgets.QLabel(_("Box Type:"))
         self.bbox_type_label.setToolTip(
-            _("- 'Rectangular' - the bounding box will be of rectangular shape.\n "
+            _("- 'Rectangular' - the bounding box will be of rectangular shape.\n"
               "- 'Minimal' - the bounding box will be the convex hull shape.")
         )
         grid_lay.addWidget(self.bbox_type_label, 5, 0)
@@ -6157,7 +6157,7 @@ class Tools2CThievingPrefGroupUI(OptionsGroupUI):
         ], orientation='vertical', stretch=False)
         self.fill_type_label = QtWidgets.QLabel(_("Fill Type:"))
         self.fill_type_label.setToolTip(
-            _("- 'Solid' - copper thieving will be a solid polygon.\n "
+            _("- 'Solid' - copper thieving will be a solid polygon.\n"
               "- 'Dots Grid' - the empty area will be filled with a pattern of dots.\n"
               "- 'Squares Grid' - the empty area will be filled with a pattern of squares.\n"
               "- 'Lines Grid' - the empty area will be filled with a pattern of lines.")

+ 2 - 1
flatcamParsers/ParseExcellon.py

@@ -884,8 +884,9 @@ class Excellon(Geometry):
             log.error("Excellon PARSING FAILED. Line %d: %s" % (line_num, eline))
             msg = '[ERROR_NOTCL] %s' % \
                   _("An internal error has ocurred. See shell.\n")
-            msg += _('{e_code} Excellon Parser error.\nParsing Failed. Line {l_nr}: {line}\n').format(
+            msg += ('{e_code} {tx} {l_nr}: {line}\n').format(
                 e_code='[ERROR]',
+                tx=_("Excellon Parser error.\nParsing Failed. Line"),
                 l_nr=line_num,
                 line=eline)
             msg += traceback.format_exc()

+ 2 - 2
flatcamTools/ToolCalibration.py

@@ -759,7 +759,7 @@ class ToolCalibration(FlatCAMTool):
 
         self.set_tool_ui()
 
-        self.app.ui.notebook.setTabText(2, _("Calibrate Tool"))
+        self.app.ui.notebook.setTabText(2, _("Calibration Tool"))
 
     def install(self, icon=None, separator=None, **kwargs):
         FlatCAMTool.install(self, icon, separator, shortcut='ALT+E', **kwargs)
@@ -952,7 +952,7 @@ class ToolCalibration(FlatCAMTool):
         gcode = '(G-CODE GENERATED BY FLATCAM v%s - www.flatcam.org - Version Date: %s)\n' % \
                 (str(self.app.version), str(self.app.version_date)) + '\n'
 
-        gcode += '(Name: ' + _('Verification GCode for FlatCAM Calibrate Tool') + ')\n'
+        gcode += '(Name: ' + _('Verification GCode for FlatCAM Calibration Tool') + ')\n'
 
         gcode += '(Units: ' + self.units.upper() + ')\n\n'
         gcode += '(Created on ' + time_str + ')\n\n'

+ 4 - 1
flatcamTools/ToolDistance.py

@@ -349,7 +349,10 @@ class Distance(FlatCAMTool):
                 d = math.sqrt(dx ** 2 + dy ** 2)
                 self.stop_entry.set_value("(%.*f, %.*f)" % (self.decimals, pos[0], self.decimals, pos[1]))
 
-                self.app.inform.emit(_("MEASURING: Result D(x) = {d_x} | D(y) = {d_y} | Distance = {d_z}").format(
+                self.app.inform.emit("{tx1}: {tx2} D(x) = {d_x} | D(y) = {d_y} | (tx3} = {d_z}".format(
+                    tx1=_("MEASURING"),
+                    tx2=_("Result"),
+                    tx3=_("Distance"),
                     d_x='%*f' % (self.decimals, abs(dx)),
                     d_y='%*f' % (self.decimals, abs(dy)),
                     d_z='%*f' % (self.decimals, abs(d)))

+ 4 - 1
flatcamTools/ToolDistanceMin.py

@@ -278,7 +278,10 @@ class DistanceMin(FlatCAMTool):
             )
 
         if d != 0:
-            self.app.inform.emit(_("MEASURING: Result D(x) = {d_x} | D(y) = {d_y} | Distance = {d_z}").format(
+            self.app.inform.emit("{tx1}: {tx2} D(x) = {d_x} | D(y) = {d_y} | (tx3} = {d_z}".format(
+                tx1=_("MEASURING"),
+                tx2=_("Result"),
+                tx3=_("Distance"),
                 d_x='%*f' % (self.decimals, abs(dx)),
                 d_y='%*f' % (self.decimals, abs(dy)),
                 d_z='%*f' % (self.decimals, abs(d)))

BIN
locale/en/LC_MESSAGES/strings.mo


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 221 - 218
locale/en/LC_MESSAGES/strings.po


BIN
locale/ro/LC_MESSAGES/strings.mo


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 217 - 239
locale/ro/LC_MESSAGES/strings.po


Vissa filer visades inte eftersom för många filer har ändrats