Draft: Update UI strings for consistency (#22331)

* Draft: Update UI strings for consistency

* Apply suggestions from code review

* Apply suggestions from code review

Co-authored-by: Ryan K <114723629+ryankembrey@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: Ryan K <114723629+ryankembrey@users.noreply.github.com>

* Apply suggestions from code review

* Apply suggestions from code review

* Apply suggestions from code review

Co-authored-by: Roy-043 <70520633+Roy-043@users.noreply.github.com>

* Apply suggestions from code review

* Apply suggestions from code review

Co-authored-by: Roy-043 <70520633+Roy-043@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: Roy-043 <70520633+Roy-043@users.noreply.github.com>

* Apply suggestions from code review

---------

Co-authored-by: Ryan K <114723629+ryankembrey@users.noreply.github.com>
Co-authored-by: Roy-043 <70520633+Roy-043@users.noreply.github.com>
This commit is contained in:
Max Wilfinger
2025-08-06 23:02:16 +02:00
committed by GitHub
parent f1032b47d4
commit a9cd5a4982
89 changed files with 415 additions and 420 deletions

View File

@@ -43,6 +43,6 @@ PyMOD_INIT_FUNC(DraftUtils)
PyMOD_Return(nullptr);
}
PyObject* mod = DraftUtils::initModule();
Base::Console().log("Loading DraftUtils module... done\n");
Base::Console().log("Loading DraftUtils module done\n");
PyMOD_Return(mod);
}

View File

