Jelajahi Sumber

- made some mods to what can be translated as some of the translations interfered with the correct functioning of FlatCAM
- updated the translations

Marius Stanciu 6 tahun lalu
induk
melakukan
747a0817f3

+ 4 - 4
FlatCAMApp.py

@@ -5056,8 +5056,8 @@ class App(QtCore.QObject):
             action.triggered.connect(self.set_grid)
 
         self.ui.cmenu_gridmenu.addSeparator()
-        grid_add = self.ui.cmenu_gridmenu.addAction(QtGui.QIcon('share/plus32.png'), "Add")
-        grid_delete = self.ui.cmenu_gridmenu.addAction(QtGui.QIcon('share/delete32.png'), "Delete")
+        grid_add = self.ui.cmenu_gridmenu.addAction(QtGui.QIcon('share/plus32.png'), _("Add"))
+        grid_delete = self.ui.cmenu_gridmenu.addAction(QtGui.QIcon('share/delete32.png'), _("Delete"))
         grid_add.triggered.connect(self.on_grid_add)
         grid_delete.triggered.connect(self.on_grid_delete)
 
@@ -5069,8 +5069,8 @@ class App(QtCore.QObject):
         ## Current application units in lower Case
         units = self.ui.general_defaults_form.general_app_group.units_radio.get_value().lower()
 
