Make some context menu actions translatable (#20401)
* Make some context menu actions translatable * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
@@ -184,8 +184,9 @@ 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")
|
||||
# WindowTitle is just in case, should not be visible in the GUI.
|
||||
scale_widget.setWindowTitle(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)
|
||||
|
||||
# get scales list according to system units
|
||||
draft_scales = get_scales()
|
||||
@@ -245,8 +246,9 @@ 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")
|
||||
# WindowTitle is just in case, should not be visible in the GUI.
|
||||
snap_widget.setWindowTitle(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)
|
||||
snap_widget.setIconSize(QtCore.QSize(16, 16))
|
||||
sb.insertPermanentWidget(2, snap_widget)
|
||||
|
||||
Reference in New Issue
Block a user