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()