-        grid_add_popup = FCInputDialog(title="New Grid ...",
-                                       text='Enter a Grid VAlue:',
+        grid_add_popup = FCInputDialog(title=_("New Grid ..."),
+                                       text=_('Enter a Grid Value:'),
                                        min=0.0000, max=99.9999, decimals=4)
         grid_add_popup.setWindowIcon(QtGui.QIcon('share/plus32.png'))
 

+ 11 - 11
FlatCAMObj.py

@@ -2724,7 +2724,7 @@ class FlatCAMGeometry(FlatCAMObj, Geometry):
         # those elements are the ones used for generating GCode
         self.sel_tools = {}
 
-        self.offset_item_options = [_("Path"), _("In"), _("Out"), _("Custom")]
+        self.offset_item_options = ["Path", "In", "Out", "Custom"]
         self.type_item_options = [_("Iso"), _("Rough"), _("Finish")]
         self.tool_type_item_options = ["C1", "C2", "C3", "C4", "B", "V"]
 
@@ -2966,7 +2966,7 @@ class FlatCAMGeometry(FlatCAMObj, Geometry):
             self.tools.update({
                 self.tooluid: {
                     'tooldia': float(self.options["cnctooldia"]),
-                    'offset': _('Path'),
+                    'offset': ('Path'),
                     'offset_value': 0.0,
                     'type': _('Rough'),
                     'tool_type': 'C1',
@@ -3048,7 +3048,7 @@ class FlatCAMGeometry(FlatCAMObj, Geometry):
             tool_offset = self.ui.geo_tools_table.cellWidget(current_row, 2)
             if tool_offset is not None:
                 tool_offset_txt = tool_offset.currentText()
-                if tool_offset_txt == _('Custom'):
+                if tool_offset_txt == ('Custom'):
                     self.ui.tool_offset_entry.show()
                     self.ui.tool_offset_lbl.show()
                 else:
@@ -3253,7 +3253,7 @@ class FlatCAMGeometry(FlatCAMObj, Geometry):
             self.tools.update({
                 self.tooluid: {
                     'tooldia': tooldia,
-                    'offset': _('Path'),
+                    'offset': ('Path'),
                     'offset_value': 0.0,
                     'type': _('Rough'),
                     'tool_type': 'C1',
@@ -3622,7 +3622,7 @@ class FlatCAMGeometry(FlatCAMObj, Geometry):
                 cb_txt = cw.currentText()
                 if cw_col == 2:
                     tooluid_value['offset'] = cb_txt
-                    if cb_txt == _('Custom'):
+                    if cb_txt == ('Custom'):
                         self.ui.tool_offset_entry.show()
                         self.ui.tool_offset_lbl.show()
                     else:
@@ -4095,13 +4095,13 @@ class FlatCAMGeometry(FlatCAMObj, Geometry):
                             diadict_key: datadict
                         })
 
-                if dia_cnc_dict['offset'] == 'in':
+                if dia_cnc_dict['offset'] == ('in'):
                     tool_offset = -dia_cnc_dict['tooldia'] / 2
                     offset_str = 'inside'
-                elif dia_cnc_dict['offset'].lower() == 'out':
+                elif dia_cnc_dict['offset'].lower() == ('out'):
                     tool_offset = dia_cnc_dict['tooldia']  / 2
                     offset_str = 'outside'
-                elif dia_cnc_dict['offset'].lower() == 'path':
+                elif dia_cnc_dict['offset'].lower() == ('path'):
                     offset_str = 'onpath'
                     tool_offset = 0.0
                 else:
@@ -4328,13 +4328,13 @@ class FlatCAMGeometry(FlatCAMObj, Geometry):
                             diadict_key: datadict
                         })
 
-                if dia_cnc_dict['offset'] == 'in':
+                if dia_cnc_dict['offset'] == ('in'):
                     tool_offset = -dia_cnc_dict['tooldia'] / 2
                     offset_str = 'inside'
-                elif dia_cnc_dict['offset'].lower() == 'out':
+                elif dia_cnc_dict['offset'].lower() == ('out'):
                     tool_offset = dia_cnc_dict['tooldia']  / 2
                     offset_str = 'outside'
-                elif dia_cnc_dict['offset'].lower() == 'path':
+                elif dia_cnc_dict['offset'].lower() == ('path'):
                     offset_str = 'onpath'
                     tool_offset = 0.0
                 else:

+ 2 - 0
README.md

@@ -16,6 +16,8 @@ CAD program, and create G-Code for Isolation routing.
 - Enable/Disable Object toggle key ("Space" key) will trigger also the datChanged signal for the Project MVC
 - added a new setting for the color of the Project items, the color when they are disabled.
 - fixed a crash when triggering 'Jump To' menu action (shortcut key 'J' worked ok)
+- made some mods to what can be translated as some of the translations interfered with the correct functioning of FlatCAM
+- updated the translations
 
 30.04.2019
 

+ 1 - 1
flatcamEditors/FlatCAMExcEditor.py

@@ -931,7 +931,7 @@ class FlatCAMExcEditor(QtCore.QObject):
 
         self.drill_axis_radio = RadioSet([{'label': 'X', 'value': 'X'},
                                           {'label': 'Y', 'value': 'Y'},
-                                          {'label': _('Angle'), 'value': 'A'}])
+                                          {'label': 'Angle', 'value': 'A'}])
         self.drill_axis_radio.set_value('X')
         self.linear_form.addRow(self.drill_axis_label, self.drill_axis_radio)
 

+ 3 - 3
flatcamEditors/FlatCAMGeoEditor.py

@@ -475,9 +475,9 @@ class PaintOptionsTool(FlatCAMTool):
         )
         grid.addWidget(methodlabel, 3, 0)
         self.paintmethod_combo = RadioSet([
-            {"label": _("Standard"), "value": "standard"},
-            {"label": _("Seed-based"), "value": "seed"},
-            {"label": _("Straight lines"), "value": "lines"}
+            {"label": "Standard", "value": "standard"},
+            {"label": "Seed-based", "value": "seed"},
+            {"label": "Straight lines", "value": "lines"}
         ], orientation='vertical', stretch=False)
         grid.addWidget(self.paintmethod_combo, 3, 1)
 

+ 1 - 1
flatcamEditors/FlatCAMGrbEditor.py

@@ -1983,7 +1983,7 @@ class FlatCAMGrbEditor(QtCore.QObject):
 
         self.pad_axis_radio = RadioSet([{'label': 'X', 'value': 'X'},
                                           {'label': 'Y', 'value': 'Y'},
-                                          {'label': _('Angle'), 'value': 'A'}])
+                                          {'label': 'Angle', 'value': 'A'}])
         self.pad_axis_radio.set_value('X')
         self.linear_form.addRow(self.pad_axis_label, self.pad_axis_radio)
 

+ 42 - 42
flatcamGUI/FlatCAMGUI.py