@@ -193,7 +193,7 @@ class DraftToolBar:
self.baseWidget = DraftBaseWidget()
self.tray = FreeCADGui.UiLoader().createWidget("Gui::ToolBar")
self.tray.setObjectName("Draft tray")
self.tray.setWindowTitle("Draft tray")
self.tray.setWindowTitle("Draft Tray")
self.toptray = self.tray
self.bottomtray = self.tray
self.setupTray()
@@ -525,24 +525,24 @@ class DraftToolBar:
self.promptlabel.setText(translate("draft", "active command:"))
self.cmdlabel.setText(translate("draft", "None"))
self.cmdlabel.setToolTip(translate("draft", "Active Draft command"))
self.xValue.setToolTip(translate("draft", "X coordinate of point"))
self.xValue.setToolTip(translate("draft", "X coordinate of the point"))
self.labelx.setText(translate("draft", "X"))
self.labely.setText(translate("draft", "Y"))
self.labelz.setText(translate("draft", "Z"))
self.yValue.setToolTip(translate("draft", "Y coordinate of point"))
self.zValue.setToolTip(translate("draft", "Z coordinate of point"))
self.pointButton.setText(translate("draft", "Enter point"))
self.yValue.setToolTip(translate("draft", "Y coordinate of the point"))
self.zValue.setToolTip(translate("draft", "Z coordinate of the point"))
self.pointButton.setText(translate("draft", "Enter Point"))
self.pointButton.setToolTip(translate(
"draft","Enter a point with given coordinates"))
self.labellength.setText(translate("draft", "Length"))
self.labelangle.setText(translate("draft", "Angle"))
self.lengthValue.setToolTip(translate("draft", "Length of current segment"))
self.angleValue.setToolTip(translate("draft", "Angle of current segment"))
self.lengthValue.setToolTip(translate("draft", "Length of the current segment"))
self.angleValue.setToolTip(translate("draft", "Angle of the current segment"))
self.angleLock.setToolTip(translate(
"draft", "Check this to lock the current angle")\
"draft", "Locks the current angle")\
+ " (" + _get_incmd_shortcut("Length") + ")")
self.labelRadius.setText(translate("draft", "Radius"))
self.radiusValue.setToolTip(translate("draft", "Radius of Circle"))
self.radiusValue.setToolTip(translate("draft", "Radius of the circle"))
self.isRelative.setText(translate(
"draft", "Relative") + " (" + _get_incmd_shortcut("Relative") + ")")
self.isRelative.setToolTip(translate(
@@ -565,10 +565,10 @@ class DraftToolBar:
self.continueCmd.setText(translate(
"draft", "Continue") + " (" + _get_incmd_shortcut("Continue") + ")")
self.continueCmd.setToolTip(translate(
"draft", "If checked, command will not finish until you press "
"draft", "If checked, the command will not finish until pressing "
+ "the command button again"))
self.chainedModeCmd.setText(translate("draft", "Chained mode"))
self.chainedModeCmd.setToolTip(translate("draft", "If checked, the next Dimension will be placed in a chain" \
self.chainedModeCmd.setToolTip(translate("draft", "If checked, the next dimension will be placed in a chain" \
" with the previously placed Dimension"))
self.occOffset.setText(translate("draft", "OCC-style offset"))
self.occOffset.setToolTip(translate(
@@ -580,9 +580,9 @@ class DraftToolBar:
self.closeButton.setToolTip(translate("draft", "Finishes and closes the current line"))
self.wipeButton.setText(translate("draft", "Wipe") + " (" + _get_incmd_shortcut("Wipe") + ")")
self.wipeButton.setToolTip(translate("draft", "Wipes the existing segments of this line and starts again from the last point"))
self.orientWPButton.setText(translate("draft", "Set WP") + " (" + _get_incmd_shortcut("SetWP") + ")")
self.orientWPButton.setText(translate("draft", "Set Working Plane") + " (" + _get_incmd_shortcut("SetWP") + ")")
self.orientWPButton.setToolTip(translate("draft", "Reorients the working plane on the last segment"))
self.selectButton.setText(translate("draft", "Select edge") + " (" + _get_incmd_shortcut("SelectEdge") + ")")
self.selectButton.setText(translate("draft", "Select Edge") + " (" + _get_incmd_shortcut("SelectEdge") + ")")
self.selectButton.setToolTip(translate("draft", "Selects an existing edge to be measured by this dimension"))
self.numFacesLabel.setText(translate("draft", "Sides"))
self.numFaces.setToolTip(translate("draft", "Number of sides"))
@@ -591,8 +591,8 @@ class DraftToolBar:
self.isCopy.setToolTip(translate("draft", "If checked, objects will be copied instead of moved"))
self.isSubelementMode.setText(translate("draft", "Modify subelements") + " (" + _get_incmd_shortcut("SubelementMode") + ")")
self.isSubelementMode.setToolTip(translate("draft", "If checked, subelements will be modified instead of entire objects"))
self.textOkButton.setText(translate("draft", "Create text"))
self.textOkButton.setToolTip(translate("draft", "Press this button to create the text object, or finish your text with two blank lines"))
self.textOkButton.setText(translate("draft", "Create Text"))
self.textOkButton.setToolTip(translate("draft", "Creates the text object and finishes the command"))
self.retranslateTray(widget)
# Update the maximum width of the push buttons
@@ -614,8 +614,8 @@ class DraftToolBar:
def retranslateTray(self,widget=None):
self.styleButton.setToolTip(translate("draft", "Change default style for new objects"))
self.constrButton.setToolTip(translate("draft", "Toggle construction mode"))
self.styleButton.setToolTip(translate("draft", "Changes the default style for new objects"))
self.constrButton.setToolTip(translate("draft", "Toggles construction mode"))
self.autoGroupButton.setToolTip(translate("draft", "Autogroup off"))
@@ -773,7 +773,7 @@ class DraftToolBar:
def labelUi(self,title=translate("draft","Label"),callback=None):
w = QtWidgets.QWidget()
w.setWindowTitle(translate("draft","Label type"))
w.setWindowTitle(translate("draft","Label Type"))
l = QtWidgets.QVBoxLayout(w)
combo = QtWidgets.QComboBox()
from draftobjects.label import get_label_types
@@ -1661,7 +1661,7 @@ class DraftToolBar:
"Draft_Scale","Draft_Offset",
"Draft_Trimex","Draft_Upgrade",
"Draft_Downgrade","Draft_Edit"]
self.title = translate("draft", "Modify objects")
self.title = translate("draft", "Modify Objects")
def shouldShow(self):
return (FreeCAD.ActiveDocument is not None) and (FreeCADGui.Selection.getSelection() != [])
@@ -1816,7 +1816,7 @@ class FacebinderTaskPanel:
TaskPanel.setWindowTitle(QtWidgets.QApplication.translate("draft", "Faces", None))
self.delButton.setText(QtWidgets.QApplication.translate("draft", "Remove", None))
self.addButton.setText(QtWidgets.QApplication.translate("draft", "Add", None))
self.title.setText(QtWidgets.QApplication.translate("draft", "Facebinder elements", None))
self.title.setText(QtWidgets.QApplication.translate("draft", "Facebinder Elements", None))
#def translateWidget(w, context=None, disAmb=None):
# '''translator for items where retranslateUi() is unavailable.

View File

@@ -23,7 +23,7 @@
</size>
</property>
<property name="windowTitle">
<string>Circular array</string>
<string>Circular Array</string>
</property>
<layout class="QGridLayout" name="gridLayout_3">
<item row="0" column="0">
@@ -31,7 +31,7 @@
<item row="0" column="0">
<widget class="QLabel" name="label_r_distance">
<property name="toolTip">
<string>Distance from one layer of objects to the next layer of objects.</string>
<string>Distance from one layer of objects to the next layer of objects</string>
</property>
<property name="text">
<string>Radial distance</string>
@@ -41,7 +41,7 @@
<item row="0" column="1">
<widget class="Gui::QuantitySpinBox" name="spinbox_r_distance">
<property name="toolTip">
<string>Distance from one layer of objects to the next layer of objects.</string>
<string>Distance from one layer of objects to the next layer of objects</string>
</property>
<property name="unit" stdset="0">
<string notr="true">mm</string>
@@ -107,7 +107,7 @@ It must be at least 2.</string>
<item row="3" column="0">
<widget class="QLabel" name="label_symmetry">
<property name="toolTip">
<string>The number of symmetry lines in the circular array.</string>
<string>The number of symmetry lines in the circular array</string>
</property>
<property name="text">
<string>Symmetry</string>
@@ -117,7 +117,7 @@ It must be at least 2.</string>
<item row="3" column="1">
<widget class="QSpinBox" name="spinbox_symmetry">
<property name="toolTip">
<string>The number of symmetry lines in the circular array.</string>
<string>The number of symmetry lines in the circular array</string>
</property>
<property name="minimum">
<number>1</number>
@@ -136,7 +136,7 @@ It must be at least 2.</string>
Change the direction of the axis itself in the property editor.</string>
</property>
<property name="title">
<string>Center of rotation</string>
<string>Center of Rotation</string>
</property>
<layout class="QGridLayout" name="gridLayout_2">
<item row="0" column="0">
@@ -206,10 +206,10 @@ Change the direction of the axis itself in the property editor.</string>
<item row="1" column="0">
<widget class="QPushButton" name="button_reset">
<property name="toolTip">
<string>Reset the coordinates of the center of rotation.</string>
<string>Resets the coordinates of the center of rotation</string>
</property>
<property name="text">
<string>Reset point</string>
<string>Reset Point</string>
</property>
</widget>
</item>

View File

@@ -23,16 +23,16 @@
</size>
</property>
<property name="windowTitle">
<string>Orthogonal array</string>
<string>Orthogonal Array</string>
</property>
<layout class="QGridLayout" name="gridLayout_3">
<item row="0" column="0">
<widget class="QPushButton" name="button_linear_mode">
<property name="toolTip">
<string>Toggle between Orthogonal mode and Linear mode. In Linear mode, you can select which axis to use.</string>
<string>Toggles between orthogonal and linear mode</string>
</property>
<property name="text">
<string>Switch to linear mode</string>
<string>Switch to Linear Mode</string>
</property>
<property name="checkable">
<bool>true</bool>
@@ -80,7 +80,7 @@
The number must be at least 1 in each direction.</string>
</property>
<property name="title">
<string>Number of elements</string>
<string>Number of Elements</string>
</property>
<layout class="QGridLayout" name="gridLayout_5">
<item row="0" column="0">
@@ -170,7 +170,7 @@ Normally, only the X value is necessary; the other two values can give an additi
Negative values will result in copies produced in the negative direction.</string>
</property>
<property name="title">
<string>X intervals</string>
<string>X Intervals</string>
</property>
<layout class="QGridLayout" name="gridLayout_2">
<item row="0" column="0">
@@ -243,7 +243,7 @@ Negative values will result in copies produced in the negative direction.</strin
<item row="1" column="0">
<widget class="QPushButton" name="button_reset_X">
<property name="toolTip">
<string>Reset the distances.</string>
<string>Resets the distances</string>
</property>
<property name="text">
<string>Reset X</string>
@@ -261,7 +261,7 @@ Normally, only the Y value is necessary; the other two values can give an additi
Negative values will result in copies produced in the negative direction.</string>
</property>
<property name="title">
<string>Y intervals</string>
<string>Y Intervals</string>
</property>
<layout class="QGridLayout" name="gridLayout_1">
<item row="0" column="0">
@@ -334,7 +334,7 @@ Negative values will result in copies produced in the negative direction.</strin
<item row="1" column="0">
<widget class="QPushButton" name="button_reset_Y">
<property name="toolTip">
<string>Reset the distances.</string>
<string>Resets the distances</string>
</property>
<property name="text">
<string>Reset Y</string>
@@ -352,7 +352,7 @@ Normally, only the Z value is necessary; the other two values can give an additi
Negative values will result in copies produced in the negative direction.</string>
</property>
<property name="title">
<string>Z intervals</string>
<string>Z Intervals</string>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
@@ -425,7 +425,7 @@ Negative values will result in copies produced in the negative direction.</strin
<item row="1" column="0">
<widget class="QPushButton" name="button_reset_Z">
<property name="toolTip">
<string>Reset the distances.</string>
<string>Resets the distances</string>
</property>
<property name="text">
<string>Reset Z</string>

View File

@@ -23,7 +23,7 @@
</size>
</property>
<property name="windowTitle">
<string>Polar array</string>
<string>Polar Array</string>
</property>
<layout class="QGridLayout" name="gridLayout_3">
<item row="0" column="0">
@@ -98,7 +98,7 @@ It must be at least 2.</string>
Change the direction of the axis itself in the property editor.</string>
</property>
<property name="title">
<string>Center of rotation</string>
<string>Center of Rotation</string>
</property>
<layout class="QGridLayout" name="gridLayout_2">
<item row="0" column="0">
@@ -168,10 +168,10 @@ Change the direction of the axis itself in the property editor.</string>
<item row="1" column="0">
<widget class="QPushButton" name="button_reset">
<property name="toolTip">
<string>Reset the coordinates of the center of rotation.</string>
<string>Resets the coordinates of the center of rotation</string>
</property>
<property name="text">
<string>Reset point</string>
<string>Reset Point</string>
</property>
</widget>
</item>

View File

@@ -11,7 +11,7 @@
</rect>
</property>
<property name="windowTitle">
<string>Style settings</string>
<string>Style Settings</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_1">
<item>
@@ -37,7 +37,7 @@
</size>
</property>
<property name="toolTip">
<string>Save the current style as a preset...</string>
<string>Saves the current style as a preset</string>
</property>
<property name="text">
<string/>
@@ -60,7 +60,7 @@
<item>
<widget class="QGroupBox" name="groupBox_1">
<property name="title">
<string>Shape appearance</string>
<string>Shape Appearance</string>
</property>
<layout class="QGridLayout" name="gridLayout_1" columnstretch="1,0" columnminimumwidth="0,100">
<item row="0" column="0">
@@ -386,7 +386,7 @@ Annotation scale widget. If the scale is 1:100 the multiplier is 100.</string>
<item>
<widget class="QGroupBox" name="groupBox_5">
<property name="title">
<string>Lines and arrows</string>
<string>Lines and Arrows</string>
</property>
<layout class="QGridLayout" name="gridLayout_5" columnstretch="1,0" columnminimumwidth="0,100">
<item row="0" column="0">
@@ -483,7 +483,7 @@ Annotation scale widget. If the scale is 1:100 the multiplier is 100.</string>
<item row="0" column="1">
<widget class="QCheckBox" name="ShowUnit">
<property name="toolTip">
<string>If checked, a unit symbol is added to dimension texts</string>
<string>Adds a unit symbol to dimension texts</string>
</property>
<property name="text">
<string/>

View File

@@ -11,14 +11,13 @@
</rect>
</property>
<property name="windowTitle">
<string>Working plane setup</string>
<string>Working Plane Setup</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QLabel" name="label">
<property name="text">
<string>Select 3 vertices, one or more shapes or a WP Proxy. Then confirm by clicking in the 3D view.
Or choose one of the options below.</string>
<string>Choose an option below. Or define a working plane by selecting 3 vertices, 1 or more shapes, or a working plane proxy, and then confirm with a click in the 3D view.</string>
</property>
<property name="wordWrap">
<bool>true</bool>
@@ -61,7 +60,7 @@ Or choose one of the options below.</string>
<string>Sets the working plane facing the current view</string>
</property>
<property name="text">
<string>Align to view</string>
<string>Align to View</string>
</property>
</widget>
</item>
@@ -115,8 +114,7 @@ of the buttons above</string>
<item row="1" column="1">
<widget class="QCheckBox" name="checkCenter">
<property name="toolTip">
<string>If this is selected, the working plane will be
centered on the current view when pressing one
<string>Centers the working plane on the current view when pressing one
of the buttons above</string>
</property>
<property name="layoutDirection">
@@ -147,7 +145,7 @@ orientation. If no point is selected, the plane
will be moved to the center of the view.</string>
</property>
<property name="text">
<string>Move working plane</string>
<string>Move Working Plane</string>
</property>
</widget>
</item>
@@ -264,7 +262,7 @@ will be moved to the center of the view.</string>
<string>Centers the view on the current working plane</string>
</property>
<property name="text">
<string>Center view</string>
<string>Center View</string>
</property>
</widget>
</item>

View File

@@ -38,7 +38,7 @@
<item row="0" column="1">
<widget class="Gui::QuantitySpinBox" name="sbX">
<property name="toolTip">
<string>Enter coordinates or select point with mouse.</string>
<string>Enter coordinates or pick a point with the mouse</string>
</property>
<property name="unit" stdset="0">
<string notr="true">mm</string>
@@ -55,7 +55,7 @@
<item row="1" column="1">
<widget class="Gui::QuantitySpinBox" name="sbY">
<property name="toolTip">
<string>Enter coordinates or select point with mouse.</string>
<string>Enter coordinates or pick a point with the mouse</string>
</property>
<property name="unit" stdset="0">
<string notr="true">mm</string>
@@ -72,7 +72,7 @@
<item row="2" column="1">
<widget class="Gui::QuantitySpinBox" name="sbZ">
<property name="toolTip">
<string>Enter coordinates or select point with mouse.</string>
<string>Enter coordinates or pick a point with the mouse</string>
</property>
<property name="unit" stdset="0">
<string notr="true">mm</string>
@@ -93,13 +93,13 @@ Uncheck to use working plane coordinate system</string>
<item row="3" column="1">
<widget class="QPushButton" name="pbReset">
<property name="toolTip">
<string>Reset 3D point selection</string>
<string>Resets the picked point</string>
</property>
<property name="statusTip">
<string/>
</property>
<property name="text">
<string>Reset point</string>
<string>Reset Point</string>
</property>
</widget>
</item>

View File

@@ -17,7 +17,7 @@
<item row="0" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>PAT file:</string>
<string>PAT file</string>
</property>
</widget>
</item>
@@ -31,7 +31,7 @@
<item row="1" column="0">
<widget class="QLabel" name="label_2">
<property name="text">
<string>Pattern:</string>
<string>Pattern</string>
</property>
</widget>
</item>
@@ -41,7 +41,7 @@
<item row="2" column="0">
<widget class="QLabel" name="label_3">
<property name="text">
<string>Scale:</string>
<string>Scale</string>
</property>
</widget>
</item>
@@ -61,7 +61,7 @@
<item row="3" column="0">
<widget class="QLabel" name="label_4">
<property name="text">
<string>Rotation:</string>
<string>Rotation</string>
</property>
</widget>
</item>
@@ -78,15 +78,15 @@
<item row="4" column="0">
<widget class="QLabel" name="label_5">
<property name="text">
<string>Align to face:</string>
<string>Align to face</string>
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="QCheckBox" name="Translate">
<property name="toolTip">
<string>If checked, the pattern aligns with the base object.
If unchecked, the pattern aligns with the global coordinate system.
<string>Aligns the pattern with the base object.
Otherwise, the pattern aligns with the global coordinate system.
This setting modifies the Translate property.</string>
</property>
<property name="text">

View File

@@ -11,7 +11,7 @@
</rect>
</property>
<property name="windowTitle">
<string>Layers manager</string>
<string>Layers Manager</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
@@ -40,14 +40,14 @@
<item>
<widget class="QPushButton" name="buttonSelectAll">
<property name="text">
<string>Select all</string>
<string>Select All</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="buttonToggle">
<property name="text">
<string>Toggle on/off</string>
<string>Toggle Visibility</string>
</property>
</widget>
</item>

View File

@@ -17,7 +17,7 @@
<item>
<widget class="QGroupBox" name="groupBox_1">
<property name="title">
<string>Style name</string>
<string>Style Name</string>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_1">
<item>
@@ -35,7 +35,7 @@
</size>
</property>
<property name="toolTip">
<string>The name of your style. Existing style names can be edited.</string>
<string>The name of the style. Existing style names can be edited.</string>
</property>
<property name="editable">
<bool>false</bool>
@@ -47,7 +47,7 @@
</item>
<item>
<property name="text">
<string>Add new...</string>
<string>Add new</string>
</property>
</item>
</widget>
@@ -297,13 +297,13 @@
<item>
<widget class="QGroupBox" name="groupBox_4">
<property name="title">
<string>Lines and arrows</string>
<string>Lines and Arrows</string>
</property>
<layout class="QGridLayout" name="gridLayout_3">
<item row="0" column="0">
<widget class="QLabel" name="label_ShowLine">
<property name="toolTip">
<string>If it is checked it will display the dimension line</string>
<string>Displays the dimension line</string>
</property>
<property name="text">
<string>Show dimension line</string>
@@ -313,7 +313,7 @@
<item row="0" column="1">
<widget class="QCheckBox" name="ShowLine">
<property name="toolTip">
<string>If it is checked it will display the dimension line</string>
<string>Displays the dimension line</string>
</property>
<property name="layoutDirection">
<enum>Qt::LeftToRight</enum>
@@ -459,7 +459,7 @@
<item row="0" column="1">
<widget class="QCheckBox" name="ShowUnit">
<property name="toolTip">
<string>If it is checked it will show the unit next to the dimension value</string>
<string>Shows the unit next to the dimension value</string>
</property>
<property name="layoutDirection">
<enum>Qt::LeftToRight</enum>
@@ -509,7 +509,7 @@
<item>
<widget class="QGroupBox" name="groupBox_6">
<property name="title">
<string>Dimension details</string>
<string>Dimension Details</string>
</property>
<layout class="QGridLayout" name="gridLayout_5">
<item row="0" column="0">

View File

@@ -146,7 +146,7 @@ Objects can then automatically be added to groups as well.</string>
<item>
<widget class="QGroupBox" name="groupBox_2">
<property name="title">
<string>Command options</string>
<string>Command Options</string>
</property>
<layout class="QGridLayout" name="gridLayout_2">
<item row="0" column="0" colspan="3">
@@ -293,7 +293,7 @@ accidentally and modifying the entered value.</string>
<item row="7" column="0">
<widget class="QLabel" name="label_DraftEditMaxObjects">
<property name="text">
<string>Max. number of editable objects</string>
<string>Maximum number of editable objects</string>
</property>
</widget>
</item>

View File

@@ -17,7 +17,7 @@
<item>
<widget class="QGroupBox" name="groupBox_1">
<property name="title">
<string>In-command shortcuts</string>
<string>In-Command Shortcuts</string>
</property>
<layout class="QGridLayout" name="gridLayout_1">
<item row="0" column="0">
@@ -778,7 +778,7 @@
<item>
<widget class="QGroupBox" name="groupBox_2">
<property name="title">
<string>UI options</string>
<string>UI Options</string>
</property>
<layout class="QGridLayout" name="gridLayout_2">
<item row="0" column="0">
@@ -822,10 +822,10 @@
<item row="2" column="0">
<widget class="Gui::PrefCheckBox" name="checkBox_DisplayStatusbarScaleWidget">
<property name="toolTip">
<string>If checked, the Annotation scale widget is displayed in the Draft status bar</string>
<string>If checked, the annotation scale widget is displayed in the Draft status bar</string>
</property>
<property name="text">
<string>Show the Annotation scale widget in the Draft Workbench</string>
<string>Show the Annotation Scale Widget in the Draft Workbench</string>
</property>
<property name="checked">
<bool>true</bool>

View File

@@ -11,7 +11,7 @@
</rect>
</property>
<property name="windowTitle">
<string>Grid and snapping</string>
<string>Grid and Snapping</string>
</property>
<layout class="QVBoxLayout">
<item>
@@ -295,7 +295,7 @@ Major grid lines are thicker than minor grid lines.</string>
<item>
<widget class="QGroupBox" name="groupBox_2">
<property name="title">
<string>Snapping and modifier keys</string>
<string>Snapping and Modifier Keys</string>
</property>
<layout class="QGridLayout" name="gridLayout_2">
<item row="0" column="0">
@@ -447,7 +447,7 @@ Major grid lines are thicker than minor grid lines.</string>
<item row="4" column="1">
<widget class="Gui::PrefComboBox" name="comboBox_modconstrain">
<property name="toolTip">
<string>The Constrain modifier key</string>
<string>The constrain modifier key</string>
</property>
<property name="prefEntry" stdset="0">
<cstring>modconstrain</cstring>

View File

@@ -11,7 +11,7 @@
</rect>
</property>
<property name="windowTitle">
<string>Texts and dimensions</string>
<string>Texts and Dimensions</string>
</property>
<layout class="QVBoxLayout">
<item>
@@ -202,7 +202,7 @@ in the Annotation scale widget. If the scale is 1:100 the multiplier is 100.</st
<item>
<widget class="QGroupBox" name="groupBox_3">
<property name="title">
<string>Lines and arrows</string>
<string>Lines and Arrows</string>
</property>
<layout class="QGridLayout" name="gridLayout_3">
<item row="0" column="0" colspan="3">
@@ -493,7 +493,7 @@ or cm, leave blank to use the current unit defined in FreeCAD.</string>
<item>
<widget class="QGroupBox" name="groupBox_5">
<property name="title">
<string>Dimension details</string>
<string>Dimension Details</string>
</property>
<layout class="QGridLayout" name="gridLayout_5">
<item row="0" column="0">

View File

@@ -17,7 +17,7 @@
<item>
<widget class="QGroupBox" name="groupBox_1">
<property name="title">
<string>SVG patterns</string>
<string>SVG Patterns</string>
</property>
<layout class="QGridLayout" name="gridLayout_1">
<item row="0" column="0">
@@ -89,7 +89,7 @@ pattern definitions to be added to the standard patterns</string>
<item>
<widget class="QGroupBox" name="groupBox_2">
<property name="title">
<string>Drawing view line definitions</string>
<string>Drawing View Line Definitions</string>
</property>
<layout class="QGridLayout" name="gridLayout_2">
<item row="0" column="0">

View File

@@ -23,7 +23,7 @@
<item>
<widget class="QGroupBox" name="groupBox">
<property name="title">
<string>DWG conversion</string>
<string>DWG Conversion</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
@@ -31,7 +31,7 @@
<item>
<widget class="QLabel" name="label_2">
<property name="text">
<string>Conversion method:</string>
<string>Conversion method</string>
</property>
</widget>
</item>

View File

@@ -78,7 +78,7 @@ a DXF file.</string>
<item>
<widget class="QGroupBox" name="groupBox_AutoUpdate">
<property name="title">
<string>Automatic update (legacy importer/exporter only)</string>
<string>Automatic Update (Legacy Only)</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_AutoUpdate">
<item>
@@ -501,7 +501,7 @@ instead of Draft or Part objects. This overrides the 'Import As' setting</string
<item>
<widget class="QGroupBox" name="groupBox_ExportOptions">
<property name="title">
<string>Export options</string>
<string>Export Options</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_Export">
<item>
@@ -541,7 +541,7 @@ instead of Draft or Part objects. This overrides the 'Import As' setting</string
<item>
<widget class="QLabel" name="label_maxsegmentlength">
<property name="text">
<string>Max Spline Segment:</string>
<string>Maximum spline segment</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
@@ -551,8 +551,7 @@ instead of Draft or Part objects. This overrides the 'Import As' setting</string
<item>
<widget class="Gui::PrefDoubleSpinBox" name="spinBox_maxsegmentlength">
<property name="toolTip">
<string>Maximum length of each of the polyline segments.
If it is set to '0' the whole spline is treated as a straight segment.</string>
<string>Maximum length of each of the polyline segments. '0' treats the whole spline as a straight segment.</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>

View File

@@ -23,7 +23,7 @@
<item>
<widget class="QGroupBox" name="GroupBox12_3">
<property name="title">
<string>Import options</string>
<string>Import Options</string>
</property>
<layout class="QVBoxLayout" name="_6">
<property name="spacing">
@@ -43,7 +43,7 @@
<item>
<widget class="Gui::PrefCheckBox" name="gui::prefcheckbox_4">
<property name="toolTip">
<string>Check this if you want the areas (3D faces) to be imported too.</string>
<string>Imports the areas (3D faces) too</string>
</property>
<property name="text">
<string>Import OCA areas</string>

View File

@@ -23,7 +23,7 @@
<item>
<widget class="QGroupBox" name="groupBox">
<property name="title">
<string>Import options</string>
<string>Import Options</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
@@ -44,7 +44,7 @@
<item>
<widget class="Gui::PrefComboBox" name="gui::prefcombobox_3">
<property name="toolTip">
<string>Method for importing SVG object colors into FreeCAD</string>
<string>Method for importing SVG object colors</string>
</property>
<property name="currentIndex">
<number>0</number>
@@ -95,7 +95,7 @@ One unit in the SVG file will be interpreted as one millimeter.</string>
<widget class="Gui::PrefCheckBox" name="checkBox">
<property name="toolTip">
<string>If face generation results in a degenerated face,
a raw Wire from the original Shape is added.</string>
a raw wire from the original shape is added</string>
</property>
<property name="text">
<string>Add wires for invalid faces</string>
@@ -114,7 +114,7 @@ a raw Wire from the original Shape is added.</string>
<item>
<widget class="Gui::PrefCheckBox" name="checkBox">
<property name="toolTip">
<string>Check to cut shapes according to the even/odd SVG fill rule.</string>
<string>Check to cut shapes according to the even/odd SVG fill rule</string>
</property>
<property name="text">
<string>Apply Cuts</string>
@@ -188,7 +188,7 @@ a raw Wire from the original Shape is added.</string>
<item>
<widget class="QGroupBox" name="GroupBox12_2">
<property name="title">
<string>Export options</string>
<string>Export Options</string>
</property>
<layout class="QVBoxLayout" name="_3">
<property name="spacing">
@@ -262,7 +262,7 @@ a raw Wire from the original Shape is added.</string>
<item>
<widget class="QLabel" name="label">
<property name="text">
<string>Max segment length for discretized arcs</string>
<string>Maximum segment length for discretized arcs</string>
</property>
<property name="buddy">
<cstring/>

View File

@@ -870,7 +870,7 @@ class Plane(PlaneBase):
for n in range(len(shapes)):
if not DraftGeomUtils.are_coplanar(shapes[shape_ref], shapes[n]):
_wrn(translate(
"draft", "{} and {} aren't coplanar".format(
"draft", "{} and {} are not coplanar".format(
names[shape_ref],names[n])) + "\n")
return False
else:
@@ -880,7 +880,7 @@ class Plane(PlaneBase):
poly = Part.makePolygon(points)
if not DraftGeomUtils.is_planar(poly):
_wrn(translate(
"draft", "All Shapes must be coplanar") + "\n")
"draft", "All shapes must be coplanar") + "\n")
return False
normal = DraftGeomUtils.get_normal(poly)
else:
@@ -888,7 +888,7 @@ class Plane(PlaneBase):
if not normal:
_wrn(translate(
"draft", "Selected Shapes must define a plane") + "\n")
"draft", "Selected shapes must define a plane") + "\n")
return False
# set center of mass

View File

@@ -56,10 +56,10 @@ def heal(objlist=None, delete=True, reparent=True):
if not objlist:
objlist = App.ActiveDocument.Objects
print("Automatic mode: Healing whole document...")
print("Automatic mode: Healing whole document")
auto = True
else:
print("Manual mode: Force-healing selected objects...")
print("Manual mode: Force-healing selected objects")
if not isinstance(objlist,list):
objlist = [objlist]

View File

@@ -64,7 +64,7 @@ class AnnotationStyleEditor(gui_base.GuiCommandSimplest):
"""
def __init__(self):
super(AnnotationStyleEditor, self).__init__(name=translate("draft","Annotation style editor"))
super(AnnotationStyleEditor, self).__init__(name=translate("draft","Annotation Style Editor"))
self.doc = None
self.styles = {}
self.renamed = {}
@@ -75,9 +75,9 @@ class AnnotationStyleEditor(gui_base.GuiCommandSimplest):
"""Set icon, menu and tooltip."""
return {'Pixmap': ":icons/Draft_Annotation_Style.svg",
'MenuText': QT_TRANSLATE_NOOP("Draft_AnnotationStyleEditor",
"Annotation styles..."),
"Annotation Styles"),
'ToolTip': QT_TRANSLATE_NOOP("Draft_AnnotationStyleEditor",
"Manage or create annotation styles")}
"Opens an editor to manage or create annotation styles")}
def Activated(self):
"""Execute when the command is called.
@@ -212,8 +212,8 @@ class AnnotationStyleEditor(gui_base.GuiCommandSimplest):
elif index == 1:
# Add new... entry
reply = QtWidgets.QInputDialog.getText(None,
translate("draft", "Create new style"),
translate("draft", "Style name:"))
translate("draft", "New Style"),
translate("draft", "Style name"))
if reply[1]:
# OK or Enter pressed
name = reply[0].strip()
@@ -254,7 +254,7 @@ class AnnotationStyleEditor(gui_base.GuiCommandSimplest):
if self.get_style_users(style):
reply = QtWidgets.QMessageBox.question(None,
translate("draft", "Style in use"),
translate("draft", "This style is used by some objects in this document. Are you sure?"),
translate("draft", "This style is used by some objects in this document. Proceed?"),
QtWidgets.QMessageBox.Yes | QtWidgets.QMessageBox.No,
QtWidgets.QMessageBox.No)
if reply == QtWidgets.QMessageBox.No:
@@ -279,8 +279,8 @@ class AnnotationStyleEditor(gui_base.GuiCommandSimplest):
style = self.form.comboBoxStyles.itemText(index)
reply = QtWidgets.QInputDialog.getText(None,
translate("draft", "Rename style"),
translate("draft", "New name:"),
translate("draft", "Rename Style"),
translate("draft", "New name"),
QtWidgets.QLineEdit.Normal,
style)
if reply[1]:
@@ -302,7 +302,7 @@ class AnnotationStyleEditor(gui_base.GuiCommandSimplest):
"""Import styles from a json file."""
filename = QtWidgets.QFileDialog.getOpenFileName(
QtWidgets.QApplication.activeWindow(),
translate("draft","Open styles file"),
translate("draft","Open Styles File"),
None,
translate("draft","JSON files (*.json *.JSON)"))
if filename and filename[0]:
@@ -322,7 +322,7 @@ class AnnotationStyleEditor(gui_base.GuiCommandSimplest):
"""Export styles to a json file."""
filename = QtWidgets.QFileDialog.getSaveFileName(
QtWidgets.QApplication.activeWindow(),
translate("draft","Save styles file"),
translate("draft","Save Styles File"),
None,
translate("draft","JSON file (*.json)"))
if filename and filename[0]:

View File

@@ -61,7 +61,7 @@ class Arc(gui_base_original.Creator):
return {"Pixmap": "Draft_Arc",
"Accel": "A, R",
"MenuText": QT_TRANSLATE_NOOP("Draft_Arc", "Arc"),
"ToolTip": QT_TRANSLATE_NOOP("Draft_Arc", "Creates a circular arc by a center point and a radius.\nSHIFT to constrain.")}
"ToolTip": QT_TRANSLATE_NOOP("Draft_Arc", "Creates a circular arc from a center point and a radius")}
def Activated(self):
"""Execute when the command is called."""
@@ -509,8 +509,8 @@ class Arc_3Points(gui_base.GuiCommandBase):
"""Set icon, menu and tooltip."""
return {"Pixmap": "Draft_Arc_3Points",
"Accel": "A, T",
"MenuText": QT_TRANSLATE_NOOP("Draft_Arc_3Points", "Arc by 3 points"),
"ToolTip": QT_TRANSLATE_NOOP("Draft_Arc_3Points", "Creates a circular arc by 3 points.\nSHIFT to constrain.")}
"MenuText": QT_TRANSLATE_NOOP("Draft_Arc_3Points", "Arc From 3 Points"),
"ToolTip": QT_TRANSLATE_NOOP("Draft_Arc_3Points", "Creates a circular arc from 3 points")}
def Activated(self):
"""Execute when the command is called."""
@@ -531,7 +531,7 @@ class Arc_3Points(gui_base.GuiCommandBase):
Gui.Snapper.getPoint(callback=self.getPoint,
movecallback=self.drawArc)
Gui.Snapper.ui.sourceCmd = self
Gui.Snapper.ui.setTitle(title=translate("draft", "Arc by 3 points"),
Gui.Snapper.ui.setTitle(title=translate("draft", "Arc From 3 Points"),
icon="Draft_Arc_3Points")
Gui.Snapper.ui.continueCmd.show()
@@ -575,7 +575,7 @@ class Arc_3Points(gui_base.GuiCommandBase):
callback=self.getPoint,
movecallback=self.drawArc)
Gui.Snapper.ui.sourceCmd = self
Gui.Snapper.ui.setTitle(title=translate("draft", "Arc by 3 points"),
Gui.Snapper.ui.setTitle(title=translate("draft", "Arc From 3 Points"),
icon="Draft_Arc_3Points")
Gui.Snapper.ui.continueCmd.show()
@@ -594,7 +594,7 @@ class Arc_3Points(gui_base.GuiCommandBase):
if params.get_param("UsePartPrimitives"):
_cmd_list.append("Draft.select(circle)")
_cmd_list.append("FreeCAD.ActiveDocument.recompute()")
self.commit(translate("draft", "Create Arc by 3 points"), _cmd_list)
self.commit(translate("draft", "Create Arc From 3 Points"), _cmd_list)
self.finish(cont=None)
def drawArc(self, point, info):
@@ -641,8 +641,8 @@ class ArcGroup:
def GetResources(self):
"""Set icon, menu and tooltip."""
return {"MenuText": QT_TRANSLATE_NOOP("Draft_ArcTools", "Arc tools"),
"ToolTip": QT_TRANSLATE_NOOP("Draft_ArcTools", "Create various types of circular arcs.")}
return {"MenuText": QT_TRANSLATE_NOOP("Draft_ArcTools", "Arc Tools"),
"ToolTip": QT_TRANSLATE_NOOP("Draft_ArcTools", "Tools to create various types of circular arcs")}
def GetCommands(self):
"""Return a tuple of commands in the group."""

View File

@@ -63,8 +63,8 @@ class ArrayGroup:
"""Set icon, menu and tooltip."""
return {"Pixmap": "Draft_Array",
"MenuText": QT_TRANSLATE_NOOP("Draft_ArrayTools", "Array tools"),
"ToolTip": QT_TRANSLATE_NOOP("Draft_ArrayTools", "Create various types of arrays, including rectangular, polar, circular, path, and point")}
"MenuText": QT_TRANSLATE_NOOP("Draft_ArrayTools", "Array Tools"),
"ToolTip": QT_TRANSLATE_NOOP("Draft_ArrayTools", "Tools to create various types of arrays, including rectangular, polar, circular, path, and point arrays")}
def IsActive(self):
"""Return True when this command should be available."""

