diff --git a/src/Mod/Path/PathScripts/PathDressupHoldingTags.py b/src/Mod/Path/PathScripts/PathDressupHoldingTags.py index cc83f0aec8..fdd9a37f04 100644 --- a/src/Mod/Path/PathScripts/PathDressupHoldingTags.py +++ b/src/Mod/Path/PathScripts/PathDressupHoldingTags.py @@ -141,7 +141,7 @@ class HoldingTagsPreferences: def __init__(self): self.form = FreeCADGui.PySideUic.loadUi(":/preferences/PathDressupHoldingTags.ui") - self.label = 'Holding Tags' + self.label = translate('PathDressup_HoldingTags', 'Holding Tags') def loadSettings(self): self.form.ifWidth.setText(FreeCAD.Units.Quantity(self.defaultWidth(0), FreeCAD.Units.Length).UserString) diff --git a/src/Mod/Path/PathScripts/PathPreferencesPathDressup.py b/src/Mod/Path/PathScripts/PathPreferencesPathDressup.py index 86fa52507f..a23b370e89 100644 --- a/src/Mod/Path/PathScripts/PathPreferencesPathDressup.py +++ b/src/Mod/Path/PathScripts/PathPreferencesPathDressup.py @@ -27,6 +27,18 @@ import FreeCADGui from PySide import QtCore, QtGui from PathScripts.PathPreferences import PathPreferences +# Qt tanslation handling +try: + _encoding = QtGui.QApplication.UnicodeUTF8 + + def translate(context, text, disambig=None): + return QtGui.QApplication.translate(context, text, disambig, _encoding) + +except AttributeError: + + def translate(context, text, disambig=None): + return QtGui.QApplication.translate(context, text, disambig) + _dressups = [] def RegisterDressup(dressup): @@ -34,9 +46,8 @@ def RegisterDressup(dressup): class DressupPreferencesPage: def __init__(self, parent=None): - print('dressup - __init__') self.form = QtGui.QToolBox() - self.form.setWindowTitle('Dressups') + self.form.setWindowTitle(translate('PathPreferencesPathDressup', 'Dressups')) pages = [] for dressup in _dressups: page = dressup.preferencesPage() @@ -48,12 +59,10 @@ class DressupPreferencesPage: self.pages = pages def saveSettings(self): - print('dressup - save settings') for page in self.pages: page.saveSettings() def loadSettings(self): - print('dressup - load settings') for page in self.pages: page.loadSettings()