@@ -3734,8 +3734,8 @@ class GeneralAppPrefGroupUI(OptionsGroupUI):
                                         "ADVANCED level -> full functionality.\n\n"
                                         "The choice here will influence the parameters in\n"
                                         "the Selected Tab for all kinds of FlatCAM objects."))
-        self.app_level_radio = RadioSet([{'label': _('Basic'), 'value': 'b'},
-                                         {'label': _('Advanced'), 'value': 'a'}])
+        self.app_level_radio = RadioSet([{'label': 'Basic', 'value': 'b'},
+                                         {'label': 'Advanced', 'value': 'a'}])
 
         # Languages for FlatCAM
         self.languagelabel = QtWidgets.QLabel(_('<b>Languages:</b>'))
@@ -3794,14 +3794,14 @@ class GeneralAppPrefGroupUI(OptionsGroupUI):
         self.panbuttonlabel.setToolTip(_("Select the mouse button to use for panning:\n"
                                        "- MMB --> Middle Mouse Button\n"
                                        "- RMB --> Right Mouse Button"))
-        self.pan_button_radio = RadioSet([{'label': _('MMB'), 'value': '3'},
-                                     {'label': _('RMB'), 'value': '2'}])
+        self.pan_button_radio = RadioSet([{'label': 'MMB', 'value': '3'},
+                                     {'label': 'RMB', 'value': '2'}])
 
         # Multiple Selection Modifier Key
         self.mselectlabel = QtWidgets.QLabel(_('<b>Multiple Sel:</b>'))
         self.mselectlabel.setToolTip(_("Select the key used for multiple selection."))
-        self.mselect_radio = RadioSet([{'label': _('CTRL'), 'value': 'Control'},
-                                     {'label': _('SHIFT'), 'value': 'Shift'}])
+        self.mselect_radio = RadioSet([{'label': 'CTRL', 'value': 'Control'},
+                                     {'label': 'SHIFT', 'value': 'Shift'}])
 
         # Project at StartUp CB
         self.project_startup_label = QtWidgets.QLabel(_('Project at StartUp:'))
@@ -4029,8 +4029,8 @@ class GerberOptPrefGroupUI(OptionsGroupUI):
             "- conventional / useful when there is no backlash compensation")
         )
         grid0.addWidget(milling_type_label, 3, 0)
-        self.milling_type_radio = RadioSet([{'label': _('Climb'), 'value': 'cl'},
-                                            {'label': _('Conv.'), 'value': 'cv'}])
+        self.milling_type_radio = RadioSet([{'label': 'Climb', 'value': 'cl'},
+                                            {'label': 'Conv.', 'value': 'cv'}])
         grid0.addWidget(self.milling_type_radio, 3, 1)
 
         # Combine passes
@@ -4298,8 +4298,8 @@ class ExcellonGenPrefGroupUI(OptionsGroupUI):
         )
         hlay3.addWidget(self.excellon_zeros_label)
 