View File

@@ -63,8 +63,8 @@ class BezCurve(gui_lines.Line):
return {"Pixmap": "Draft_BezCurve",
"Accel": "B, Z",
"MenuText": QT_TRANSLATE_NOOP("Draft_BezCurve", "Bézier curve"),
"ToolTip": QT_TRANSLATE_NOOP("Draft_BezCurve", "Creates an N-degree Bézier curve. The more points you pick, the higher the degree.\nSHIFT to constrain.")}
"MenuText": QT_TRANSLATE_NOOP("Draft_BezCurve", "Bézier Curve"),
"ToolTip": QT_TRANSLATE_NOOP("Draft_BezCurve", "Creates an n-degree Bézier curve. The more points, the higher the degree.")}
def Activated(self):
"""Execute when the command is called.
@@ -73,7 +73,7 @@ class BezCurve(gui_lines.Line):
"""
super().Activated(name="BezCurve",
icon="Draft_BezCurve",
task_title=translate("draft", "Bézier curve"))
task_title=translate("draft", "Bézier Curve"))
if self.doc:
self.bezcurvetrack = trackers.bezcurveTracker()
@@ -213,7 +213,7 @@ class BezCurve(gui_lines.Line):
'bez = ' + _cmd,
'Draft.autogroup(bez)',
'FreeCAD.ActiveDocument.recompute()']
self.commit(translate("draft", "Create BezCurve"),
self.commit(translate("draft", "Create Bézier Curve"),
_cmd_list)
except Exception:
_err("Draft: error delaying commit")
@@ -252,8 +252,8 @@ class CubicBezCurve(gui_lines.Line):
return {"Pixmap": "Draft_CubicBezCurve",
# "Accel": "B, Z",
"MenuText": QT_TRANSLATE_NOOP("Draft_CubicBezCurve", "Cubic Bézier curve"),
"ToolTip": QT_TRANSLATE_NOOP("Draft_CubicBezCurve", "Creates a Bézier curve made of 2nd degree (quadratic) and 3rd degree (cubic) segments. Click and drag to define each segment.\nAfter the curve is created you can go back to edit each control point and set the properties of each knot.\nSHIFT to constrain.")}
"MenuText": QT_TRANSLATE_NOOP("Draft_CubicBezCurve", "Cubic Bézier Curve"),
"ToolTip": QT_TRANSLATE_NOOP("Draft_CubicBezCurve", "Creates a Bézier curve made of 2nd degree (quadratic) and 3rd degree (cubic) segments. Clicking and dragging allows to define segments.\nControl points and properties of each knot can be edited after creation.")}
def Activated(self):
"""Execute when the command is called.
@@ -462,7 +462,7 @@ class CubicBezCurve(gui_lines.Line):
'bez = ' + _cmd,
'Draft.autogroup(bez)',
'FreeCAD.ActiveDocument.recompute()']
self.commit(translate("draft", "Create BezCurve"),
self.commit(translate("draft", "Create Bézier Curve"),
_cmd_list)
except Exception:
_err("Draft: error delaying commit")
@@ -486,8 +486,8 @@ class BezierGroup:
def GetResources(self):
"""Set icon, menu and tooltip."""
return {"MenuText": QT_TRANSLATE_NOOP("Draft_BezierTools", "Bézier tools"),
"ToolTip": QT_TRANSLATE_NOOP("Draft_BezierTools", "Create various types of Bézier curves.")}
return {"MenuText": QT_TRANSLATE_NOOP("Draft_BezierTools", "Bézier Tools"),
"ToolTip": QT_TRANSLATE_NOOP("Draft_BezierTools", "Tools to create various types of Bézier curves")}
def GetCommands(self):
"""Return a tuple of commands in the group."""

View File

@@ -78,7 +78,7 @@ class Circle(gui_arcs.Arc):
return {'Pixmap': 'Draft_Circle',
'Accel': "C, I",
'MenuText': QT_TRANSLATE_NOOP("Draft_Circle", "Circle"),
'ToolTip': QT_TRANSLATE_NOOP("Draft_Circle", "Creates a circle (full circular arc).")}
'ToolTip': QT_TRANSLATE_NOOP("Draft_Circle", "Creates a circle (full circular arc)")}
Gui.addCommand('Draft_Circle', Circle())

View File

@@ -52,8 +52,8 @@ class CircularArray(gui_base.GuiCommandBase):
def GetResources(self):
"""Set icon, menu and tooltip."""
return {"Pixmap": "Draft_CircularArray",
"MenuText": QT_TRANSLATE_NOOP("Draft_CircularArray", "Circular array"),
"ToolTip": QT_TRANSLATE_NOOP("Draft_CircularArray", "Creates copies of the selected object, and places the copies in a radial pattern\ncreating various circular layers.\n\nThe array can be turned into an orthogonal or a polar array by changing its type.")}
"MenuText": QT_TRANSLATE_NOOP("Draft_CircularArray", "Circular Array"),
"ToolTip": QT_TRANSLATE_NOOP("Draft_CircularArray", "Creates copies of the selected object in a radial pattern with 1 or more circular layers")}
def Activated(self):
"""Execute when the command is called.

View File

@@ -69,7 +69,7 @@ class Clone(gui_base_original.Modifier):
return {"Pixmap": "Draft_Clone",
"Accel": "C, L",
"MenuText": QT_TRANSLATE_NOOP("Draft_Clone", "Clone"),
"ToolTip": QT_TRANSLATE_NOOP("Draft_Clone", "Creates a clone of the selected objects.\nThe resulting clone can be scaled in each of its three directions.")}
"ToolTip": QT_TRANSLATE_NOOP("Draft_Clone", "Creates a clone of the selected objects")}
def Activated(self):
"""Execute when the command is called."""
@@ -91,14 +91,14 @@ class Clone(gui_base_original.Modifier):
return
objs_shape = [obj for obj in objs if hasattr(obj, "Shape")]
if not objs_shape:
_wrn(translate("draft", "Cannot clone object(s) without a Shape, aborting"))
_wrn(translate("draft", "Cannot clone objects without a shape, aborting"))
self.finish()
return
elif len(objs_shape) < len(objs):
_wrn(translate("draft", "Cannot clone object(s) without a Shape, skipping them"))
_wrn(translate("draft", "Cannot clone objects without a shape, skipping them"))
Gui.addModule("Draft")
App.ActiveDocument.openTransaction(translate("Draft", "Clone"))
App.ActiveDocument.openTransaction(translate("Draft", "Create Clone"))
for idx, obj in enumerate(objs_shape):
cmd = "Draft.make_clone(FreeCAD.ActiveDocument." + obj.Name + ")"
Gui.doCommand("clone" + str(idx) + " = " + cmd)

View File

@@ -52,16 +52,16 @@ class FlipDimension(gui_base.GuiCommandNeedsSelection):
"""
def __init__(self):
super(Draft_FlipDimension, self).__init__(name=translate("draft","Flip dimension"))
super(Draft_FlipDimension, self).__init__(name=translate("draft","Flip Dimension"))
def GetResources(self):
"""Set icon, menu and tooltip."""
return {'Pixmap': 'Draft_FlipDimension',
'MenuText': QT_TRANSLATE_NOOP("Draft_FlipDimension",
"Flip dimension"),
"Flip Dimension"),
'ToolTip': QT_TRANSLATE_NOOP("Draft_FlipDimension",
"Flip the normal direction of the selected dimensions (linear, radial, angular).\nIf other objects are selected they are ignored.")}
"Flips the normal direction of the selected dimensions (linear, radial, angular).\nIf other objects are selected they are ignored.")}
def Activated(self):
"""Execute when the command is called."""

File diff suppressed because one or more lines are too long

View File

@@ -54,8 +54,8 @@ class Draft2Sketch(gui_base_original.Modifier):
"""Set icon, menu and tooltip."""
return {'Pixmap': 'Draft_Draft2Sketch',
'MenuText': QT_TRANSLATE_NOOP("Draft_Draft2Sketch", "Draft to sketch"),
'ToolTip': QT_TRANSLATE_NOOP("Draft_Draft2Sketch", "Convert bidirectionally between Draft objects and Sketches.\nMany Draft objects will be converted into a single non-constrained Sketch.\nHowever, a single sketch with disconnected traces will be converted into several individual Draft objects.")}
'MenuText': QT_TRANSLATE_NOOP("Draft_Draft2Sketch", "Draft to Sketch"),
'ToolTip': QT_TRANSLATE_NOOP("Draft_Draft2Sketch", "Converts bidirectionally between Draft objects and sketches.\nMultiple selected Draft objects are converted into a single sketch.\nHowever, a single sketch with disconnected traces is converted into several individual Draft objects.")}
def Activated(self):
"""Execute when the command is called."""
@@ -64,7 +64,7 @@ class Draft2Sketch(gui_base_original.Modifier):
return
if not Gui.Selection.getSelection():
self.ui.selectUi(on_close_call=self.finish)
_msg(translate("draft", "Select an object to convert."))
_msg(translate("draft", "Select an object to convert"))
self.call = self.view.addEventCallback("SoEvent", gui_tool_utils.selectObject)
else:
self.proceed()

View File

@@ -257,7 +257,7 @@ class Edit(gui_base_original.Modifier):
return {'Pixmap': 'Draft_Edit',
'Accel': "D, E",
'MenuText': QtCore.QT_TRANSLATE_NOOP("Draft_Edit", "Edit"),
'ToolTip': QtCore.QT_TRANSLATE_NOOP("Draft_Edit", "Edits the active object.\nPress E or ALT + Left Click to display context menu\non supported nodes and on supported objects.")
'ToolTip': QtCore.QT_TRANSLATE_NOOP("Draft_Edit", "Edits the active object")
}
@@ -482,7 +482,7 @@ class Edit(gui_base_original.Modifier):
+ ": editing node number "
+ str(node_idx) + "\n")
self.ui.lineUi(title=translate("draft", "Edit node"), icon="Draft_Edit")
self.ui.lineUi(title=translate("draft", "Edit Node"), icon="Draft_Edit")
self.ui.continueCmd.hide()
self.editing = node_idx
self.trackers[obj.Name][node_idx].off()
@@ -799,7 +799,7 @@ class Edit(gui_base_original.Modifier):
selection = Gui.Selection.getSelection()
self.edited_objects = []
if len(selection) > self.max_objects:
_err = translate("draft", "Too many objects selected, max number set to:")
_err = translate("draft", "Too many objects selected, maximum number set to:")
App.Console.PrintMessage(_err + " " + str(self.max_objects) + "\n")
return None

View File

@@ -89,7 +89,7 @@ class DraftWireGuiTools(GuiTools):
elif v in pts:
# DNC: checks if point enter is equal to other, this could cause a OCC problem
_err = translate("draft", "This object does not support possible "
"coincident points, please try again.")
"coincident points")
App.Console.PrintMessage(_err + "\n")
return
@@ -107,12 +107,12 @@ class DraftWireGuiTools(GuiTools):
def get_edit_point_context_menu(self, edit_command, obj, node_idx):
return [
(translate("draft", "Delete point"), lambda: self.delete_point(obj, node_idx)),
(translate("draft", "Delete Point"), lambda: self.delete_point(obj, node_idx)),
]
def get_edit_obj_context_menu(self, edit_command, obj, position):
return [
(translate("draft", "Add point"), lambda: self.add_point(edit_command, obj, position)),
(translate("draft", "Add Point"), lambda: self.add_point(edit_command, obj, position)),
(self.get_open_close_menu_text(obj), lambda: self.open_close_wire(obj)),
(self.get_reverse_menu_text(obj), lambda: self.reverse_wire(obj)),
]
@@ -121,14 +121,14 @@ class DraftWireGuiTools(GuiTools):
"""This function is overridden in the DraftBSplineGuiTools class.
"""
if obj.Closed:
return translate("draft", "Open wire")
return translate("draft", "Open Wire")
else:
return translate("draft", "Close wire")
return translate("draft", "Close Wire")
def get_reverse_menu_text(self, obj):
"""This function is overridden in the DraftBSplineGuiTools class.
"""
return translate("draft", "Reverse wire")
return translate("draft", "Reverse Wire")
def init_preview_object(self, obj):
return trackers.wireTracker(obj.Shape)
@@ -174,7 +174,7 @@ class DraftWireGuiTools(GuiTools):
def delete_point(self, obj, node_idx):
if len(obj.Points) <= 2:
_err(translate("draft", "Active object must have more than two points/nodes"))
_err(translate("draft", "Active object must have more than 2 points or nodes"))
return
pts = obj.Points
@@ -196,12 +196,12 @@ class DraftBSplineGuiTools(DraftWireGuiTools):
def get_open_close_menu_text(self, obj):
if obj.Closed:
return translate("draft", "Open spline")
return translate("draft", "Open Spline")
else:
return translate("draft", "Close spline")
return translate("draft", "Close Spline")
def get_reverse_menu_text(self, obj):
return translate("draft", "Reverse spline")
return translate("draft", "Reverse Spline")
def init_preview_object(self, obj):
return trackers.bsplineTracker()
@@ -368,19 +368,19 @@ class DraftCircleGuiTools(GuiTools):
if obj.FirstAngle != obj.LastAngle:
if node_idx == 0: # user is over arc start point
return [
(translate("draft", "Move arc"), lambda: self.handle_move_arc(edit_command, obj, node_idx)),
(translate("draft", "Move Arc"), lambda: self.handle_move_arc(edit_command, obj, node_idx)),
]
elif node_idx == 1: # user is over arc start point
return [
(translate("draft", "Set first angle"), lambda: self.handle_set_first_angle(edit_command, obj, node_idx)),
(translate("draft", "Set First Angle"), lambda: self.handle_set_first_angle(edit_command, obj, node_idx)),
]
elif node_idx == 2: # user is over arc end point
return [
(translate("draft", "Set last angle"), lambda: self.handle_set_last_angle(edit_command, obj, node_idx)),
(translate("draft", "Set Last Angle"), lambda: self.handle_set_last_angle(edit_command, obj, node_idx)),
]
elif node_idx == 3: # user is over arc mid point
return [
(translate("draft", "Set radius"), lambda: self.handle_set_radius(edit_command, obj, node_idx)),
(translate("draft", "Set Radius"), lambda: self.handle_set_radius(edit_command, obj, node_idx)),
]
def handle_move_arc(self, edit_command, obj, node_idx):
@@ -405,7 +405,7 @@ class DraftCircleGuiTools(GuiTools):
return
return [
(translate("draft", "Invert arc"), lambda: self.arcInvert(obj)),
(translate("draft", "Invert Arc"), lambda: self.arcInvert(obj)),
]
def init_preview_object(self, obj):
@@ -644,7 +644,7 @@ class DraftBezCurveGuiTools(GuiTools):
# DNC: checks if point enter is equal to other, this could cause a OCC problem
if v in pts:
_err = translate("draft", "This object does not support possible "
"coincident points, please try again.")
"coincident points")
App.Console.PrintMessage(_err + "\n")
return
@@ -662,24 +662,24 @@ class DraftBezCurveGuiTools(GuiTools):
def get_edit_point_context_menu(self, edit_command, obj, node_idx):
return [
(translate("draft", "Delete point"), lambda: self.delete_point(obj, node_idx)),
(translate("draft", "Make sharp"), lambda: self.smoothBezPoint(obj, node_idx, "Sharp")),
(translate("draft", "Make tangent"), lambda: self.smoothBezPoint(obj, node_idx, "Tangent")),
(translate("draft", "Make symmetric"), lambda: self.smoothBezPoint(obj, node_idx, "Symmetric")),
(translate("draft", "Delete Point"), lambda: self.delete_point(obj, node_idx)),
(translate("draft", "Make Sharp"), lambda: self.smoothBezPoint(obj, node_idx, "Sharp")),
(translate("draft", "Make Tangent"), lambda: self.smoothBezPoint(obj, node_idx, "Tangent")),
(translate("draft", "Make Symmetric"), lambda: self.smoothBezPoint(obj, node_idx, "Symmetric")),
]
def get_edit_obj_context_menu(self, edit_command, obj, position):
return [
(translate("draft", "Add point"), lambda: self.add_point(edit_command, obj, position)),
(translate("draft", "Add Point"), lambda: self.add_point(edit_command, obj, position)),
(self.get_open_close_menu_text(obj), lambda: self.open_close_wire(obj)),
(translate("draft", "Reverse curve"), lambda: self.reverse_wire(obj)),
(translate("draft", "Reverse Curve"), lambda: self.reverse_wire(obj)),
]
def get_open_close_menu_text(self, obj):
if obj.Closed:
return translate("draft", "Open curve")
return translate("draft", "Open Curve")
else:
return translate("draft", "Close curve")
return translate("draft", "Close Curve")
def init_preview_object(self, obj):
return trackers.bezcurveTracker()
@@ -780,7 +780,7 @@ class DraftBezCurveGuiTools(GuiTools):
changep = 1
else:
App.Console.PrintWarning(translate("draft",
"Can't change Knot belonging to pole %d"%point)
"Cannot change knot belonging to pole %d"%point)
+ "\n")
return
if knot:
@@ -794,7 +794,7 @@ class DraftBezCurveGuiTools(GuiTools):
pass #
else:
App.Console.PrintWarning(translate("draft",
"Selection is not a Knot")
"Selection is not a knot")
+ "\n")
return
else: #point is a knot
@@ -821,7 +821,7 @@ class DraftBezCurveGuiTools(GuiTools):
knot = 0
else:
App.Console.PrintWarning(translate("draft",
"Endpoint of Bézier curve can't be smoothed")
"Endpoint of Bézier curve cannot be smoothed")
+ "\n")
return
segment = knot // deg # segment index

View File

@@ -57,7 +57,7 @@ class Ellipse(gui_base_original.Creator):
return {'Pixmap': 'Draft_Ellipse',
'Accel': "E, L",
'MenuText': QT_TRANSLATE_NOOP("Draft_Ellipse", "Ellipse"),
'ToolTip': QT_TRANSLATE_NOOP("Draft_Ellipse", "Creates an ellipse.")}
'ToolTip': QT_TRANSLATE_NOOP("Draft_Ellipse", "Creates an ellipse")}
def Activated(self):
"""Execute when the command is called."""

View File

@@ -58,7 +58,7 @@ class Facebinder(gui_base_original.Creator):
return {"Pixmap": "Draft_Facebinder",
"Accel": "F,F",
"MenuText": QT_TRANSLATE_NOOP("Draft_Facebinder", "Facebinder"),
"ToolTip": QT_TRANSLATE_NOOP("Draft_Facebinder", "Creates a facebinder object from selected faces.")}
"ToolTip": QT_TRANSLATE_NOOP("Draft_Facebinder", "Creates a facebinder from the selected faces")}
def Activated(self):
"""Execute when the command is called."""

View File

@@ -67,7 +67,7 @@ class Fillet(gui_base_original.Creator):
return {"Pixmap": "Draft_Fillet",
"Accel": "F,I",
"MenuText": QT_TRANSLATE_NOOP("Draft_Fillet", "Fillet"),
"ToolTip": QT_TRANSLATE_NOOP("Draft_Fillet", "Creates a fillet between two selected wires or edges.")}
"ToolTip": QT_TRANSLATE_NOOP("Draft_Fillet", "Creates a fillet between 2 selected edges")}
def Activated(self, name="Fillet"):
"""Execute when the command is called."""
@@ -77,7 +77,7 @@ class Fillet(gui_base_original.Creator):
self.chamfer = params.get_param("FilletChamferMode")
self.delete = params.get_param("FilletDeleteMode")
label = translate("draft", "Fillet radius")
tooltip = translate("draft", "Radius of fillet")
tooltip = translate("draft", "Radius of the fillet")
# Call the task panel defined in DraftGui to enter a radius.
self.ui.taskUi(title=translate("Draft", "Fillet"), icon="Draft_Fillet")
@@ -113,7 +113,7 @@ class Fillet(gui_base_original.Creator):
# self.linetrack = trackers.lineTracker(dotted=True)
# self.arctrack = trackers.arcTracker()
# self.call = self.view.addEventCallback("SoEvent", self.action)
_toolmsg(translate("draft", "Enter radius."))
_toolmsg(translate("draft", "Enter radius"))
def action(self, arg):
"""Scene event handler. CURRENTLY NOT USED.
@@ -168,7 +168,7 @@ class Fillet(gui_base_original.Creator):
"Draft.autogroup(fillet)",
"FreeCAD.ActiveDocument.recompute()"]
self.commit(translate("draft", "Create fillet"), cmd_list)
self.commit(translate("draft", "Create Fillet"), cmd_list)
self.finish()

