translation cleanup misc files

This commit is contained in:
sliptonic
2022-01-24 15:39:11 -06:00
parent 1683a7292d
commit fc0963687b
4 changed files with 59 additions and 45 deletions

View File

@@ -20,26 +20,28 @@
# * *
# ***************************************************************************
import FreeCAD
from PySide import QtCore, QtGui
# Qt translation handling
def translate(context, text, disambig=None):
return QtCore.QCoreApplication.translate(context, text, disambig)
translate = FreeCAD.Qt.translate
_dressups = []
def RegisterDressup(dressup):
_dressups.append(dressup)
class DressupPreferencesPage:
def __init__(self, parent=None):
# pylint: disable=unused-argument
self.form = QtGui.QToolBox()
self.form.setWindowTitle(translate("Path_PreferencesPathDressup", 'Dressups'))
self.form.setWindowTitle(translate("Path_PreferencesPathDressup", "Dressups"))
pages = []
for dressup in _dressups:
page = dressup.preferencesPage()
if hasattr(page, 'icon') and page.icon:
if hasattr(page, "icon") and page.icon:
self.form.addItem(page.form, page.icon, page.label)
else:
self.form.addItem(page.form, page.label)
@@ -53,4 +55,3 @@ class DressupPreferencesPage:
def loadSettings(self):
for page in self.pages:
page.loadSettings()

View File

@@ -25,28 +25,31 @@ import FreeCAD
import PathScripts.PathOpGui as PathOpGui
import PathScripts.PathProfile as PathProfile
import PathScripts.PathProfileGui as PathProfileGui
from PySide import QtCore
from PySide.QtCore import QT_TRANSLATE_NOOP
__title__ = "Path Contour Operation UI (depreciated)"
__author__ = "sliptonic (Brad Collette)"
__url__ = "https://www.freecadweb.org"
__doc__ = "Contour operation page controller and command implementation (depreciated)."
__doc__ = "Contour operation page controller and command implementation (deprecated)."
class TaskPanelOpPage(PathProfileGui.TaskPanelOpPage):
'''Psuedo page controller class for Profile operation,
allowing for backward compatibility with pre-existing "Contour" operations.'''
"""Psuedo page controller class for Profile operation,
allowing for backward compatibility with pre-existing "Contour" operations."""
pass
# Eclass
Command = PathOpGui.SetupOperation('Profile',
PathProfile.Create,
TaskPanelOpPage,
'Path_Contour',
QtCore.QT_TRANSLATE_NOOP("Path_Profile", "Profile"),
QtCore.QT_TRANSLATE_NOOP("Path_Profile", "Profile entire model, selected face(s) or selected edge(s)"),
PathProfile.SetupProperties)
Command = PathOpGui.SetupOperation(
"Profile",
PathProfile.Create,
TaskPanelOpPage,
"Path_Contour",
QT_TRANSLATE_NOOP("Path_Profile", "Profile"),
QT_TRANSLATE_NOOP(
"Path_Profile", "Profile entire model, selected face(s) or selected edge(s)"
),
PathProfile.SetupProperties,
)
FreeCAD.Console.PrintLog("Loading PathProfileContourGui... done\n")

View File

@@ -25,28 +25,33 @@ import FreeCAD
import PathScripts.PathOpGui as PathOpGui
import PathScripts.PathProfile as PathProfile
import PathScripts.PathProfileGui as PathProfileGui
from PySide import QtCore
from PySide.QtCore import QT_TRANSLATE_NOOP
__title__ = "Path Profile Edges Operation UI (depreciated)"
__author__ = "sliptonic (Brad Collette)"
__url__ = "https://www.freecadweb.org"
__doc__ = "Profile Edges operation page controller and command implementation (depreciated)."
__doc__ = (
"Profile Edges operation page controller and command implementation (deprecated)."
)
class TaskPanelOpPage(PathProfileGui.TaskPanelOpPage):
'''Psuedo page controller class for Profile operation,
allowing for backward compatibility with pre-existing "Profile Edges" operations.'''
"""Psuedo page controller class for Profile operation,
allowing for backward compatibility with pre-existing "Profile Edges" operations."""
pass
# Eclass
Command = PathOpGui.SetupOperation('Profile',
PathProfile.Create,
TaskPanelOpPage,
'Path_Contour',
QtCore.QT_TRANSLATE_NOOP("Path_Profile", "Profile"),
QtCore.QT_TRANSLATE_NOOP("Path_Profile", "Profile entire model, selected face(s) or selected edge(s)"),
PathProfile.SetupProperties)
Command = PathOpGui.SetupOperation(
"Profile",
PathProfile.Create,
TaskPanelOpPage,
"Path_Contour",
QT_TRANSLATE_NOOP("Path_Profile", "Profile"),
QT_TRANSLATE_NOOP(
"Path_Profile", "Profile entire model, selected face(s) or selected edge(s)"
),
PathProfile.SetupProperties,
)
FreeCAD.Console.PrintLog("Loading PathProfileEdgesGui... done\n")

View File

@@ -25,28 +25,33 @@ import FreeCAD
import PathScripts.PathOpGui as PathOpGui
import PathScripts.PathProfile as PathProfile
import PathScripts.PathProfileGui as PathProfileGui
from PySide import QtCore
from PySide.QtCore import QT_TRANSLATE_NOOP
__title__ = "Path Profile Faces Operation UI (depreciated)"
__author__ = "sliptonic (Brad Collette)"
__url__ = "https://www.freecadweb.org"
__doc__ = "Profile Faces operation page controller and command implementation (depreciated)."
__doc__ = (
"Profile Faces operation page controller and command implementation (deprecated)."
)
class TaskPanelOpPage(PathProfileGui.TaskPanelOpPage):
'''Psuedo page controller class for Profile operation,
allowing for backward compatibility with pre-existing "Profile Faces" operations.'''
"""Psuedo page controller class for Profile operation,
allowing for backward compatibility with pre-existing "Profile Faces" operations."""
pass
# Eclass
Command = PathOpGui.SetupOperation('Profile',
PathProfile.Create,
TaskPanelOpPage,
'Path_Contour',
QtCore.QT_TRANSLATE_NOOP("Path_Profile", "Profile"),
QtCore.QT_TRANSLATE_NOOP("Path_Profile", "Profile entire model, selected face(s) or selected edge(s)"),
PathProfile.SetupProperties)
Command = PathOpGui.SetupOperation(
"Profile",
PathProfile.Create,
TaskPanelOpPage,
"Path_Contour",
QT_TRANSLATE_NOOP("Path_Profile", "Profile"),
QT_TRANSLATE_NOOP(
"Path_Profile", "Profile entire model, selected face(s) or selected edge(s)"
),
PathProfile.SetupProperties,
)
FreeCAD.Console.PrintLog("Loading PathProfileFacesGui... done\n")