-        self.excellon_zeros_radio = RadioSet([{'label': _('LZ'), 'value': 'L'},
-                                     {'label': _('TZ'), 'value': 'T'}])
+        self.excellon_zeros_radio = RadioSet([{'label': 'LZ', 'value': 'L'},
+                                     {'label': 'TZ', 'value': 'T'}])
         self.excellon_zeros_radio.setToolTip(
             _("This sets the default type of Excellon zeros.\n"
             "If it is not detected in the parsed file the value here\n"
@@ -4326,8 +4326,8 @@ class ExcellonGenPrefGroupUI(OptionsGroupUI):
         )
         hlay4.addWidget(self.excellon_units_label)
 
-        self.excellon_units_radio = RadioSet([{'label': _('INCH'), 'value': 'INCH'},
-                                              {'label': _('MM'), 'value': 'METRIC'}])
+        self.excellon_units_radio = RadioSet([{'label': 'INCH', 'value': 'INCH'},
+                                              {'label': 'MM', 'value': 'METRIC'}])
         self.excellon_units_radio.setToolTip(
             _("This sets the units of Excellon files.\n"
             "Some Excellon files don't have an header\n"
@@ -4365,8 +4365,8 @@ class ExcellonGenPrefGroupUI(OptionsGroupUI):
             "Travelling Salesman algorithm for path optimization.")
         )
 
-        self.excellon_optimization_radio = RadioSet([{'label': _('MH'), 'value': 'M'},
-                                     {'label': _('Basic'), 'value': 'B'}])
+        self.excellon_optimization_radio = RadioSet([{'label': 'MH', 'value': 'M'},
+                                     {'label': 'Basic', 'value': 'B'}])
         self.excellon_optimization_radio.setToolTip(
             _("This sets the optimization type for the Excellon drill path.\n"
             "If MH is checked then Google OR-Tools algorithm with MetaHeuristic\n"
@@ -4531,9 +4531,9 @@ class ExcellonOptPrefGroupUI(OptionsGroupUI):
             "When choosing 'Slots' or 'Both', slots will be\n"
             "converted to drills.")
         )
-        self.excellon_gcode_type_radio = RadioSet([{'label': _('Drills'), 'value': 'drills'},
-                                          {'label': _('Slots'), 'value': 'slots'},
-                                          {'label': _('Both'), 'value': 'both'}])
+        self.excellon_gcode_type_radio = RadioSet([{'label': 'Drills', 'value': 'drills'},
+                                          {'label': 'Slots', 'value': 'slots'},
+                                          {'label': 'Both', 'value': 'both'}])
         grid2.addWidget(excellon_gcode_type_label, 9, 0)
         grid2.addWidget(self.excellon_gcode_type_radio, 9, 1)
 
@@ -4717,8 +4717,8 @@ class ExcellonExpPrefGroupUI(OptionsGroupUI):
             _("The units used in the Excellon file.")
         )
 
-        self.excellon_units_radio = RadioSet([{'label': _('INCH'), 'value': 'INCH'},
-                                              {'label': _('MM'), 'value': 'METRIC'}])
+        self.excellon_units_radio = RadioSet([{'label': 'INCH', 'value': 'INCH'},
+                                              {'label': 'MM', 'value': 'METRIC'}])
         self.excellon_units_radio.setToolTip(
             _("The units used in the Excellon file.")
         )
@@ -4773,8 +4773,8 @@ class ExcellonExpPrefGroupUI(OptionsGroupUI):
             "Also it will have to be specified if LZ = leading zeros are kept\n"
             "or TZ = trailing zeros are kept.")
         )
-        self.format_radio = RadioSet([{'label': _('Decimal'), 'value': 'dec'},
-                                      {'label': _('No-Decimal'), 'value': 'ndec'}])
+        self.format_radio = RadioSet([{'label': 'Decimal', 'value': 'dec'},
+                                      {'label': 'No-Decimal', 'value': 'ndec'}])
         self.format_radio.setToolTip(
             _("Select the kind of coordinates format used.\n"
             "Coordinates can be saved with decimal point or without.\n"
@@ -4797,8 +4797,8 @@ class ExcellonExpPrefGroupUI(OptionsGroupUI):
             "and Leading Zeros are removed.")
         )
 
-        self.zeros_radio = RadioSet([{'label': _('LZ'), 'value': 'LZ'},
-                                     {'label': _('TZ'), 'value': 'TZ'}])
+        self.zeros_radio = RadioSet([{'label': 'LZ', 'value': 'LZ'},
+                                     {'label': 'TZ', 'value': 'TZ'}])
         self.zeros_radio.setToolTip(
             _("This sets the default type of Excellon zeros.\n"
             "If LZ then Leading Zeros are kept and\n"
@@ -5179,9 +5179,9 @@ class CNCJobGenPrefGroupUI(OptionsGroupUI):
         )
 
         self.cncplot_method_radio = RadioSet([
-            {"label": _("All"), "value": "all"},
-            {"label": _("Travel"), "value": "travel"},
-            {"label": _("Cut"), "value": "cut"}
+            {"label": "All", "value": "all"},
+            {"label": "Travel", "value": "travel"},
+            {"label": "Cut", "value": "cut"}
         ], stretch=False)
 
         grid0.addWidget(self.cncplot_method_label, 1, 0)
@@ -5415,9 +5415,9 @@ class ToolsNCCPrefGroupUI(OptionsGroupUI):
         )
         grid0.addWidget(methodlabel, 3, 0)
         self.ncc_method_radio = RadioSet([
-            {"label": _("Standard"), "value": "standard"},
-            {"label": _("Seed-based"), "value": "seed"},
-            {"label": _("Straight lines"), "value": "lines"}
+            {"label": "Standard", "value": "standard"},
+            {"label": "Seed-based", "value": "seed"},
+            {"label": "Straight lines", "value": "lines"}
         ], orientation='vertical', stretch=False)
         grid0.addWidget(self.ncc_method_radio, 3, 1)
 