View File

@@ -51,15 +51,15 @@ class ToggleGrid(gui_base.GuiCommandSimplest):
"""
def __init__(self):
super().__init__(name=translate("draft", "Toggle grid"))
super().__init__(name=translate("draft", "Toggle Grid"))
def GetResources(self):
"""Set icon, menu and tooltip."""
return {"Pixmap": "Draft_Grid",
"Accel": "G, R",
"MenuText": QT_TRANSLATE_NOOP("Draft_ToggleGrid", "Toggle grid"),
"MenuText": QT_TRANSLATE_NOOP("Draft_ToggleGrid", "Toggle Grid"),
"ToolTip": QT_TRANSLATE_NOOP("Draft_ToggleGrid",
"Toggles the Draft grid on and off."),
"Toggles the visibility of the Draft grid"),
"CmdType": "ForEdit"}
def IsActive(self):

View File

@@ -70,8 +70,8 @@ class AddToGroup(gui_base.GuiCommandNeedsSelection):
def GetResources(self):
"""Set icon, menu and tooltip."""
return {"Pixmap": "Draft_AddToGroup",
"MenuText": QT_TRANSLATE_NOOP("Draft_AddToGroup", "Add to group..."),
"ToolTip": QT_TRANSLATE_NOOP("Draft_AddToGroup", "Adds the selected objects to a group, or removes them from any group.")}
"MenuText": QT_TRANSLATE_NOOP("Draft_AddToGroup", "Add to Group"),
"ToolTip": QT_TRANSLATE_NOOP("Draft_AddToGroup", "Adds selected objects to a group, or removes them from any group")}
def Activated(self):
"""Execute when the command is called."""
@@ -90,7 +90,7 @@ class AddToGroup(gui_base.GuiCommandNeedsSelection):
+ ["---"] \
+ [obj.Label for obj in objs] \
+ ["---"] \
+ [translate("draft", "Add to new group...")]
+ [translate("draft", "Add to New Group")]
self.icons = [self.ui.getIcon(":/icons/list-remove.svg")] \
+ [None] \
+ [obj.ViewObject.Icon for obj in objs] \
@@ -131,7 +131,7 @@ class AddToGroup(gui_base.GuiCommandNeedsSelection):
return
# Group has been selected
self.doc.openTransaction(translate("draft", "Add to group"))
self.doc.openTransaction(translate("draft", "Add to Group"))
i = self.labels.index(option)
grp = self.objects[i]
moveToGroup(grp)
@@ -166,8 +166,8 @@ class SelectGroup(gui_base.GuiCommandNeedsSelection):
def GetResources(self):
"""Set icon, menu and tooltip."""
return {"Pixmap": "Draft_SelectGroup",
"MenuText": QT_TRANSLATE_NOOP("Draft_SelectGroup", "Select group"),
"ToolTip": QT_TRANSLATE_NOOP("Draft_SelectGroup", "Selects the contents of selected groups. For selected non-group objects, the contents of the group they are in is selected.")}
"MenuText": QT_TRANSLATE_NOOP("Draft_SelectGroup", "Select Group"),
"ToolTip": QT_TRANSLATE_NOOP("Draft_SelectGroup", "Selects the contents of selected groups. For selected non-group objects, the contents of the goup they are in are selected.")}
def Activated(self):
"""Execute when the command is called."""
@@ -194,7 +194,7 @@ class SelectGroup(gui_base.GuiCommandNeedsSelection):
# Inform the user if there is no new selection:
if not Gui.Selection.hasSelection():
msg = translate("draft", "No new selection. You must select non-empty groups or objects inside groups.")
msg = translate("draft", "No new selection. Select non-empty groups or objects inside groups.")
App.Console.PrintMessage(msg + "\n")
@@ -210,8 +210,8 @@ class SetAutoGroup(gui_base.GuiCommandSimplest):
def GetResources(self):
"""Set icon, menu and tooltip."""
return {"Pixmap": "Draft_AutoGroup",
"MenuText": QT_TRANSLATE_NOOP("Draft_AutoGroup", "Autogroup"),
"ToolTip": QT_TRANSLATE_NOOP("Draft_AutoGroup", "Select a layer or group to add new Draft and BIM objects to.")}
"MenuText": QT_TRANSLATE_NOOP("Draft_AutoGroup", "Auto-Group"),
"ToolTip": QT_TRANSLATE_NOOP("Draft_AutoGroup", "Adds new Draft and BIM objects to the selected layer or group")}
def Activated(self):
"""Execute when the command is called.
@@ -256,7 +256,7 @@ class SetAutoGroup(gui_base.GuiCommandSimplest):
+ ["---"] \
+ [obj.Label for obj in lyrs] \
+ ["---"] \
+ [translate("draft", "New layer...")]
+ [translate("draft", "New Layer")]
self.icons = [self.ui.getIcon(":/icons/button_invalid.svg")] \
+ [None] \
+ [obj.ViewObject.Icon for obj in grps] \
@@ -290,8 +290,8 @@ class SetAutoGroup(gui_base.GuiCommandSimplest):
# "New layer..."
txt, ok = QtWidgets.QInputDialog.getText(
None,
translate("draft", "Create new layer"),
translate("draft", "Layer name:"),
translate("draft", "New Layer"),
translate("draft", "Layer name"),
text=translate("draft", "Layer", "Object label")
)
if not ok:
@@ -334,8 +334,8 @@ class AddToConstruction(gui_base.GuiCommandNeedsSelection):
def GetResources(self):
"""Set icon, menu and tooltip."""
return {"Pixmap": "Draft_AddConstruction",
"MenuText": QT_TRANSLATE_NOOP("Draft_AddConstruction", "Add to construction group"),
"ToolTip": QT_TRANSLATE_NOOP("Draft_AddConstruction", "Adds the selected objects to the construction group,\nand changes their appearance to the construction style.\nThe construction group is created if it doesn't exist.")}
"MenuText": QT_TRANSLATE_NOOP("Draft_AddConstruction", "Add to Construction Group"),
"ToolTip": QT_TRANSLATE_NOOP("Draft_AddConstruction", "Adds the selected objects to the construction group,\nand changes their appearance to the construction style.\nThe construction group is created if it does not exist.")}
def Activated(self):
"""Execute when the command is called."""
@@ -344,7 +344,7 @@ class AddToConstruction(gui_base.GuiCommandNeedsSelection):
if not hasattr(Gui, "draftToolBar"):
return
self.doc.openTransaction(translate("draft", "Add to construction group"))
self.doc.openTransaction(translate("draft", "Add to Construction Group"))
col = params.get_param("constructioncolor") | 0x000000FF
# Get the construction group or create it if it doesn't exist
@@ -388,16 +388,16 @@ class AddNamedGroup(gui_base.GuiCommandSimplest):
def GetResources(self):
"""Set icon, menu and tooltip."""
return {"Pixmap": "Draft_AddNamedGroup",
"MenuText": QT_TRANSLATE_NOOP("Draft_AddNamedGroup", "New named group"),
"ToolTip": QT_TRANSLATE_NOOP("Draft_AddNamedGroup", "Adds a group with a given name.")}
"MenuText": QT_TRANSLATE_NOOP("Draft_AddNamedGroup", "New Named Group"),
"ToolTip": QT_TRANSLATE_NOOP("Draft_AddNamedGroup", "Adds a group with a given name")}
def Activated(self):
super().Activated()
txt, ok = QtWidgets.QInputDialog.getText(
None,
translate("draft", "Create new group"),
translate("draft", "Group name:"),
translate("draft", "New Group"),
translate("draft", "Group name"),
text=translate("draft", "Group", "Object label")
)
if not ok:

View File

@@ -50,7 +50,7 @@ class Draft_Hatch(gui_base.GuiCommandNeedsSelection):
task.setDocumentName(FreeCADGui.ActiveDocument.Document.Name)
task.setAutoCloseOnDeletedDocument(True)
else:
FreeCAD.Console.PrintError(translate("Draft", "You must choose a base object before using this command") + "\n")
FreeCAD.Console.PrintError(translate("Draft", "Choose a base object before using this command") + "\n")
class Draft_Hatch_TaskPanel:

View File

@@ -56,7 +56,7 @@ class Heal(gui_base.GuiCommandSimplest):
return {'Pixmap': 'Draft_Heal',
'MenuText': QT_TRANSLATE_NOOP("Draft_Heal", "Heal"),
'ToolTip': QT_TRANSLATE_NOOP("Draft_Heal", "Heal faulty Draft objects saved with an earlier version of the program.\nIf an object is selected it will try to heal that object in particular,\notherwise it will try to heal all objects in the active document.")}
'ToolTip': QT_TRANSLATE_NOOP("Draft_Heal", "Heals faulty Draft objects saved with an earlier version of FreeCAD.\nIf an object is selected it tries to heal only that object,\notherwise it tries to heal all objects in the active document.")}
def Activated(self):
"""Execute when the command is called."""

View File

@@ -55,8 +55,8 @@ class Draft_Hyperlink:
def GetResources(self):
d = {'Pixmap': '',
'Accel': "",
'MenuText': QT_TRANSLATE_NOOP("Draft_Hyperlink", "Open hyperlinks"),
'ToolTip': QT_TRANSLATE_NOOP("Draft_Hyperlink", "Open linked documents")}
'MenuText': QT_TRANSLATE_NOOP("Draft_Hyperlink", "Open Links"),
'ToolTip': QT_TRANSLATE_NOOP("Draft_Hyperlink", "Opens linked documents")}
return d
def Activated(self):
@@ -65,11 +65,11 @@ class Draft_Hyperlink:
ret = None
if len(self.hyperlinks_list) > 1:
m = QtWidgets.QMessageBox()
m.setWindowTitle(translate("draft", "Opening multiple hyperlinks"))
m.setWindowTitle(translate("draft", "Opening Multiple Links"))
m.setText(
translate(
"draft",
"Multiple hyperlinks found."
"Multiple links found"
)
)
m.setInformativeText(

View File

@@ -52,7 +52,7 @@ class Join(gui_base_original.Modifier):
return {"Pixmap": "Draft_Join",
"Accel": "J, O",
"MenuText": QT_TRANSLATE_NOOP("Draft_Join", "Join"),
"ToolTip": QT_TRANSLATE_NOOP("Draft_Join", "Joins the selected lines or polylines into a single object.\nThe lines must share a common point at the start or at the end for the operation to succeed.")}
"ToolTip": QT_TRANSLATE_NOOP("Draft_Join", "Joins the selected lines or polylines into a single object.\nThe lines must share a common point at the start or at the end.")}
def Activated(self):
"""Execute when the command is called."""
@@ -85,10 +85,10 @@ class Join(gui_base_original.Modifier):
_cmd += ")"
_cmd_list = ['j = ' + _cmd,
'FreeCAD.ActiveDocument.recompute()']
self.commit(translate("draft", "Join lines"),
self.commit(translate("draft", "Join Lines"),
_cmd_list)
else:
_err(translate("draft", "Only Draft Lines and Wires can be joined"))
_err(translate("draft", "Only Draft lines and wires can be joined"))
self.finish()
def print_selection(self):

View File

@@ -67,7 +67,7 @@ class Layer(gui_base.GuiCommandSimplest):
def GetResources(self):
"""Set icon, menu and tooltip."""
return {"Pixmap": "Draft_Layer",
"MenuText": QT_TRANSLATE_NOOP("Draft_Layer", "New layer"),
"MenuText": QT_TRANSLATE_NOOP("Draft_Layer", "New Layer"),
"ToolTip": QT_TRANSLATE_NOOP("Draft_Layer", "Adds a layer to the document.\nObjects added to this layer can share the same visual properties.")}
def Activated(self):
@@ -93,8 +93,8 @@ class AddToLayer(gui_base.GuiCommandNeedsSelection):
def GetResources(self):
"""Set icon, menu and tooltip."""
return {"Pixmap": "Draft_AddToLayer",
"MenuText": QT_TRANSLATE_NOOP("Draft_AddToLayer", "Add to layer..."),
"ToolTip": QT_TRANSLATE_NOOP("Draft_AddToLayer", "Adds the selected objects to a layer, or removes them from any layer.")}
"MenuText": QT_TRANSLATE_NOOP("Draft_AddToLayer", "Add to Layer"),
"ToolTip": QT_TRANSLATE_NOOP("Draft_AddToLayer", "Adds selected objects to a layer, or removes them from any layer")}
def Activated(self):
"""Execute when the command is called."""
@@ -109,11 +109,11 @@ class AddToLayer(gui_base.GuiCommandNeedsSelection):
self.objects = [None] \
+ [None] \
+ objs
self.labels = [translate("draft", "Remove from layer")] \
self.labels = [translate("draft", "Remove From Layer")] \
+ ["---"] \
+ [obj.Label for obj in objs] \
+ ["---"] \
+ [translate("draft", "Add to new layer...")]
+ [translate("draft", "Add to New Layer")]
self.icons = [self.ui.getIcon(":/icons/list-remove.svg")] \
+ [None] \
+ [obj.ViewObject.Icon for obj in objs] \
@@ -145,8 +145,8 @@ class AddToLayer(gui_base.GuiCommandNeedsSelection):
from PySide import QtWidgets
txt, ok = QtWidgets.QInputDialog.getText(
None,
translate("draft", "Create new layer"),
translate("draft", "Layer name:"),
translate("draft", "New Layer"),
translate("draft", "Layer name"),
text=translate("draft", "Layer", "Object label")
)
if not ok:
@@ -179,8 +179,8 @@ class LayerManager:
def GetResources(self):
return {"Pixmap" : "Draft_LayerManager",
"MenuText": QT_TRANSLATE_NOOP("Draft_LayerManager", "Manage layers..."),
"ToolTip" : QT_TRANSLATE_NOOP("Draft_LayerManager", "Set/modify the different layers of this document")}
"MenuText": QT_TRANSLATE_NOOP("Draft_LayerManager", "Manage Layers"),
"ToolTip" : QT_TRANSLATE_NOOP("Draft_LayerManager", "Allows to modify the layers")}
def IsActive(self):
"""Return True when this command should be available."""
@@ -364,12 +364,12 @@ class LayerManager:
# set header
self.model.setHorizontalHeaderLabels([translate("Draft","On"),
translate("Draft","Name"),
translate("Draft","Line width"),
translate("Draft","Draw style"),
translate("Draft","Line color"),
translate("Draft","Face color"),
translate("Draft","Line Width"),
translate("Draft","Draw Style"),
translate("Draft","Line Color"),
translate("Draft","Face Color"),
translate("Draft","Transparency"),
translate("Draft","Line print color")])
translate("Draft","Line Print Color")])
self.dialog.tree.header().setDefaultSectionSize(72)
self.dialog.tree.setColumnWidth(0,32) # on/off column
self.dialog.tree.setColumnWidth(1,128) # name column

