diff --git a/FlatCAMTool.py b/FlatCAMTool.py index be73af5a..fab4f7ae 100644 --- a/FlatCAMTool.py +++ b/FlatCAMTool.py @@ -83,9 +83,6 @@ class FlatCAMTool(QtWidgets.QWidget): # Put ourself in the GUI self.app.ui.tool_scroll_area.setWidget(self) - # Set the tool name as the widget object name - self.app.ui.tool_scroll_area.widget().setObjectName(self.toolName) - # Switch notebook to tool page self.app.ui.notebook.setCurrentWidget(self.app.ui.tool_tab) @@ -100,5 +97,8 @@ class FlatCAMTool(QtWidgets.QWidget): except AttributeError: pass + # Set the tool name as the widget object name + self.app.ui.tool_scroll_area.widget().setObjectName(self.toolName) + self.show() diff --git a/README.md b/README.md index 77b6d800..928d3892 100644 --- a/README.md +++ b/README.md @@ -19,6 +19,7 @@ CAD program, and create G-Code for Isolation routing. - fixed Tools menu no longer working due of changes - added some test translation for the ToolCalculators (in Romanian) - fixed bug in ToolCutOut where for each tool invocation the signals were reconnected +- fixed some issues with ToolMeasurement due of above changes 8.03.2019 diff --git a/flatcamTools/ToolMeasurement.py b/flatcamTools/ToolMeasurement.py index 703c3aea..a66d817c 100644 --- a/flatcamTools/ToolMeasurement.py +++ b/flatcamTools/ToolMeasurement.py @@ -167,9 +167,9 @@ class Measurement(FlatCAMTool): # VisPy visuals self.sel_shapes = ShapeCollection(parent=self.app.plotcanvas.vispy_canvas.view.scene, layers=1) - self.measure_btn.clicked.connect(self.toggle) + self.measure_btn.clicked.connect(self.toggle_f) - def run(self, toggle): + def run(self, toggle=False): self.app.report_usage("ToolMeasurement()") if self.app.tool_tab_locked is True: @@ -179,7 +179,7 @@ class Measurement(FlatCAMTool): if self.app.ui.splitter.sizes()[0] == 0: self.app.ui.splitter.setSizes([1, 1]) - self.toggle() + self.toggle_f() self.set_tool_ui() self.app.ui.notebook.setTabText(2, _("Meas. Tool")) @@ -199,7 +199,7 @@ class Measurement(FlatCAMTool): self.units = self.app.ui.general_defaults_form.general_app_group.units_radio.get_value().lower() self.show() - def toggle(self): + def toggle_f(self): # the self.active var is doing the 'toggle' if self.active is True: # DISABLE the Measuring TOOL @@ -333,7 +333,7 @@ class Measurement(FlatCAMTool): self.total_distance_entry.set_value('%.4f' % abs(d)) self.clicked_meas = 0 - self.toggle() + self.toggle_f() # delete the measuring line self.delete_shape() diff --git a/flatcamTools/ToolMove.py b/flatcamTools/ToolMove.py index 58e5c714..7400cdf0 100644 --- a/flatcamTools/ToolMove.py +++ b/flatcamTools/ToolMove.py @@ -56,7 +56,7 @@ class ToolMove(FlatCAMTool): return self.toggle() - def toggle(self): + def toggle(self, toggle=False): if self.isVisible(): self.setVisible(False) diff --git a/locale/ro/LC_MESSAGES/ToolCalculators.mo b/locale/ro/LC_MESSAGES/ToolCalculators.mo new file mode 100644 index 00000000..eda653e8 Binary files /dev/null and b/locale/ro/LC_MESSAGES/ToolCalculators.mo differ diff --git a/locale/ro/LC_MESSAGES/ToolCalculators.po b/locale/ro/LC_MESSAGES/ToolCalculators.po new file mode 100644 index 00000000..6b8289d3 --- /dev/null +++ b/locale/ro/LC_MESSAGES/ToolCalculators.po @@ -0,0 +1,204 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR ORGANIZATION +# FIRST AUTHOR , YEAR. +# +msgid "" +msgstr "" +"Project-Id-Version: \n" +"POT-Creation-Date: 2019-03-10 16:22+0200\n" +"PO-Revision-Date: 2019-03-10 16:30+0200\n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: pygettext.py 1.5\n" +"X-Generator: Poedit 2.2.1\n" +"Last-Translator: \n" +"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n==0 || (n!=1 && n%100>=1 && " +"n%100<=19) ? 1 : 2);\n" +"Language: ro\n" + +#: D:\1.DEV\FlatCAM_beta\flatcamTools\ToolCalculators.py:26 +msgid "Calculators" +msgstr "Calculatoare" + +#: D:\1.DEV\FlatCAM_beta\flatcamTools\ToolCalculators.py:27 +msgid "V-Shape Tool Calculator" +msgstr "Calculator Unealta V-Shape" + +#: D:\1.DEV\FlatCAM_beta\flatcamTools\ToolCalculators.py:28 +msgid "Units Calculator" +msgstr "Calculator Unitati" + +#: D:\1.DEV\FlatCAM_beta\flatcamTools\ToolCalculators.py:29 +msgid "ElectroPlating Calculator" +msgstr "Calculator ElectroPlacare" + +#: D:\1.DEV\FlatCAM_beta\flatcamTools\ToolCalculators.py:70 +msgid "Here you enter the value to be converted from INCH to MM" +msgstr "" +"Aici se introduce valoarea care trebuie convertita din Inch in milimetri." + +#: D:\1.DEV\FlatCAM_beta\flatcamTools\ToolCalculators.py:75 +msgid "Here you enter the value to be converted from MM to INCH" +msgstr "" +"Aici se introduce valoarea care trebuie convertita din milimetri in Inch." + +#: D:\1.DEV\FlatCAM_beta\flatcamTools\ToolCalculators.py:96 +msgid "Tip Diameter:" +msgstr "Diametrul Varf:" + +#: D:\1.DEV\FlatCAM_beta\flatcamTools\ToolCalculators.py:100 +msgid "" +"This is the diameter of the tool tip.\n" +"The manufacturer specifies it." +msgstr "" +"Acesta este diametrul varfului uneltei.\n" +"Este specificat de producatorul uneltei." + +#: D:\1.DEV\FlatCAM_beta\flatcamTools\ToolCalculators.py:103 +msgid "Tip Angle:" +msgstr "Unghi Varf:" + +#: D:\1.DEV\FlatCAM_beta\flatcamTools\ToolCalculators.py:107 +msgid "" +"This is the angle of the tip of the tool.\n" +"It is specified by manufacturer." +msgstr "" +"Acesta este unghiul la varf al uneltei.\n" +"Este specificat de producatorul uneltei." + +#: D:\1.DEV\FlatCAM_beta\flatcamTools\ToolCalculators.py:110 +msgid "Cut Z:" +msgstr "Z taiere:" + +#: D:\1.DEV\FlatCAM_beta\flatcamTools\ToolCalculators.py:114 +msgid "" +"This is the depth to cut into the material.\n" +"In the CNCJob is the CutZ parameter." +msgstr "" +"Aceasta este adancimea la care se taie in material.\n" +"In CNCJob este parametrul >Z taiere<." + +#: D:\1.DEV\FlatCAM_beta\flatcamTools\ToolCalculators.py:117 +msgid "Tool Diameter:" +msgstr "Diametru Unealta:" + +#: D:\1.DEV\FlatCAM_beta\flatcamTools\ToolCalculators.py:121 +msgid "" +"This is the tool diameter to be entered into\n" +"FlatCAM Gerber section.\n" +"In the CNCJob section it is called >Tool dia<." +msgstr "" +"Acesta este diametrul uneltei care trebuie introdusa in\n" +"sectiunea FlatCAM Gerber.\n" +"In sectiunea CNCJob este denumit >Dia. Unealta<." + +#: D:\1.DEV\FlatCAM_beta\flatcamTools\ToolCalculators.py:133 +#: D:\1.DEV\FlatCAM_beta\flatcamTools\ToolCalculators.py:216 +msgid "Calculate" +msgstr "Calculeaza" + +#: D:\1.DEV\FlatCAM_beta\flatcamTools\ToolCalculators.py:136 +msgid "" +"Calculate either the Cut Z or the effective tool diameter,\n" +" depending on which is desired and which is known. " +msgstr "" +"Calculeaza ori param. >Z taiere< ori diametrul efectiv al uneltei\n" +"in functie de care se doreste si care este cunoscut. " + +#: D:\1.DEV\FlatCAM_beta\flatcamTools\ToolCalculators.py:154 +msgid "" +"This calculator is useful for those who plate the via/pad/drill holes,\n" +"using a method like grahite ink or calcium hypophosphite ink or palladium " +"chloride." +msgstr "" +"Acest calculator este util pentru aceia care acopera cu Cupru via/gauri,\n" +"folosind o metoda cum ar fi: clorura de paladiu, hipofosfitul de calciu\n" +"sau cerneala pe baza de grafit." + +#: D:\1.DEV\FlatCAM_beta\flatcamTools\ToolCalculators.py:163 +msgid "Board Length:" +msgstr "Lungimea placii:" + +#: D:\1.DEV\FlatCAM_beta\flatcamTools\ToolCalculators.py:167 +msgid "This is the board length. In centimeters." +msgstr "Aceasta este lungimea placii. In centimetri." + +#: D:\1.DEV\FlatCAM_beta\flatcamTools\ToolCalculators.py:169 +msgid "Board Width:" +msgstr "Latimea placii:" + +#: D:\1.DEV\FlatCAM_beta\flatcamTools\ToolCalculators.py:173 +msgid "This is the board width.In centimeters." +msgstr "Aceasta este latimea placii. In centimetri." + +#: D:\1.DEV\FlatCAM_beta\flatcamTools\ToolCalculators.py:175 +msgid "Current Density:" +msgstr "Densitatea de current:" + +#: D:\1.DEV\FlatCAM_beta\flatcamTools\ToolCalculators.py:179 +msgid "" +"Current density to pass through the board. \n" +"In Amps per Square Feet ASF." +msgstr "" +"Densitatea curentului care trece prin palca.\n" +"In amperi / picior la patrat (ASF)." + +#: D:\1.DEV\FlatCAM_beta\flatcamTools\ToolCalculators.py:183 +msgid "Copper Growth:" +msgstr "Grosime Cupru:" + +#: D:\1.DEV\FlatCAM_beta\flatcamTools\ToolCalculators.py:187 +msgid "" +"How thick the copper growth is intended to be.\n" +"In microns." +msgstr "" +"Valoarea cu cat se creste grosimea cuprului.\n" +"In micron." + +#: D:\1.DEV\FlatCAM_beta\flatcamTools\ToolCalculators.py:192 +msgid "Current Value:" +msgstr "Valoare Int. Curent:" + +#: D:\1.DEV\FlatCAM_beta\flatcamTools\ToolCalculators.py:196 +msgid "" +"This is the current intensity value\n" +"to be set on the Power Supply. In Amps." +msgstr "" +"Aceasta este intensitatea curentului electric\n" +"care se seteaza in sursa de tensiune. In amperi." + +#: D:\1.DEV\FlatCAM_beta\flatcamTools\ToolCalculators.py:200 +msgid "Time:" +msgstr "Durata:" + +#: D:\1.DEV\FlatCAM_beta\flatcamTools\ToolCalculators.py:204 +msgid "" +"This is the calculated time required for the procedure.\n" +"In minutes." +msgstr "" +"Aceasta este durata necesara pentru procedura.\n" +"In minute." + +#: D:\1.DEV\FlatCAM_beta\flatcamTools\ToolCalculators.py:219 +msgid "" +"Calculate the current intensity value and the procedure time,\n" +" depending on the parameters above" +msgstr "" +"Calculeaza intensitatea curentului cat si durata procedurii,\n" +"in functie de parametrii de mai sus." + +#: D:\1.DEV\FlatCAM_beta\flatcamTools\ToolCalculators.py:306 +#: D:\1.DEV\FlatCAM_beta\flatcamTools\ToolCalculators.py:317 +#: D:\1.DEV\FlatCAM_beta\flatcamTools\ToolCalculators.py:329 +#: D:\1.DEV\FlatCAM_beta\flatcamTools\ToolCalculators.py:344 +#: D:\1.DEV\FlatCAM_beta\flatcamTools\ToolCalculators.py:357 +#: D:\1.DEV\FlatCAM_beta\flatcamTools\ToolCalculators.py:371 +#: D:\1.DEV\FlatCAM_beta\flatcamTools\ToolCalculators.py:382 +#: D:\1.DEV\FlatCAM_beta\flatcamTools\ToolCalculators.py:393 +#: D:\1.DEV\FlatCAM_beta\flatcamTools\ToolCalculators.py:404 +msgid "[ERROR_NOTCL]Wrong value format entered, use a number." +msgstr "" +"[ERROR_NOTCL] A fost introdusa o valoare in format gresit, foloseste un " +"numar." diff --git a/locale/ro/LC_MESSAGES/ToolMeasurement.mo b/locale/ro/LC_MESSAGES/ToolMeasurement.mo new file mode 100644 index 00000000..f97fed36 Binary files /dev/null and b/locale/ro/LC_MESSAGES/ToolMeasurement.mo differ diff --git a/locale/ro/LC_MESSAGES/ToolMeasurement.po b/locale/ro/LC_MESSAGES/ToolMeasurement.po new file mode 100644 index 00000000..2a032f36 --- /dev/null +++ b/locale/ro/LC_MESSAGES/ToolMeasurement.po @@ -0,0 +1,92 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR ORGANIZATION +# FIRST AUTHOR , YEAR. +# +msgid "" +msgstr "" +"Project-Id-Version: \n" +"POT-Creation-Date: 2019-03-10 13:08+0200\n" +"PO-Revision-Date: 2019-03-10 15:43+0200\n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: pygettext.py 1.5\n" +"X-Generator: Poedit 2.2.1\n" +"Last-Translator: \n" +"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n==0 || (n!=1 && n%100>=1 && n%100<=19) ? 1 : 2);\n" +"Language: ro\n" + +#: D:\1.DEV\FlatCAM_beta\flatcamTools\ToolMeasurement.py:16 +msgid "Measurement" +msgstr "Măsurare" + +#: D:\1.DEV\FlatCAM_beta\flatcamTools\ToolMeasurement.py:37 +msgid "Start" +msgstr "Start" + +#: D:\1.DEV\FlatCAM_beta\flatcamTools\ToolMeasurement.py:37 +#: D:\1.DEV\FlatCAM_beta\flatcamTools\ToolMeasurement.py:40 +msgid "Coords" +msgstr "Coord." + +#: D:\1.DEV\FlatCAM_beta\flatcamTools\ToolMeasurement.py:38 +#: D:\1.DEV\FlatCAM_beta\flatcamTools\ToolMeasurement.py:89 +msgid "This is measuring Start point coordinates." +msgstr "Acestea sunt coordonatele punctului de start al masuratorii." + +#: D:\1.DEV\FlatCAM_beta\flatcamTools\ToolMeasurement.py:40 +msgid "Stop" +msgstr "Stop" + +#: D:\1.DEV\FlatCAM_beta\flatcamTools\ToolMeasurement.py:41 +#: D:\1.DEV\FlatCAM_beta\flatcamTools\ToolMeasurement.py:94 +msgid "This is the measuring Stop point coordinates." +msgstr "Acestea sunt coordonatele punctului de stop al masuratorii." + +#: D:\1.DEV\FlatCAM_beta\flatcamTools\ToolMeasurement.py:44 +#: D:\1.DEV\FlatCAM_beta\flatcamTools\ToolMeasurement.py:99 +msgid "This is the distance measured over the X axis." +msgstr "Distanta masurata de-a lungul axei X." + +#: D:\1.DEV\FlatCAM_beta\flatcamTools\ToolMeasurement.py:47 +#: D:\1.DEV\FlatCAM_beta\flatcamTools\ToolMeasurement.py:105 +msgid "This is the distance measured over the Y axis." +msgstr "Distanta masurata de-a lungul axei Y." + +#: D:\1.DEV\FlatCAM_beta\flatcamTools\ToolMeasurement.py:49 +msgid "DISTANCE" +msgstr "Distanta" + +#: D:\1.DEV\FlatCAM_beta\flatcamTools\ToolMeasurement.py:50 +#: D:\1.DEV\FlatCAM_beta\flatcamTools\ToolMeasurement.py:111 +msgid "This is the point to point Euclidian distance." +msgstr "Distanta euclidiana de la punct la punct." + +#: D:\1.DEV\FlatCAM_beta\flatcamTools\ToolMeasurement.py:53 +#: D:\1.DEV\FlatCAM_beta\flatcamTools\ToolMeasurement.py:60 +#: D:\1.DEV\FlatCAM_beta\flatcamTools\ToolMeasurement.py:67 +#: D:\1.DEV\FlatCAM_beta\flatcamTools\ToolMeasurement.py:74 +#: D:\1.DEV\FlatCAM_beta\flatcamTools\ToolMeasurement.py:81 +msgid "Those are the units in which the distance is measured." +msgstr "Unitatile in care este masurata distanta" + +#: D:\1.DEV\FlatCAM_beta\flatcamTools\ToolMeasurement.py:114 +msgid "Measure" +msgstr "Masoara" + +#: D:\1.DEV\FlatCAM_beta\flatcamTools\ToolMeasurement.py:173 +msgid "Meas. Tool" +msgstr "Unealta de masurare" + +#: D:\1.DEV\FlatCAM_beta\flatcamTools\ToolMeasurement.py:266 +msgid "MEASURING: Click on the Start point ..." +msgstr "Masurare: Click pe punctul de Start ..." + +#: D:\1.DEV\FlatCAM_beta\flatcamTools\ToolMeasurement.py:295 +msgid "MEASURING: Click on the Destination point ..." +msgstr "Masurare: Click pe punctul Destinatie ..." + +#: D:\1.DEV\FlatCAM_beta\flatcamTools\ToolMeasurement.py:316 +msgid "MEASURING: Result D(x) = %.4f | D(y) = %.4f | Distance = %.4f" +msgstr "Masurare: RezultatD(x) = %.4f | D(y) = %.4f | Distanta = %.4f"