@@ -5564,8 +5564,8 @@ class Tools2sidedPrefGroupUI(OptionsGroupUI):
         grid0.addWidget(self.drill_dia_entry, 0, 1)
 
         ## Axis
-        self.mirror_axis_radio = RadioSet([{'label': _('X'), 'value': 'X'},
-                                     {'label': _('Y'), 'value': 'Y'}])
+        self.mirror_axis_radio = RadioSet([{'label': 'X', 'value': 'X'},
+                                     {'label': 'Y', 'value': 'Y'}])
         self.mirax_label = QtWidgets.QLabel(_("Mirror Axis:"))
         self.mirax_label.setToolTip(
             _("Mirror vertically (X) or horizontally (Y).")
@@ -5577,8 +5577,8 @@ class Tools2sidedPrefGroupUI(OptionsGroupUI):
         grid0.addWidget(self.mirror_axis_radio, 2, 1)
 
         ## Axis Location
-        self.axis_location_radio = RadioSet([{'label': _('Point'), 'value': 'point'},
-                                             {'label': _('Box'), 'value': 'box'}])
+        self.axis_location_radio = RadioSet([{'label': 'Point', 'value': 'point'},
+                                             {'label': 'Box', 'value': 'box'}])
         self.axloc_label = QtWidgets.QLabel(_("Axis Ref:"))
         self.axloc_label.setToolTip(
             _("The axis should pass through a <b>point</b> or cut\n "
@@ -5655,9 +5655,9 @@ class ToolsPaintPrefGroupUI(OptionsGroupUI):
         )
         grid0.addWidget(methodlabel, 3, 0)
         self.paintmethod_combo = RadioSet([
-            {"label": _("Standard"), "value": "standard"},
-            {"label": _("Seed-based"), "value": "seed"},
-            {"label": _("Straight lines"), "value": "lines"}
+            {"label": "Standard", "value": "standard"},
+            {"label": "Seed-based", "value": "seed"},
+            {"label": "Straight lines", "value": "lines"}
         ], orientation='vertical', stretch=False)
         grid0.addWidget(self.paintmethod_combo, 3, 1)
 
@@ -5688,8 +5688,8 @@ class ToolsPaintPrefGroupUI(OptionsGroupUI):
         )
         grid0.addWidget(selectlabel, 6, 0)
         self.selectmethod_combo = RadioSet([
-            {"label": _("Single"), "value": "single"},
-            {"label": _("All"), "value": "all"},
+            {"label": "Single", "value": "single"},
+            {"label": "All", "value": "all"},
             # {"label": "Rectangle", "value": "rectangle"}
         ])
         grid0.addWidget(self.selectmethod_combo, 6, 1)
@@ -5716,8 +5716,8 @@ class ToolsFilmPrefGroupUI(OptionsGroupUI):
         grid0 = QtWidgets.QGridLayout()
         self.layout.addLayout(grid0)
 
-        self.film_type_radio = RadioSet([{'label': _('Pos'), 'value': 'pos'},
-                                         {'label': _('Neg'), 'value': 'neg'}])
+        self.film_type_radio = RadioSet([{'label': 'Pos', 'value': 'pos'},
+                                         {'label': 'Neg', 'value': 'neg'}])
         ftypelbl = QtWidgets.QLabel(_('Film Type:'))
         ftypelbl.setToolTip(
             _("Generate a Positive black film or a Negative film.\n"
@@ -5816,8 +5816,8 @@ class ToolsPanelizePrefGroupUI(OptionsGroupUI):
         grid0.addWidget(self.prows, 3, 1)
 
         ## Type of resulting Panel object
-        self.panel_type_radio = RadioSet([{'label': _('Gerber'), 'value': 'gerber'},
-                                          {'label': _('Geo'), 'value': 'geometry'}])
+        self.panel_type_radio = RadioSet([{'label': 'Gerber', 'value': 'gerber'},
+                                          {'label': 'Geo', 'value': 'geometry'}])
         self.panel_type_label = QtWidgets.QLabel(_("Panel Type:"))
         self.panel_type_label.setToolTip(
            _( "Choose the type of object for the panel object:\n"

+ 10 - 10
flatcamGUI/ObjectUI.py

@@ -153,7 +153,7 @@ class GerberObjectUI(ObjectUI):
         grid0.addWidget(self.plot_options_label, 0, 0)
 
         # Solid CB
-        self.solid_cb = FCCheckBox(label=_('Solid   '))
+        self.solid_cb = FCCheckBox(label=_('Solid'))
         self.solid_cb.setToolTip(
             _("Solid color polygons.")
         )
@@ -161,7 +161,7 @@ class GerberObjectUI(ObjectUI):
         grid0.addWidget(self.solid_cb, 0, 1)
 
         # Multicolored CB
-        self.multicolored_cb = FCCheckBox(label=_('M-Color   '))
+        self.multicolored_cb = FCCheckBox(label=_('M-Color'))
         self.multicolored_cb.setToolTip(
             _("Draw polygons in different colors.")
         )
@@ -299,8 +299,8 @@ class GerberObjectUI(ObjectUI):
             "- conventional / useful when there is no backlash compensation")
         )
         grid1.addWidget(self.milling_type_label, 3, 0)
-        self.milling_type_radio = RadioSet([{'label': _('Climb'), 'value': 'cl'},
-                                            {'label': _('Conv.'), 'value': 'cv'}])
+        self.milling_type_radio = RadioSet([{'label': 'Climb', 'value': 'cl'},
+                                            {'label': 'Conv.', 'value': 'cv'}])
         grid1.addWidget(self.milling_type_radio, 3, 1)
 
         # combine all passes CB
@@ -749,9 +749,9 @@ class ExcellonObjectUI(ObjectUI):
             "When choosing 'Slots' or 'Both', slots will be\n"
             "converted to a series of drills.")
         )
-        self.excellon_gcode_type_radio = RadioSet([{'label': _('Drills'), 'value': 'drills'},
-                                                   {'label': _('Slots'), 'value': 'slots'},
-                                                   {'label': _('Both'), 'value': 'both'}])
+        self.excellon_gcode_type_radio = RadioSet([{'label': 'Drills', 'value': 'drills'},
+                                                   {'label': 'Slots', 'value': 'slots'},
+                                                   {'label': 'Both', 'value': 'both'}])
         gcode_box.addRow(gcode_type_label, self.excellon_gcode_type_radio)
         self.tools_box.addLayout(gcode_box)
 
@@ -1355,9 +1355,9 @@ class CNCObjectUI(ObjectUI):
         )
 
         self.cncplot_method_combo = RadioSet([
-            {"label": _("All"), "value": "all"},
-            {"label": _("Travel"), "value": "travel"},
-            {"label": _("Cut"), "value": "cut"}
+            {"label": "All", "value": "all"},
+            {"label": "Travel", "value": "travel"},
+            {"label": "Cut", "value": "cut"}
         ], stretch=False)
 
         ## Object name

TEMPAT SAMPAH
locale/de/LC_MESSAGES/strings.mo


File diff ditekan karena terlalu besar
+ 225 - 198
locale/de/LC_MESSAGES/strings.po


TEMPAT SAMPAH
locale/en/LC_MESSAGES/strings.mo


File diff ditekan karena terlalu besar
+ 229 - 200
locale/en/LC_MESSAGES/strings.po


TEMPAT SAMPAH
locale/ro/LC_MESSAGES/strings.mo


File diff ditekan karena terlalu besar
+ 225 - 198
locale/ro/LC_MESSAGES/strings.po


File diff ditekan karena terlalu besar
+ 229 - 202
locale_template/strings.pot


Beberapa file tidak ditampilkan karena terlalu banyak file yang berubah dalam diff ini