View File

@@ -61,7 +61,7 @@ class Line(gui_base_original.Creator):
return {'Pixmap': 'Draft_Line',
'Accel': "L,I",
'MenuText': QT_TRANSLATE_NOOP("Draft_Line", "Line"),
'ToolTip': QT_TRANSLATE_NOOP("Draft_Line", "Creates a 2-point line.\nSHIFT to constrain.")}
'ToolTip': QT_TRANSLATE_NOOP("Draft_Line", "Creates a 2-point line")}
def Activated(self, name=QT_TRANSLATE_NOOP("draft", "Line"), icon="Draft_Line", task_title=None):
"""Execute when the command is called."""
@@ -308,7 +308,7 @@ class Wire(Line):
return {'Pixmap': 'Draft_Wire',
'Accel': "P, L",
'MenuText': QT_TRANSLATE_NOOP("Draft_Wire", "Polyline"),
'ToolTip': QT_TRANSLATE_NOOP("Draft_Wire", "Creates a multiple-points line (polyline).\nSHIFT to constrain.")}
'ToolTip': QT_TRANSLATE_NOOP("Draft_Wire", "Creates a polyline")}
def Activated(self):
"""Execute when the command is called."""
@@ -330,8 +330,8 @@ class Wire(Line):
w = Part.Wire(Part.__sortEdges__(edges))
except Exception:
_err(translate("draft",
"Unable to create a Wire "
"from selected objects"))
"Unable to create a wire "
"from the selected objects"))
else:
# Points of the new fused Wire in string form
# 'FreeCAD.Vector(x,y,z), FreeCAD.Vector(x1,y1,z1), ...'

View File

@@ -57,14 +57,14 @@ class LineSlope(gui_base.GuiCommandNeedsSelection):
"""
def __init__(self):
super().__init__(name=translate("draft", "Change slope"))
super().__init__(name=translate("draft", "Change Slope"))
def GetResources(self):
"""Set icon, menu and tooltip."""
return {"Pixmap": "Draft_Slope",
"MenuText": QT_TRANSLATE_NOOP("Draft_Slope", "Set slope"),
"ToolTip": QT_TRANSLATE_NOOP("Draft_Slope", "Sets the slope of the selected line by changing the value of the Z value of one of its points.\nIf a polyline is selected, it will apply the slope transformation to each of its segments.\n\nThe slope will always change the Z value, therefore this command only works well for\nstraight Draft lines that are drawn in the XY plane. Selected objects that aren't single lines will be ignored.")}
"MenuText": QT_TRANSLATE_NOOP("Draft_Slope", "Set Slope"),
"ToolTip": QT_TRANSLATE_NOOP("Draft_Slope", "Sets the slope of the selected line by changing the value of the Z value of one of its points.\nIf a polyline is selected, it will apply the slope transformation to each of its segments.\n\nThe slope will always change the Z value, therefore this command only works well for\nstraight Draft lines that are drawn on the XY-plane.")}
def Activated(self):
"""Execute when the command is called."""
@@ -84,7 +84,7 @@ class LineSlope(gui_base.GuiCommandNeedsSelection):
w.setWindowTitle(translate("Draft", "Slope"))
layout = QtWidgets.QHBoxLayout(w)
label = QtWidgets.QLabel(w)
label.setText(translate("Draft", "Slope")+":")
label.setText(translate("Draft", "Slope"))
layout.addWidget(label)
self.spinbox = QtWidgets.QDoubleSpinBox(w)
self.spinbox.setDecimals(params.get_param("Decimals", path="Units"))

View File

@@ -62,7 +62,7 @@ class Mirror(gui_base_original.Modifier):
return {'Pixmap': 'Draft_Mirror',
'Accel': "M, I",
'MenuText': QT_TRANSLATE_NOOP("Draft_Mirror", "Mirror"),
'ToolTip': QT_TRANSLATE_NOOP("Draft_Mirror", "Mirrors the selected objects along a line defined by two points.")}
'ToolTip': QT_TRANSLATE_NOOP("Draft_Mirror", "Mirrors the selected objects along a line defined by 2 points")}
def Activated(self):
"""Execute when the command is called."""

View File

@@ -53,7 +53,7 @@ class Move(gui_base_original.Modifier):
return {"Pixmap": "Draft_Move",
"Accel": "M, V",
"MenuText": QT_TRANSLATE_NOOP("Draft_Move", "Move"),
"ToolTip": QT_TRANSLATE_NOOP("Draft_Move", "Moves the selected objects.\nIf the \"copy\" option is active, it will create displaced copies.\nSHIFT to constrain. Hold ALT and click to create a copy with each click.")}
"ToolTip": QT_TRANSLATE_NOOP("Draft_Move", "Moves the selected objects.\nIf the \"Copy\" option is active, it creates displaced copies.")}
def Activated(self):
"""Execute when the command is called."""

View File

@@ -61,7 +61,7 @@ class Offset(gui_base_original.Modifier):
return {'Pixmap': 'Draft_Offset',
'Accel': "O, S",
'MenuText': QT_TRANSLATE_NOOP("Draft_Offset", "Offset"),
'ToolTip': QT_TRANSLATE_NOOP("Draft_Offset", "Offsets of the selected object.\nIt can also create an offset copy of the original object.\nSHIFT to constrain. Hold ALT and click to create a copy with each click.")}
'ToolTip': QT_TRANSLATE_NOOP("Draft_Offset", "Offsets the selected object.\nIt can also create an offset copy of the original object.")}
def Activated(self):
"""Execute when the command is called."""
@@ -79,7 +79,7 @@ class Offset(gui_base_original.Modifier):
gui_tool_utils.selectObject)
elif len(Gui.Selection.getSelection()) > 1:
_wrn(translate("draft", "Offset only works "
"on one object at a time."))
"on one object at a time"))
else:
self.proceed()
@@ -119,7 +119,7 @@ class Offset(gui_base_original.Modifier):
self.ghost = trackers.bsplineTracker(points=self.sel.Points)
self.mode = "BSpline"
elif utils.getType(self.sel) == "BezCurve":
_wrn(translate("draft", "Offset of Bezier curves "
_wrn(translate("draft", "Offset of Bézier curves "
"is currently not supported"))
self.finish()
return
@@ -326,7 +326,7 @@ class Offset(gui_base_original.Modifier):
self.finish()
else:
_err(translate("Draft",
"Offset direction is not defined. Please move the mouse on either side of the object first to indicate a direction"))
"Offset direction is not defined. Move the mouse on either side of the object first to indicate a direction."))
Gui.addCommand('Draft_Offset', Offset())

View File

@@ -53,7 +53,7 @@ class OrthoArray(gui_base.GuiCommandBase):
"""Set icon, menu and tooltip."""
return {"Pixmap": "Draft_Array",
"MenuText": QT_TRANSLATE_NOOP("Draft_OrthoArray", "Array"),
"ToolTip": QT_TRANSLATE_NOOP("Draft_OrthoArray", "Creates copies of the selected object, and places the copies in an orthogonal pattern,\nmeaning the copies follow the specified direction in the X, Y, Z axes.\n\nThe array can be turned into a polar or a circular array by changing its type.")}
"ToolTip": QT_TRANSLATE_NOOP("Draft_OrthoArray", "Creates copies of the selected object in an orthogonal pattern")}
def Activated(self):
"""Execute when the command is called.

View File

@@ -70,8 +70,8 @@ class PathArray(gui_base_original.Modifier):
"""Set icon, menu and tooltip."""
return {'Pixmap': 'Draft_PathArray',
'MenuText': QT_TRANSLATE_NOOP("Draft_PathArray", "Path array"),
'ToolTip': QT_TRANSLATE_NOOP("Draft_PathArray", "Creates copies of the selected object along a selected path.\nFirst select the object, and then select the path.\nThe path can be a polyline, B-spline, Bezier curve, or even edges from other objects.")}
'MenuText': QT_TRANSLATE_NOOP("Draft_PathArray", "Path Array"),
'ToolTip': QT_TRANSLATE_NOOP("Draft_PathArray", "Creates copies of the selected object along a selected path")}
def Activated(self, name="Path array"):
"""Execute when the command is called."""
@@ -99,7 +99,7 @@ class PathArray(gui_base_original.Modifier):
"""Proceed with the command if one object was selected."""
sel = Gui.Selection.getSelectionEx()
if len(sel) != 2:
_err(translate("draft","Please select exactly two objects, the base object and the path object, before calling this command."))
_err(translate("draft","Select exactly 2 objects, the base object and the path object, before calling this command"))
else:
base_object = sel[0].Object
path_object = sel[1].Object
@@ -144,7 +144,7 @@ class PathArray(gui_base_original.Modifier):
_cmd_list = ["_obj_ = " + _cmd,
"Draft.autogroup(_obj_)",
"App.ActiveDocument.recompute()"]
self.commit(translate("draft","Path array"), _cmd_list)
self.commit(translate("draft","Create Path Array"), _cmd_list)
# Commit the transaction and execute the commands
# through the parent class
@@ -164,8 +164,8 @@ class PathLinkArray(PathArray):
"""Set icon, menu and tooltip."""
return {'Pixmap': 'Draft_PathLinkArray',
'MenuText': QT_TRANSLATE_NOOP("Draft_PathLinkArray", "Path link array"),
'ToolTip': QT_TRANSLATE_NOOP("Draft_PathLinkArray", "Like the PathArray tool, but creates a 'Link array' instead.\nA 'Link array' is more efficient when handling many copies but the 'Fuse' option cannot be used.")}
'MenuText': QT_TRANSLATE_NOOP("Draft_PathLinkArray", "Path Link Array"),
'ToolTip': QT_TRANSLATE_NOOP("Draft_PathLinkArray", "Creates linked copies of the selected object along a selected path")}
def Activated(self):
"""Execute when the command is called."""

View File

@@ -63,8 +63,8 @@ class PathTwistedArray(gui_base_original.Modifier):
"""Set icon, menu and tooltip."""
return {'Pixmap': 'Draft_PathTwistedArray',
'MenuText': QT_TRANSLATE_NOOP("Draft_PathTwistedArray", "Path twisted array"),
'ToolTip': QT_TRANSLATE_NOOP("Draft_PathTwistedArray", "Creates copies of the selected object along a selected path, and twists the copies.\nFirst select the object, and then select the path.\nThe path can be a polyline, B-spline, Bezier curve, or even edges from other objects.")}
'MenuText': QT_TRANSLATE_NOOP("Draft_PathTwistedArray", "Twisted Path Array"),
'ToolTip': QT_TRANSLATE_NOOP("Draft_PathTwistedArray", "Creates twisted copies of the selected object along a selected path")}
def Activated(self, name="Path twisted array"):
"""Execute when the command is called."""
@@ -76,7 +76,7 @@ class PathTwistedArray(gui_base_original.Modifier):
"""Proceed with the command if one object was selected."""
sel = Gui.Selection.getSelectionEx()
if len(sel) != 2:
_err(translate("draft","Please select exactly two objects, the base object and the path object, before calling this command."))
_err(translate("draft","Select exactly 2 objects, the base object and the path object, before calling this command"))
else:
base_object = sel[0].Object
path_object = sel[1].Object
@@ -98,7 +98,7 @@ class PathTwistedArray(gui_base_original.Modifier):
_cmd_list = ["_obj_ = " + _cmd,
"Draft.autogroup(_obj_)",
"App.ActiveDocument.recompute()"]
self.commit(translate("draft","Path twisted array"), _cmd_list)
self.commit(translate("draft","Create Path Twisted Array"), _cmd_list)
# Commit the transaction and execute the commands
# through the parent class
@@ -118,8 +118,8 @@ class PathTwistedLinkArray(PathTwistedArray):
"""Set icon, menu and tooltip."""
return {'Pixmap': 'Draft_PathTwistedLinkArray',
'MenuText': QT_TRANSLATE_NOOP("Draft_PathTwistedLinkArray","Path twisted link array"),
'ToolTip': QT_TRANSLATE_NOOP("Draft_PathTwistedLinkArray","Like the PathTwistedArray tool, but creates a 'Link array' instead.\nA 'Link array' is more efficient when handling many copies but the 'Fuse' option cannot be used.")}
'MenuText': QT_TRANSLATE_NOOP("Draft_PathTwistedLinkArray","Twisted Path Link Array"),
'ToolTip': QT_TRANSLATE_NOOP("Draft_PathTwistedLinkArray","Creates twisted linked copies of the selected object along a selected path")}
def Activated(self):
"""Execute when the command is called."""

View File

@@ -43,8 +43,8 @@ class Draft_WorkingPlaneProxy:
def GetResources(self):
"""Set icon, menu and tooltip."""
return {"Pixmap": "Draft_PlaneProxy",
"MenuText": QT_TRANSLATE_NOOP("Draft_WorkingPlaneProxy", "Create working plane proxy"),
"ToolTip": QT_TRANSLATE_NOOP("Draft_WorkingPlaneProxy", "Creates a proxy object from the current working plane.\nOnce the object is created double click it in the tree view to restore the camera position and objects' visibilities.\nThen you can use it to save a different camera position and objects' states any time you need.")}
"MenuText": QT_TRANSLATE_NOOP("Draft_WorkingPlaneProxy", "Working Plane Proxy"),
"ToolTip": QT_TRANSLATE_NOOP("Draft_WorkingPlaneProxy", "Creates a proxy object from the current working plane that allows to restore the camera position and visibility of objects")}
def IsActive(self):
"""Return True when this command should be available."""

View File

@@ -64,8 +64,8 @@ class PointArray(gui_base_original.Modifier):
"""Set icon, menu and tooltip."""
return {'Pixmap': 'Draft_PointArray',
'MenuText': QT_TRANSLATE_NOOP("Draft_PointArray", "Point array"),
'ToolTip': QT_TRANSLATE_NOOP("Draft_PointArray", "Creates copies of the selected base object at the points of a point object.\nFirst select the base object, and then select the point object.")}
'MenuText': QT_TRANSLATE_NOOP("Draft_PointArray", "Point Array"),
'ToolTip': QT_TRANSLATE_NOOP("Draft_PointArray", "Creates copies of the selected object at the points of a point object")}
def Activated(self, name="Point array"):
"""Execute when the command is called."""
@@ -92,7 +92,7 @@ class PointArray(gui_base_original.Modifier):
"""Proceed with the command if one object was selected."""
sel = Gui.Selection.getSelectionEx()
if len(sel) != 2:
_err(translate("draft","Please select exactly two objects, the base object and the point object, before calling this command."))
_err(translate("draft","Select exactly 2 objects, the base object and the point object, before calling this command"))
else:
base_object = sel[0].Object
point_object = sel[1].Object
@@ -110,7 +110,7 @@ class PointArray(gui_base_original.Modifier):
_cmd_list = ["_obj_ = " + _cmd,
"Draft.autogroup(_obj_)",
"App.ActiveDocument.recompute()"]
self.commit(translate("draft","Point array"), _cmd_list)
self.commit(translate("draft","Create Point Array"), _cmd_list)
# Commit the transaction and execute the commands
# through the parent class
@@ -129,8 +129,8 @@ class PointLinkArray(PointArray):
"""Set icon, menu and tooltip."""
return {'Pixmap': 'Draft_PointLinkArray',
'MenuText': QT_TRANSLATE_NOOP("Draft_PointLinkArray", "Point link array"),
'ToolTip': QT_TRANSLATE_NOOP("Draft_PointLinkArray", "Like the PointArray tool, but creates a 'Point link array' instead.\nA 'Point link array' is more efficient when handling many copies.")}
'MenuText': QT_TRANSLATE_NOOP("Draft_PointLinkArray", "Point Link Array"),
'ToolTip': QT_TRANSLATE_NOOP("Draft_PointLinkArray", "Creates linked copies of the selected object at the points of a point object")}
def Activated(self):
"""Execute when the command is called."""

View File

@@ -60,7 +60,7 @@ class Point(gui_base_original.Creator):
return {'Pixmap': 'Draft_Point',
'MenuText': QT_TRANSLATE_NOOP("Draft_Point", "Point"),
'ToolTip': QT_TRANSLATE_NOOP("Draft_Point", "Creates a point object. Click anywhere on the 3D view.")}
'ToolTip': QT_TRANSLATE_NOOP("Draft_Point", "Creates a point")}
def Activated(self):
"""Execute when the command is called."""

View File

@@ -52,8 +52,8 @@ class PolarArray(gui_base.GuiCommandBase):
def GetResources(self):
"""Set icon, menu and tooltip."""
return {"Pixmap": "Draft_PolarArray",
"MenuText": QT_TRANSLATE_NOOP("Draft_PolarArray", "Polar array"),
"ToolTip": QT_TRANSLATE_NOOP("Draft_PolarArray", "Creates copies of the selected object, and places the copies in a polar pattern\ndefined by a center of rotation and its angle.\n\nThe array can be turned into an orthogonal or a circular array by changing its type.")}
"MenuText": QT_TRANSLATE_NOOP("Draft_PolarArray", "Polar Array"),
"ToolTip": QT_TRANSLATE_NOOP("Draft_PolarArray", "Creates copies of the selected object in a polar pattern")}
def Activated(self):
"""Execute when the command is called.

View File

@@ -55,7 +55,7 @@ class Polygon(gui_base_original.Creator):
return {'Pixmap': 'Draft_Polygon',
'Accel': "P, G",
'MenuText': QT_TRANSLATE_NOOP("Draft_Polygon", "Polygon"),
'ToolTip': QT_TRANSLATE_NOOP("Draft_Polygon", "Creates a regular polygon (triangle, square, pentagon, ...).\nSHIFT to constrain")}
'ToolTip': QT_TRANSLATE_NOOP("Draft_Polygon", "Creates a regular polygon (triangle, square, pentagon…)")}
def Activated(self, numVertices=None):
"""Execute when the command is called."""

View File

@@ -52,7 +52,7 @@ class Rectangle(gui_base_original.Creator):
return {'Pixmap': 'Draft_Rectangle',
'Accel': "R, E",
'MenuText': QT_TRANSLATE_NOOP("Draft_Rectangle", "Rectangle"),
'ToolTip': QT_TRANSLATE_NOOP("Draft_Rectangle", "Creates a 2-point rectangle.")}
'ToolTip': QT_TRANSLATE_NOOP("Draft_Rectangle", "Creates a 2-point rectangle")}
def Activated(self):
"""Execute when the command is called."""

View File

@@ -55,7 +55,7 @@ class Rotate(gui_base_original.Modifier):
return {"Pixmap": "Draft_Rotate",
"Accel": "R, O",
"MenuText": QT_TRANSLATE_NOOP("Draft_Rotate", "Rotate"),
"ToolTip": QT_TRANSLATE_NOOP("Draft_Rotate", "Rotates the selected objects. Choose the center of rotation, then the initial angle, and then the final angle.\nIf the \"copy\" option is active, it will create rotated copies.\nSHIFT to constrain. Hold ALT and click to create a copy with each click.")}
"ToolTip": QT_TRANSLATE_NOOP("Draft_Rotate", "Rotates the selected objects.\nIf the \"Copy\" option is active, it will create rotated copies.")}
def Activated(self):
"""Execute when the command is called."""
@@ -183,7 +183,7 @@ class Rotate(gui_base_original.Modifier):
self.ui.radiusValue.setText(U.Quantity(0, U.Angle).UserString)
self.ui.makeFace.hide()
self.ui.labelRadius.setText(translate("draft", "Base angle"))
self.ui.radiusValue.setToolTip(translate("draft", "The base angle you wish to start the rotation from"))
self.ui.radiusValue.setToolTip(translate("draft", "The base angle to start the rotation from"))
self.arctrack.setCenter(self.center)
for ghost in self.ghosts:
ghost.center(self.center)
@@ -196,7 +196,7 @@ class Rotate(gui_base_original.Modifier):
"""Set the starting point of the rotation."""
self.firstangle = self._get_angle()
self.ui.labelRadius.setText(translate("draft", "Rotation"))
self.ui.radiusValue.setToolTip(translate("draft", "The amount of rotation you wish to perform.\nThe final angle will be the base angle plus this amount."))
self.ui.radiusValue.setToolTip(translate("draft", "The amount of rotation to perform.\nThe final angle will be the base angle plus this amount."))
self.arctrack.on()
self.arctrack.setStartPoint(self.point)
for ghost in self.ghosts:
@@ -290,7 +290,7 @@ class Rotate(gui_base_original.Modifier):
self.ui.radiusUi()
self.ui.makeFace.hide()
self.ui.labelRadius.setText(translate("draft", "Base angle"))
self.ui.radiusValue.setToolTip(translate("draft", "The base angle you wish to start the rotation from"))
self.ui.radiusValue.setToolTip(translate("draft", "The base angle to start the rotation from"))
self.ui.radiusValue.setText(U.Quantity(0, U.Angle).UserString)
self.step = 1
_toolmsg(translate("draft", "Pick base angle"))
@@ -303,7 +303,7 @@ class Rotate(gui_base_original.Modifier):
"""
if self.step == 1:
self.ui.labelRadius.setText(translate("draft", "Rotation"))
self.ui.radiusValue.setToolTip(translate("draft", "The amount of rotation you wish to perform.\nThe final angle will be the base angle plus this amount."))
self.ui.radiusValue.setToolTip(translate("draft", "The amount of rotation to perform.\nThe final angle will be the base angle plus this amount."))
self.ui.radiusValue.setText(U.Quantity(0, U.Angle).UserString)
self.firstangle = math.radians(rad)
self.arctrack.setStartAngle(self.firstangle)

View File

@@ -65,7 +65,7 @@ class Scale(gui_base_original.Modifier):
return {"Pixmap": "Draft_Scale",
"Accel": "S, C",
"MenuText": QT_TRANSLATE_NOOP("Draft_Scale", "Scale"),
"ToolTip": QT_TRANSLATE_NOOP("Draft_Scale", "Scales the selected objects from a base point.\nSHIFT to constrain.")}
"ToolTip": QT_TRANSLATE_NOOP("Draft_Scale", "Scales the selected objects from a base point")}
def Activated(self):
"""Execute when the command is called."""

View File

@@ -56,8 +56,8 @@ class Draft_SelectPlane:
"""Set icon, menu and tooltip."""
return {"Pixmap": "Draft_SelectPlane",
"Accel": "W, P",
"MenuText": QT_TRANSLATE_NOOP("Draft_SelectPlane", "Select working plane"),
"ToolTip": QT_TRANSLATE_NOOP("Draft_SelectPlane", "Select 3 vertices, one or more shapes or an object to define a working plane.")}
"MenuText": QT_TRANSLATE_NOOP("Draft_SelectPlane", "Working Plane"),
"ToolTip": QT_TRANSLATE_NOOP("Draft_SelectPlane", "Defines the working plane from 3 vertices, 1 or more shapes, or an object")}
def IsActive(self):
"""Return True when this command should be available."""

View File

@@ -60,8 +60,8 @@ class Draft_SetStyle:
return {
"Pixmap": "Draft_Apply",
"Accel": "S, S",
"MenuText": QT_TRANSLATE_NOOP("Draft_SetStyle", "Set style"),
"ToolTip": QT_TRANSLATE_NOOP("Draft_SetStyle", "Sets default styles")
"MenuText": QT_TRANSLATE_NOOP("Draft_SetStyle", "Set Style"),
"ToolTip": QT_TRANSLATE_NOOP("Draft_SetStyle", "Sets the default style and can apply the style to objects")
}
def Activated(self):
@@ -419,7 +419,7 @@ class Draft_SetStyle_TaskPanel:
reply = QtWidgets.QInputDialog.getText(None,
translate("Draft", "Save style"),
translate("Draft", "Name of this new style:"))
translate("Draft", "Name of this new style"))
if reply[1]:
name = reply[0]
pdict = self.load()

View File

@@ -56,8 +56,8 @@ class Shape2DView(gui_base_original.Modifier):
"""Set icon, menu and tooltip."""
return {'Pixmap': 'Draft_2DShapeView',
'MenuText': QT_TRANSLATE_NOOP("Draft_Shape2DView", "Shape 2D view"),
'ToolTip': QT_TRANSLATE_NOOP("Draft_Shape2DView", "Creates a 2D projection of the selected objects on the XY plane.\nThe initial projection direction is the negative of the current active view direction.\nYou can select individual faces to project, or the entire solid, and also include hidden lines.\nThese projections can be used to create technical drawings with the TechDraw Workbench.")}
'MenuText': QT_TRANSLATE_NOOP("Draft_Shape2DView", "Shape 2D View"),
'ToolTip': QT_TRANSLATE_NOOP("Draft_Shape2DView", "Creates a 2D projection of the selected objects on the XY-plane.\nThe initial projection direction is the opposite of the current active view direction.")}
def Activated(self):
"""Execute when the command is called."""
@@ -112,7 +112,7 @@ class Shape2DView(gui_base_original.Modifier):
n += 1
if commitlist:
commitlist.append("FreeCAD.ActiveDocument.recompute()")
self.commit(translate("draft", "Create 2D view"),
self.commit(translate("draft", "Create 2D View"),
commitlist)
self.finish()

View File

@@ -57,8 +57,8 @@ class ShapeString(gui_base.GuiCommandBase):
"""Set icon, menu and tooltip."""
return {"Pixmap": "Draft_ShapeString",
"MenuText": QT_TRANSLATE_NOOP("Draft_ShapeString", "Shape from text"),
"ToolTip": QT_TRANSLATE_NOOP("Draft_ShapeString", "Creates a shape from a text string by choosing a specific font and a placement.\nThe closed shapes can be used for extrusions and boolean operations.")}
"MenuText": QT_TRANSLATE_NOOP("Draft_ShapeString", "Shape From Text"),
"ToolTip": QT_TRANSLATE_NOOP("Draft_ShapeString", "Creates a shape from a text string and a specified font")}
def Activated(self):
"""Execute when the command is called."""

View File

@@ -63,8 +63,8 @@ class Draft_Snap_Lock(Draft_Snap_Base):
def GetResources(self):
return {"Pixmap": "Draft_Snap_Lock",
"Accel": "Shift+S",
"MenuText": QT_TRANSLATE_NOOP("Draft_Snap_Lock", "Snap lock"),
"ToolTip": QT_TRANSLATE_NOOP("Draft_Snap_Lock", "Enables or disables snapping globally."),
"MenuText": QT_TRANSLATE_NOOP("Draft_Snap_Lock", "Snap Lock"),
"ToolTip": QT_TRANSLATE_NOOP("Draft_Snap_Lock", "Enables or disables snapping globally"),
"CmdType": "NoTransaction",
"Checkable": self.isChecked()}
@@ -79,8 +79,8 @@ class Draft_Snap_Midpoint(Draft_Snap_Base):
def GetResources(self):
return {"Pixmap": "Draft_Snap_Midpoint",
"MenuText": QT_TRANSLATE_NOOP("Draft_Snap_Midpoint", "Snap midpoint"),
"ToolTip": QT_TRANSLATE_NOOP("Draft_Snap_Midpoint", "Snaps to the midpoint of edges."),
"MenuText": QT_TRANSLATE_NOOP("Draft_Snap_Midpoint", "Snap Midpoint"),
"ToolTip": QT_TRANSLATE_NOOP("Draft_Snap_Midpoint", "Snaps to the midpoint of edges"),
"CmdType": "NoTransaction",
"Checkable": self.isChecked()}
@@ -93,8 +93,8 @@ class Draft_Snap_Perpendicular(Draft_Snap_Base):
def GetResources(self):
return {"Pixmap": "Draft_Snap_Perpendicular",
"MenuText": QT_TRANSLATE_NOOP("Draft_Snap_Perpendicular", "Snap perpendicular"),
"ToolTip": QT_TRANSLATE_NOOP("Draft_Snap_Perpendicular", "Snaps to the perpendicular points on faces and edges."),
"MenuText": QT_TRANSLATE_NOOP("Draft_Snap_Perpendicular", "Snap Perpendicular"),
"ToolTip": QT_TRANSLATE_NOOP("Draft_Snap_Perpendicular", "Snaps to the perpendicular points on faces and edges"),
"CmdType": "NoTransaction",
"Checkable": self.isChecked()}
@@ -107,8 +107,8 @@ class Draft_Snap_Grid(Draft_Snap_Base):
def GetResources(self):
return {"Pixmap": "Draft_Snap_Grid",
"MenuText": QT_TRANSLATE_NOOP("Draft_Snap_Grid", "Snap grid"),
"ToolTip": QT_TRANSLATE_NOOP("Draft_Snap_Grid", "Snaps to the intersections of grid lines."),
"MenuText": QT_TRANSLATE_NOOP("Draft_Snap_Grid", "Snap Grid"),
"ToolTip": QT_TRANSLATE_NOOP("Draft_Snap_Grid", "Snaps to the intersections of grid lines"),
"CmdType": "NoTransaction",
"Checkable": self.isChecked()}
@@ -121,8 +121,8 @@ class Draft_Snap_Intersection(Draft_Snap_Base):
def GetResources(self):
return {"Pixmap": "Draft_Snap_Intersection",
"MenuText": QT_TRANSLATE_NOOP("Draft_Snap_Intersection", "Snap intersection"),
"ToolTip": QT_TRANSLATE_NOOP("Draft_Snap_Intersection", "Snaps to the intersection of two edges."),
"MenuText": QT_TRANSLATE_NOOP("Draft_Snap_Intersection", "Snap Intersection"),
"ToolTip": QT_TRANSLATE_NOOP("Draft_Snap_Intersection", "Snaps to the intersection of 2 edges"),
"CmdType": "NoTransaction",
"Checkable": self.isChecked()}
@@ -135,8 +135,8 @@ class Draft_Snap_Parallel(Draft_Snap_Base):
def GetResources(self):
return {"Pixmap": "Draft_Snap_Parallel",
"MenuText": QT_TRANSLATE_NOOP("Draft_Snap_Parallel", "Snap parallel"),
"ToolTip": QT_TRANSLATE_NOOP("Draft_Snap_Parallel", "Snaps to an imaginary line parallel to straight edges."),
"MenuText": QT_TRANSLATE_NOOP("Draft_Snap_Parallel", "Snap Parallel"),
"ToolTip": QT_TRANSLATE_NOOP("Draft_Snap_Parallel", "Snaps to an imaginary line parallel to straight edges"),
"CmdType": "NoTransaction",
"Checkable": self.isChecked()}
@@ -149,8 +149,8 @@ class Draft_Snap_Endpoint(Draft_Snap_Base):
def GetResources(self):
return {"Pixmap": "Draft_Snap_Endpoint",
"MenuText": QT_TRANSLATE_NOOP("Draft_Snap_Endpoint", "Snap endpoint"),
"ToolTip": QT_TRANSLATE_NOOP("Draft_Snap_Endpoint", "Snaps to the endpoints of edges."),
"MenuText": QT_TRANSLATE_NOOP("Draft_Snap_Endpoint", "Snap Endpoint"),
"ToolTip": QT_TRANSLATE_NOOP("Draft_Snap_Endpoint", "Snaps to the endpoints of edges"),
"CmdType": "NoTransaction",
"Checkable": self.isChecked()}
@@ -163,8 +163,8 @@ class Draft_Snap_Angle(Draft_Snap_Base):
def GetResources(self):
return {"Pixmap": "Draft_Snap_Angle",
"MenuText": QT_TRANSLATE_NOOP("Draft_Snap_Angle", "Snap angle"),
"ToolTip": QT_TRANSLATE_NOOP("Draft_Snap_Angle", "Snaps to the special cardinal points on circular edges, at multiples of 30° and 45°."),
"MenuText": QT_TRANSLATE_NOOP("Draft_Snap_Angle", "Snap Angle"),
"ToolTip": QT_TRANSLATE_NOOP("Draft_Snap_Angle", "Snaps to the special cardinal points on circular edges, at multiples of 30° and 45°"),
"CmdType": "NoTransaction",
"Checkable": self.isChecked()}
@@ -177,8 +177,8 @@ class Draft_Snap_Center(Draft_Snap_Base):
def GetResources(self):
return {"Pixmap": "Draft_Snap_Center",
"MenuText": QT_TRANSLATE_NOOP("Draft_Snap_Center", "Snap center"),
"ToolTip": QT_TRANSLATE_NOOP("Draft_Snap_Center", "Snaps to the center point of faces and circular edges, and to the Placement point of Working Plane Proxies and Building Parts."),
"MenuText": QT_TRANSLATE_NOOP("Draft_Snap_Center", "Snap Center"),
"ToolTip": QT_TRANSLATE_NOOP("Draft_Snap_Center", "Snaps to the center point of faces and circular edges, and to the placement point of working plane proxies and building parts"),
"CmdType": "NoTransaction",
"Checkable": self.isChecked()}
@@ -191,8 +191,8 @@ class Draft_Snap_Extension(Draft_Snap_Base):
def GetResources(self):
return {"Pixmap": "Draft_Snap_Extension",
"MenuText": QT_TRANSLATE_NOOP("Draft_Snap_Extension", "Snap extension"),
"ToolTip": QT_TRANSLATE_NOOP("Draft_Snap_Extension", "Snaps to an imaginary line that extends beyond the endpoints of straight edges."),
"MenuText": QT_TRANSLATE_NOOP("Draft_Snap_Extension", "Snap Extension"),
"ToolTip": QT_TRANSLATE_NOOP("Draft_Snap_Extension", "Snaps to an imaginary line that extends beyond the endpoints of straight edges"),
"CmdType": "NoTransaction",
"Checkable": self.isChecked()}
@@ -205,8 +205,8 @@ class Draft_Snap_Near(Draft_Snap_Base):
def GetResources(self):
return {"Pixmap": "Draft_Snap_Near",
"MenuText": QT_TRANSLATE_NOOP("Draft_Snap_Near", "Snap near"),
"ToolTip": QT_TRANSLATE_NOOP("Draft_Snap_Near", "Snaps to the nearest point on faces and edges."),
"MenuText": QT_TRANSLATE_NOOP("Draft_Snap_Near", "Snap Near"),
"ToolTip": QT_TRANSLATE_NOOP("Draft_Snap_Near", "Snaps to the nearest point on faces and edges"),
"CmdType": "NoTransaction",
"Checkable": self.isChecked()}
@@ -219,8 +219,8 @@ class Draft_Snap_Ortho(Draft_Snap_Base):
def GetResources(self):
return {"Pixmap": "Draft_Snap_Ortho",
"MenuText": QT_TRANSLATE_NOOP("Draft_Snap_Ortho", "Snap ortho"),
"ToolTip": QT_TRANSLATE_NOOP("Draft_Snap_Ortho", "Snaps to imaginary lines that cross the previous point at multiples of 45°."),
"MenuText": QT_TRANSLATE_NOOP("Draft_Snap_Ortho", "Snap Ortho"),
"ToolTip": QT_TRANSLATE_NOOP("Draft_Snap_Ortho", "Snaps to imaginary lines that cross the previous point at multiples of 45°"),
"CmdType": "NoTransaction",
"Checkable": self.isChecked()}
@@ -233,8 +233,8 @@ class Draft_Snap_Special(Draft_Snap_Base):
def GetResources(self):
return {"Pixmap": "Draft_Snap_Special",
"MenuText": QT_TRANSLATE_NOOP("Draft_Snap_Special", "Snap special"),
"ToolTip": QT_TRANSLATE_NOOP("Draft_Snap_Special", "Snaps to special points defined by the object."),
"MenuText": QT_TRANSLATE_NOOP("Draft_Snap_Special", "Snap Special"),
"ToolTip": QT_TRANSLATE_NOOP("Draft_Snap_Special", "Snaps to special points defined by the object"),
"CmdType": "NoTransaction",
"Checkable": self.isChecked()}
@@ -247,8 +247,8 @@ class Draft_Snap_Dimensions(Draft_Snap_Base):
def GetResources(self):
return {"Pixmap": "Draft_Snap_Dimensions",
"MenuText": QT_TRANSLATE_NOOP("Draft_Snap_Dimensions", "Snap dimensions"),
"ToolTip": QT_TRANSLATE_NOOP("Draft_Snap_Dimensions", "Shows temporary X and Y dimensions."),
"MenuText": QT_TRANSLATE_NOOP("Draft_Snap_Dimensions", "Snap Dimensions"),
"ToolTip": QT_TRANSLATE_NOOP("Draft_Snap_Dimensions", "Shows temporary X and Y dimensions"),
"CmdType": "NoTransaction",
"Checkable": self.isChecked()}
@@ -261,8 +261,8 @@ class Draft_Snap_WorkingPlane(Draft_Snap_Base):
def GetResources(self):
return {"Pixmap": "Draft_Snap_WorkingPlane",
"MenuText": QT_TRANSLATE_NOOP("Draft_Snap_WorkingPlane", "Snap working plane"),
"ToolTip": QT_TRANSLATE_NOOP("Draft_Snap_WorkingPlane", "Projects snap points onto the current working plane."),
"MenuText": QT_TRANSLATE_NOOP("Draft_Snap_WorkingPlane", "Snap Working Plane"),
"ToolTip": QT_TRANSLATE_NOOP("Draft_Snap_WorkingPlane", "Projects snap points onto the current working plane"),
"CmdType": "NoTransaction",
"Checkable": self.isChecked()}
@@ -275,8 +275,8 @@ class ShowSnapBar(Draft_Snap_Base):
def GetResources(self):
return {"Pixmap": "Draft_Snap",
"MenuText": QT_TRANSLATE_NOOP("Draft_ShowSnapBar", "Show snap toolbar"),
"ToolTip": QT_TRANSLATE_NOOP("Draft_ShowSnapBar", "Shows the snap toolbar if it is hidden."),
"MenuText": QT_TRANSLATE_NOOP("Draft_ShowSnapBar", "Show Snap Toolbar"),
"ToolTip": QT_TRANSLATE_NOOP("Draft_ShowSnapBar", "Shows the snap toolbar if it is hidden"),
"CmdType": "NoTransaction"}
def Activated(self):

View File

@@ -57,8 +57,8 @@ class BSpline(gui_lines.Line):
return {'Pixmap': 'Draft_BSpline',
'Accel': "B, S",
'MenuText': QT_TRANSLATE_NOOP("Draft_BSpline", "B-spline"),
'ToolTip': QT_TRANSLATE_NOOP("Draft_BSpline", "Creates a multiple-point B-spline.\nSHIFT to constrain.")}
'MenuText': QT_TRANSLATE_NOOP("Draft_BSpline", "B-Spline"),
'ToolTip': QT_TRANSLATE_NOOP("Draft_BSpline", "Creates a multiple-point B-spline")}
def Activated(self):
"""Execute when the command is called.
@@ -184,7 +184,7 @@ class BSpline(gui_lines.Line):
'spline = ' + _cmd,
'Draft.autogroup(spline)',
'FreeCAD.ActiveDocument.recompute()']
self.commit(translate("draft", "Create B-spline"),
self.commit(translate("draft", "Create B-Spline"),
_cmd_list)
except Exception:
_err("Draft: error delaying commit")

View File

@@ -49,14 +49,14 @@ class Split(gui_base_original.Modifier):
return {"Pixmap": "Draft_Split",
"Accel": "S, P",
"MenuText": QT_TRANSLATE_NOOP("Draft_Split", "Split"),
"ToolTip": QT_TRANSLATE_NOOP("Draft_Split", "Splits the selected line or polyline into two independent lines\nor polylines by clicking anywhere along the original object.\nIt works best when choosing a point on a straight segment and not a corner vertex.")}
"ToolTip": QT_TRANSLATE_NOOP("Draft_Split", "Splits the selected line or polyline at a specified point")}
def Activated(self):
"""Execute when the command is called."""
super().Activated(name="Split")
if not self.ui:
return
_toolmsg(translate("draft", "Click anywhere on a line to split it."))
_toolmsg(translate("draft", "Click anywhere on a line to split it"))
self.view.graphicsView().setFocus() # Make sure using Esc works.
self.call = self.view.addEventCallback("SoEvent", self.action)
@@ -98,7 +98,7 @@ class Split(gui_base_original.Modifier):
"FreeCAD.ActiveDocument.recompute()"
]
self.commit(translate("draft", "Split line"), cmd_list)
self.commit(translate("draft", "Split Line"), cmd_list)
self.finish()
def finish(self, cont=False):

View File

@@ -62,7 +62,7 @@ class Stretch(gui_base_original.Modifier):
return {'Pixmap': 'Draft_Stretch',
'Accel': "S, H",
'MenuText': QT_TRANSLATE_NOOP("Draft_Stretch", "Stretch"),
'ToolTip': QT_TRANSLATE_NOOP("Draft_Stretch", "Stretches the selected objects.\nSelect an object, then draw a rectangle to pick the vertices that will be stretched,\nthen draw a line to specify the distance and direction of stretching.")}
'ToolTip': QT_TRANSLATE_NOOP("Draft_Stretch", "Stretches the selected objects")}
def Activated(self):
"""Execute when the command is called."""
@@ -158,8 +158,8 @@ class Stretch(gui_base_original.Modifier):
"""Add point to defined selection rectangle."""
if self.step == 1:
# first rctangle point
_toolmsg(translate("draft", "Pick opposite point "
"of selection rectangle"))
_toolmsg(translate("draft", "Pick the opposite point "
"of the selection rectangle"))
self.ui.setRelative(-1)
self.rectracker.setorigin(point)
self.rectracker.on()
@@ -453,7 +453,7 @@ class Stretch(gui_base_original.Modifier):
done = True
if not done:
# otherwise create a wire copy and stretch it instead
_msg(translate("draft", "Turning one Rectangle into a Wire"))
_msg(translate("draft", "Turning a rectangle into a wire"))
pts = []
vts = ops[0].Shape.Vertexes
for i in range(4):

View File

@@ -44,8 +44,8 @@ class ApplyStyle(gui_base_original.Modifier):
"""Set icon, menu and tooltip."""
return {
"Pixmap": "Draft_Apply",
"MenuText": QT_TRANSLATE_NOOP("Draft_ApplyStyle", "Apply current style"),
"ToolTip": QT_TRANSLATE_NOOP("Draft_ApplyStyle", "Applies the current style defined in the toolbar (line width and colors) to the selected objects and groups.")
"MenuText": QT_TRANSLATE_NOOP("Draft_ApplyStyle", "Apply Current Style"),
"ToolTip": QT_TRANSLATE_NOOP("Draft_ApplyStyle", "Applies the current style to the selected objects and groups")
}
def IsActive(self):

View File

@@ -59,8 +59,8 @@ class SubelementHighlight(gui_base_original.Modifier):
return {'Pixmap': 'Draft_SubelementHighlight',
'Accel': "H, S",
'MenuText': QT_TRANSLATE_NOOP("Draft_SubelementHighlight","Subelement highlight"),
'ToolTip': QT_TRANSLATE_NOOP("Draft_SubelementHighlight","Highlight the subelements of the selected objects, so that they can then be edited with the move, rotate, and scale tools.")}
'MenuText': QT_TRANSLATE_NOOP("Draft_SubelementHighlight","Highlight Subelements"),
'ToolTip': QT_TRANSLATE_NOOP("Draft_SubelementHighlight","Highlights the subelements of the selected objects, to be able to move, rotate, and scale them")}
def Activated(self):
"""Execute when the command is called."""

View File

@@ -58,7 +58,7 @@ class Text(gui_base_original.Creator):
return {'Pixmap': 'Draft_Text',
'Accel': "T, E",
'MenuText': QT_TRANSLATE_NOOP("Draft_Text", "Text"),
'ToolTip': QT_TRANSLATE_NOOP("Draft_Text", "Creates a multi-line annotation.")}
'ToolTip': QT_TRANSLATE_NOOP("Draft_Text", "Creates a multi-line annotation")}
def Activated(self):
"""Execute when the command is called."""

View File

@@ -70,7 +70,7 @@ class BaseMode(gui_base.GuiCommandSimplest):
if hasattr(Gui, "draftToolBar"):
_ui = Gui.draftToolBar
else:
_msg(translate("draft","No active Draft Toolbar."))
_msg(translate("draft","No active Draft toolbar"))
return
if _ui is not None:
@@ -90,15 +90,15 @@ class ToggleConstructionMode(BaseMode):
def __init__(self):
super(ToggleConstructionMode,
self).__init__(name=translate("draft","Construction mode"))
self).__init__(name=translate("draft","Construction Mode"))
def GetResources(self):
"""Set icon, menu and tooltip."""
d = {'Pixmap': 'Draft_Construction',
'MenuText': QT_TRANSLATE_NOOP("Draft_ToggleConstructionMode","Toggle construction mode"),
'MenuText': QT_TRANSLATE_NOOP("Draft_ToggleConstructionMode","Toggle Construction Mode"),
'Accel': "C, M",
'ToolTip': QT_TRANSLATE_NOOP("Draft_ToggleConstructionMode","Toggles the Construction mode.\nWhen this is active, the following objects created will be included in the construction group, and will be drawn with the specified color and properties.")}
'ToolTip': QT_TRANSLATE_NOOP("Draft_ToggleConstructionMode","Toggles the construction mode")}
return d
def Activated(self):
@@ -126,15 +126,15 @@ class ToggleDisplayMode(gui_base.GuiCommandNeedsSelection):
def __init__(self):
super(ToggleDisplayMode,
self).__init__(name=translate("draft","Toggle display mode"))
self).__init__(name=translate("draft","Toggle Display Mode"))
def GetResources(self):
"""Set icon, menu and tooltip."""
d = {'Pixmap': 'Draft_SwitchMode',
'Accel': "Shift+Space",
'MenuText': QT_TRANSLATE_NOOP("Draft_ToggleDisplayMode","Toggle normal/wireframe display"),
'ToolTip': QT_TRANSLATE_NOOP("Draft_ToggleDisplayMode","Switches the display mode of selected objects from flatlines to wireframe and back.\nThis is helpful to quickly visualize objects that are hidden by other objects.\nThis is intended to be used with closed shapes and solids, and doesn't affect open wires.")}
'MenuText': QT_TRANSLATE_NOOP("Draft_ToggleDisplayMode","Toggle Wireframe"),
'ToolTip': QT_TRANSLATE_NOOP("Draft_ToggleDisplayMode","Switches the view style of the selected objects from Flat Lines to Wireframe and back")}
return d
def Activated(self):

View File

@@ -75,9 +75,7 @@ class Trimex(gui_base_original.Modifier):
'Accel': "T, R",
'MenuText': QT_TRANSLATE_NOOP("Draft_Trimex", "Trimex"),
'ToolTip': QT_TRANSLATE_NOOP("Draft_Trimex",
"Trims or extends the selected object, or extrudes single"
+ " faces.\nSHIFT constrains to current segment"
+ " or to normal, ALT inverts.")}
"Trims or extends the selected object, or extrudes single faces")}
def Activated(self):
"""Execute when the command is called."""
@@ -117,7 +115,7 @@ class Trimex(gui_base_original.Modifier):
if not hasattr(self.obj, "Shape"):
self.obj = None
self.finish()
_err(translate("draft", "This object is not supported."))
_err(translate("draft", "This object is not supported"))
return
if hasattr(self.obj, "Placement"):
self.placement = self.obj.Placement
@@ -134,7 +132,7 @@ class Trimex(gui_base_original.Modifier):
else:
self.obj = None
self.finish()
_err(translate("draft", "Only a single face can be extruded."))
_err(translate("draft", "Only a single face can be extruded"))
return
self.extrudeMode = True
self.normal = self.obj.Shape.Faces[0].normalAt(0.5, 0.5)
@@ -153,7 +151,7 @@ class Trimex(gui_base_original.Modifier):
if isinstance(e.Curve,(Part.BSplineCurve, Part.BezierCurve)):
self.obj = None
self.finish()
_err(translate("draft", "Trimex is not supported yet on this type of object."))
_err(translate("draft", "Trimex does not support this object type"))
return
self.obj.ViewObject.LineColor = (0.5, 0.5, 0.5)
self.obj.ViewObject.LineWidth = 1
@@ -508,7 +506,7 @@ class Trimex(gui_base_original.Modifier):
if not utils.getType(obj) in ["Wire", "Circle"]:
_err(translate("draft",
"Unable to trim these objects, "
"only Draft wires and arcs are supported."))
"only Draft wires and arcs are supported"))
return
if len(obj.Shape.Wires) > 1:
_err(translate("draft",
@@ -530,10 +528,10 @@ class Trimex(gui_base_original.Modifier):
edge1 = i1
edge2 = i2
if not ints:
_err(translate("draft", "These objects don't intersect."))
_err(translate("draft", "These objects do not intersect"))
return
if len(ints) != 1:
_err(translate("draft", "Too many intersection points."))
_err(translate("draft", "Too many intersection points"))
return
v11 = wires[0].Vertexes[0].Point

View File

@@ -61,8 +61,8 @@ class WireToBSpline(gui_base_original.Modifier):
"""Set icon, menu and tooltip."""
return {'Pixmap': 'Draft_WireToBSpline',
'MenuText': QT_TRANSLATE_NOOP("Draft_WireToBSpline", "Wire to B-spline"),
'ToolTip': QT_TRANSLATE_NOOP("Draft_WireToBSpline", "Converts a selected polyline to a B-spline, or a B-spline to a polyline.")}
'MenuText': QT_TRANSLATE_NOOP("Draft_WireToBSpline", "Convert Wire/B-Spline"),
'ToolTip': QT_TRANSLATE_NOOP("Draft_WireToBSpline", "Converts the selected polyline to a B-spline, or the selected B-spline to a polyline")}
def Activated(self):
"""Execute when the command is called."""

View File

@@ -122,12 +122,12 @@ def make_arc_3points(points, placement=None, face=False,
utils.type_check([(points, (list, tuple))], name=_name)
except TypeError:
_err(translate("draft","Points:") + " {}".format(points))
_err(translate("draft","Wrong input: must be list or tuple of three points exactly."))
_err(translate("draft","Wrong input: must be a list or tuple of 3 points exactly."))
return None
if len(points) != 3:
_err(translate("draft","Points:") + " {}".format(points))
_err(translate("draft","Wrong input: must be list or tuple of three points exactly."))
_err(translate("draft","Wrong input: must be list or tuple of 3 points exactly."))
return None
if placement is not None:

View File

@@ -80,7 +80,7 @@ def make_bspline(pointslist, closed=False, placement=None, face=None, support=No
if len(pointslist) > 2:
closed = True
pointslist.pop()
_err = "Draft.make_bspline: Equal endpoints forced Closed"
_err = "Draft.make_bspline: Equal endpoints forced closed"
App.Console.PrintWarning(translate("Draft", _err) + _err + "\n")
else:
# len == 2 and first == last GIGO

View File

@@ -367,7 +367,7 @@ def make_linear_dimension_obj(edge_object, i1=1, i2=2, dim_line=None):
return None
if (not hasattr(edge_object.Shape, "Vertexes")
or len(edge_object.Shape.Vertexes) < 1):
_err(translate("draft","Wrong input: object doesn't have at least one element in 'Vertexes' to use for measuring."))
_err(translate("draft","Wrong input: object does not have at least 1 element in 'Vertexes' to use for measuring."))
return None
try:

View File

@@ -71,12 +71,12 @@ def _preprocess(objs, radius, chamfer):
edges.append(shape.Edges[0])
if len(edges) != 2:
_err(translate("draft", "Two edges are needed."))
_err(translate("draft", "2 edges are needed"))
return None, None
edges = DraftGeomUtils.fillet(edges, radius, chamfer)
if len(edges) < 3:
_err(translate("draft", "Edges are not connected or radius is too large."))
_err(translate("draft", "Edges are not connected or radius is too large"))
return None, None
return edges, del_objs

View File

@@ -97,7 +97,7 @@ def make_sketch(objects_list, autoconstraints=False, addTo=None,
if not DraftGeomUtils.is_planar(shape, tol):
App.Console.PrintError(translate("draft",
"All Shapes must be planar") + "\n")
"All shapes must be planar") + "\n")
return None
if DraftGeomUtils.get_normal(shape, tol):
@@ -113,7 +113,7 @@ def make_sketch(objects_list, autoconstraints=False, addTo=None,
for shape in shapes_list[1:]:
if not DraftGeomUtils.are_coplanar(shapes_list[0], shape, tol):
App.Console.PrintError(translate("draft",
"All Shapes must be coplanar") + "\n")
"All shapes must be coplanar") + "\n")
return None
# define sketch normal
normal = DraftGeomUtils.get_normal(shapes_list[0], tol)
@@ -130,7 +130,7 @@ def make_sketch(objects_list, autoconstraints=False, addTo=None,
else:
if not DraftGeomUtils.is_planar(poly, tol):
App.Console.PrintError(translate("draft",
"All Shapes must be coplanar") + "\n")
"All shapes must be coplanar") + "\n")
return None
normal = DraftGeomUtils.get_shape_normal(poly)
else:

View File

@@ -125,13 +125,13 @@ class Facebinder(DraftObject):
self.props_changed_clear()
def _report_build_error(self, obj):
_err(obj.Label + ": " + translate("draft", "Unable to build Facebinder"))
_err(obj.Label + ": " + translate("draft", "Unable to build facebinder"))
def _report_face_error(self, obj):
_wrn(obj.Label + ": " + translate("draft", "No valid faces for Facebinder"))
_wrn(obj.Label + ": " + translate("draft", "No valid faces for facebinder"))
def _report_sew_error(self, obj):
_wrn(obj.Label + ": " + translate("draft", "Unable to build Facebinder, resuming with Sew disabled"))
_wrn(obj.Label + ": " + translate("draft", "Unable to build facebinder, resuming with sew disabled"))
def _build_shape(self, obj, faces, sew=False):
"""returns the built shape and the area of the offset faces"""
@@ -197,7 +197,7 @@ class Facebinder(DraftObject):
if solid.isValid():
return solid
_msg(obj.Label + ": " + translate("draft",
"Converting flat B-spline faces of Facebinder to planar faces failed"
"Converting flat B-spline faces of facebinder to planar faces failed"
))
return shp

View File

@@ -439,7 +439,7 @@ class PathArray(DraftLink):
w = self.get_wires(obj.PathObject, obj.PathSubelements)
if not w:
_err(obj.PathObject.Label
+ translate("draft",", path object doesn't have 'Edges'."))
+ translate("draft",", path object does not have 'Edges'."))
return
base_rotation = obj.Base.Shape.Placement.Rotation
@@ -652,7 +652,7 @@ def placements_on_path(shapeRotation, pathwire, count, xlate, align,
_wrn(
translate(
"draft",
"Start Offset too large for path length. Using zero instead."
"Start Offset too large for path length. Using 0 instead."
)
)
startOffset = 0
@@ -662,7 +662,7 @@ def placements_on_path(shapeRotation, pathwire, count, xlate, align,
_wrn(
translate(
"draft",
"End Offset too large for path length minus Start Offset. Using zero instead."
"End Offset too large for path length minus Start Offset. Using 0 instead."
)
)
endOffset = 0
@@ -789,7 +789,7 @@ def calculate_placement(globalRotation,
t = edge.tangentAt(get_parameter_from_v0(edge, offset))
if t.isEqual(nullv, tol):
_wrn(translate("draft", "Length of tangent vector is zero. Copy not aligned."))
_wrn(translate("draft", "Length of tangent vector is 0. Copy not aligned."))
return placement
if reversePath:
@@ -806,7 +806,7 @@ def calculate_placement(globalRotation,
if mode in ("Original", "Tangent"):
n = normal
if n.isEqual(nullv, tol):
_wrn(translate("draft", "Length of normal vector is zero. Using a default axis instead."))
_wrn(translate("draft", "Length of normal vector is 0. Using a default axis instead."))
n = t
else:
n_nor = n.normalize()
@@ -828,7 +828,7 @@ def calculate_placement(globalRotation,
n = normal
if n.isEqual(nullv, tol):
_wrn(translate("draft", "Length of normal vector is zero. Using a default axis instead."))
_wrn(translate("draft", "Length of normal vector is 0. Using a default axis instead."))
n = t
else:
n_nor = n.normalize()

View File

@@ -228,8 +228,8 @@ def build_placements(base_object, pt_list=None, placement=App.Placement()):
"""
if not pt_list:
_err(translate("Draft",
"Point object doesn't have a discrete point, "
"it cannot be used for an array."))
"Point object does not have a discrete point, "
"it cannot be used for an array"))
return []
pls = list()

View File

@@ -80,7 +80,7 @@ class TaskPanelCircularArray:
def __init__(self):
self.form = Gui.PySideUic.loadUi(":/ui/TaskPanel_CircularArray.ui")
self.form.setWindowTitle(translate("draft", "Circular array"))
self.form.setWindowTitle(translate("draft", "Circular Array"))
self.form.setWindowIcon(QtGui.QIcon(":/icons/Draft_CircularArray.svg"))
# -------------------------------------------------------------------
@@ -172,18 +172,18 @@ class TaskPanelCircularArray:
the interface may not allow one to input wrong data.
"""
if not selection:
_err(translate("draft","At least one element must be selected."))
_err(translate("draft","At least 1 element must be selected"))
return False
if number < 2:
_err(translate("draft","Number of layers must be at least 2."))
_err(translate("draft","Number of layers must be at least 2"))
return False
# TODO: this should handle multiple objects.
# Each of the elements of the selection should be tested.
obj = selection[0]
if obj.isDerivedFrom("App::FeaturePython"):
_err(translate("draft","Selection is not suitable for array."))
_err(translate("draft","Selection is not suitable for array"))
_err(translate("draft","Object:") + " {}".format(selection[0].Label))
return False
@@ -194,7 +194,7 @@ class TaskPanelCircularArray:
self.r_distance = abs(r_distance)
if tan_distance == 0:
_err(translate("draft","Tangential distance cannot be zero."))
_err(translate("draft","Tangential distance cannot be 0"))
return False
elif tan_distance < 0:
_wrn(translate("draft","Tangential distance is negative. It is made positive to proceed."))
@@ -254,7 +254,7 @@ class TaskPanelCircularArray:
"App.ActiveDocument.recompute()"]
# We commit the command list through the parent command
self.source_command.commit(translate("draft","Circular array"), _cmd_list)
self.source_command.commit(translate("draft","Create Circular Array"), _cmd_list)
def get_distances(self):
"""Get the distance parameters from the widgets."""

View File

@@ -80,7 +80,7 @@ class TaskPanelOrthoArray:
def __init__(self):
self.form = Gui.PySideUic.loadUi(":/ui/TaskPanel_OrthoArray.ui")
self.form.setWindowTitle(translate("draft", "Orthogonal array"))
self.form.setWindowTitle(translate("draft", "Orthogonal Array"))
self.form.setWindowIcon(QtGui.QIcon(":/icons/Draft_Array.svg"))
# -------------------------------------------------------------------
@@ -211,18 +211,18 @@ class TaskPanelOrthoArray:
the interface may not allow one to input wrong data.
"""
if not selection:
_err(translate("draft","At least one element must be selected."))
_err(translate("draft","At least 1 element must be selected"))
return False
if n_x < 1 or n_y < 1 or n_z < 1:
_err(translate("draft","Number of elements must be at least 1."))
_err(translate("draft","Number of elements must be at least 1"))
return False
# TODO: this should handle multiple objects.
# Each of the elements of the selection should be tested.
obj = selection[0]
if obj.isDerivedFrom("App::FeaturePython"):
_err(translate("draft","Selection is not suitable for array."))
_err(translate("draft","Selection is not suitable for array"))
_err(translate("draft","Object:") + " {0} ({1})".format(obj.Label, obj.TypeId))
return False
@@ -231,7 +231,7 @@ class TaskPanelOrthoArray:
if not (self.form.radiobutton_x_axis.isChecked() or
self.form.radiobutton_y_axis.isChecked() or
self.form.radiobutton_z_axis.isChecked()):
_err(translate("draft","In Linear mode, at least one axis must be selected."))
_err(translate("draft","In linear mode, at least 1 axis must be selected"))
return False
# The other arguments are not tested but they should be present.
@@ -301,7 +301,7 @@ class TaskPanelOrthoArray:
"App.ActiveDocument.recompute()"]
# We commit the command list through the parent command
self.source_command.commit(translate("draft","Orthogonal array"), _cmd_list)
self.source_command.commit(translate("draft","Create Orthogonal Array"), _cmd_list)
def get_numbers(self):
"""Get the number of elements from the widgets."""
@@ -377,7 +377,7 @@ class TaskPanelOrthoArray:
state = self.tr_true
else:
state = self.tr_false
_msg(translate("draft","Create Link array:") + " {}".format(state))
_msg(translate("draft","Create link array:") + " {}".format(state))
def set_link(self):
"""Execute as a callback when the link checkbox changes."""
@@ -424,7 +424,7 @@ class TaskPanelOrthoArray:
params.set_param("LinearModeOn" , self.linear_mode, "Mod/Draft/OrthoArrayLinearMode")
if self.linear_mode:
self.form.button_linear_mode.setText(translate("draft", "Switch to ortho mode"))
self.form.button_linear_mode.setText(translate("draft", "Switch to Ortho Mode"))
# check radiobutton based on current cfg
self.update_axis_ui()
@@ -440,7 +440,7 @@ class TaskPanelOrthoArray:
self.form.group_linearmode.show()
self.form.group_linearmode.setTitle(f"{self.active_axis} Axis")
else: # ortho mode
self.form.button_linear_mode.setText(translate("draft", "Switch to linear mode"))
self.form.button_linear_mode.setText(translate("draft", "Switch to Linear Mode"))
# For ortho mode we're showing back default groupboxes and we reparent everything
# back to them, as we reuse spinboxes in both modes

View File

@@ -80,7 +80,7 @@ class TaskPanelPolarArray:
def __init__(self):
self.form = Gui.PySideUic.loadUi(":/ui/TaskPanel_PolarArray.ui")
self.form.setWindowTitle(translate("draft", "Polar array"))
self.form.setWindowTitle(translate("draft", "Polar Array"))
self.form.setWindowIcon(QtGui.QIcon(":/icons/Draft_PolarArray.svg"))
# -------------------------------------------------------------------
@@ -157,19 +157,19 @@ class TaskPanelPolarArray:
the interface may not allow one to input wrong data.
"""
if not selection:
_err(translate("draft","At least one element must be selected."))
_err(translate("draft","At least 1 element must be selected"))
return False
# TODO: this should handle multiple objects.
# Each of the elements of the selection should be tested.
obj = selection[0]
if obj.isDerivedFrom("App::FeaturePython"):
_err(translate("draft","Selection is not suitable for array."))
_err(translate("draft","Selection is not suitable for array"))
_err(translate("draft","Object:") + " {}".format(selection[0].Label))
return False
if number < 2:
_err(translate("draft","Number of elements must be at least 2."))
_err(translate("draft","Number of elements must be at least 2"))
return False
if angle > 360:
@@ -228,7 +228,7 @@ class TaskPanelPolarArray:
"App.ActiveDocument.recompute()"]
# We commit the command list through the parent command
self.source_command.commit(translate("draft","Polar array"), _cmd_list)
self.source_command.commit(translate("draft","Create Polar Array"), _cmd_list)
def get_number_angle(self):
"""Get the number and angle parameters from the widgets."""
@@ -275,7 +275,7 @@ class TaskPanelPolarArray:
state = self.tr_true
else:
state = self.tr_false
_msg(translate("draft","Create Link array:") + " {}".format(state))
_msg(translate("draft","Create link array:") + " {}".format(state))
def set_link(self):
"""Execute as a callback when the link checkbox changes."""

View File

@@ -51,7 +51,7 @@ class ScaleTaskPanel:
self.form.setWindowIcon(QtGui.QIcon(":/icons/Draft_Scale.svg"))
layout = QtWidgets.QGridLayout(self.form)
self.xLabel = QtWidgets.QLabel()
self.xLabel.setText(translate("Draft", "X factor"))
self.xLabel.setText(translate("Draft", "X-factor"))
layout.addWidget(self.xLabel, 0, 0, 1, 1)
self.xValue = QtWidgets.QDoubleSpinBox()
self.xValue.setRange(-1000000.0, 1000000.0)
@@ -59,7 +59,7 @@ class ScaleTaskPanel:
self.xValue.setValue(1)
layout.addWidget(self.xValue,0,1,1,1)
self.yLabel = QtWidgets.QLabel()
self.yLabel.setText(translate("Draft", "Y factor"))
self.yLabel.setText(translate("Draft", "Y-factor"))
layout.addWidget(self.yLabel,1,0,1,1)
self.yValue = QtWidgets.QDoubleSpinBox()
self.yValue.setRange(-1000000.0, 1000000.0)
@@ -67,7 +67,7 @@ class ScaleTaskPanel:
self.yValue.setValue(1)
layout.addWidget(self.yValue,1,1,1,1)
self.zLabel = QtWidgets.QLabel()
self.zLabel.setText(translate("Draft", "Z factor"))
self.zLabel.setText(translate("Draft", "Z-factor"))
layout.addWidget(self.zLabel,2,0,1,1)
self.zValue = QtWidgets.QDoubleSpinBox()
self.zValue.setRange(-1000000.0, 1000000.0)
@@ -102,7 +102,7 @@ class ScaleTaskPanel:
self.isClone.setChecked(params.get_param("ScaleClone"))
layout.addWidget(self.isClone,7,0,1,2)
self.pickrefButton = QtWidgets.QPushButton()
self.pickrefButton.setText(translate("Draft", "Pick from/to points"))
self.pickrefButton.setText(translate("Draft", "Pick From/To Points"))
layout.addWidget(self.pickrefButton,8,0,1,2)
QtCore.QObject.connect(self.relative,QtCore.SIGNAL("toggled(bool)"),self.setRelative)
@@ -192,7 +192,7 @@ class ScaleTaskPanelEdit(ScaleTaskPanel):
self.selection = Gui.Selection.getSelectionEx("", 0)
self.obj = obj
self.obj_x, self.obj_y, self.obj_z = self.obj.Scale
self.form.setWindowTitle(translate("Draft", "Edit scale"))
self.form.setWindowTitle(translate("Draft", "Edit Scale"))
self.form.setWindowIcon(QtGui.QIcon(":/icons/Draft_Clone.svg"))
self.xValue.setValue(self.obj_x)
self.yValue.setValue(self.obj_y)

View File

@@ -149,7 +149,7 @@ def _set_scale(action):
scale_widget = sb.findChild(QtWidgets.QToolBar,"draft_scale_widget")
if action.text() == translate("draft", "Custom"):
title_text = translate("draft", "Set custom scale")
title_text = translate("draft", "Set Custom Scale")
dialog_text = translate("draft",
"Set custom annotation scale in format x:x, x=x")
custom_scale = QtWidgets.QInputDialog.getText(None, title_text, dialog_text)
@@ -184,7 +184,7 @@ def init_draft_statusbar_scale():
# prevent the widget from showing up in the toolbar area context menu:
scale_widget.toggleViewAction().setVisible(False)
scale_widget.setObjectName("draft_scale_widget")
text = translate("draft", "Draft scale widget",
text = translate("draft", "Draft Scale Widget",
"A context menu action used to show or hide this toolbar widget")
scale_widget.setWindowTitle(text)
@@ -246,7 +246,7 @@ def init_draft_statusbar_snap():
# prevent the widget from showing up in the toolbar area context menu:
snap_widget.toggleViewAction().setVisible(False)
snap_widget.setObjectName("draft_snap_widget")
text = translate("draft", "Draft snap widget",
text = translate("draft", "Draft Snap Widget",
"A context menu action used to show or hide this toolbar widget")
snap_widget.setWindowTitle(text)
snap_widget.setOrientation(QtCore.Qt.Orientation.Horizontal)

View File

@@ -509,19 +509,19 @@ class ViewProviderLayer:
def setupContextMenu(self, vobj, menu):
"""Set up actions to perform in the context menu."""
action_activate = QtGui.QAction(QtGui.QIcon(":/icons/button_right.svg"),
translate("draft", "Activate this layer"),
translate("draft", "Activate Layer"),
menu)
action_activate.triggered.connect(self.activate)
menu.addAction(action_activate)
action_reassign = QtGui.QAction(QtGui.QIcon(":/icons/Draft_Apply.svg"),
translate("draft", "Reassign properties of layer"),
translate("draft", "Reassign Properties of Layer"),
menu)
action_reassign.triggered.connect(self.reassign_props)
menu.addAction(action_reassign)
action_select = QtGui.QAction(QtGui.QIcon(":/icons/Draft_SelectGroup.svg"),
translate("draft", "Select layer contents"),
translate("draft", "Select Layer Contents"),
menu)
action_select.triggered.connect(self.select_contents)
menu.addAction(action_select)
@@ -563,19 +563,19 @@ class ViewProviderLayerContainer:
def setupContextMenu(self, vobj, menu):
"""Set up actions to perform in the context menu."""
action_add = QtGui.QAction(QtGui.QIcon(":/icons/Draft_NewLayer.svg"),
translate("draft", "Add new layer"),
translate("draft", "Add New Layer"),
menu)
action_add.triggered.connect(self.add_layer)
menu.addAction(action_add)
action_reassign = QtGui.QAction(QtGui.QIcon(":/icons/Draft_Apply.svg"),
translate("draft", "Reassign properties of all layers"),
translate("draft", "Reassign Properties of All Layers"),
menu)
action_reassign.triggered.connect(self.reassign_props)
menu.addAction(action_reassign)
action_merge = QtGui.QAction(QtGui.QIcon(":/icons/Draft_Layers.svg"),
translate("draft", "Merge layer duplicates"),
translate("draft", "Merge Layer Duplicates"),
menu)
action_merge.triggered.connect(self.merge_by_name)
menu.addAction(action_merge)
@@ -585,7 +585,7 @@ class ViewProviderLayerContainer:
import Draft
doc = App.ActiveDocument
doc.openTransaction(translate("draft", "Add new layer"))
doc.openTransaction(translate("draft", "Add New Layer"))
Draft.make_layer(name=None, line_color=None, shape_color=None,
line_width=None, draw_style=None, transparency=None)
@@ -601,7 +601,7 @@ class ViewProviderLayerContainer:
def merge_by_name(self):
"""Merge the layers that have the same base label."""
doc = App.ActiveDocument
doc.openTransaction(translate("draft", "Merge layer duplicates"))
doc.openTransaction(translate("draft", "Merge Layer Duplicates"))
layer_container = self.Object
layers = []

View File

@@ -89,10 +89,10 @@ class ViewProviderWorkingPlaneProxy:
return True
def setupContextMenu(self,vobj,menu):
action1 = QtGui.QAction(QtGui.QIcon(":/icons/Draft_SelectPlane.svg"),"Write camera position",menu)
action1 = QtGui.QAction(QtGui.QIcon(":/icons/Draft_SelectPlane.svg"),"Save Camera Position",menu)
QtCore.QObject.connect(action1,QtCore.SIGNAL("triggered()"),self.writeCamera)
menu.addAction(action1)
action2 = QtGui.QAction(QtGui.QIcon(":/icons/Draft_SelectPlane.svg"),"Write objects state",menu)
action2 = QtGui.QAction(QtGui.QIcon(":/icons/Draft_SelectPlane.svg"),"Save Visibility of Objects",menu)
QtCore.QObject.connect(action2,QtCore.SIGNAL("triggered()"),self.writeState)
menu.addAction(action2)