Replaced default context argument with explicit call for pylupdate to pick up the strings and contexts.

This commit is contained in:
Markus Lampert
2017-06-03 12:12:27 -07:00
parent 57fed76be7
commit af699ab7e2
32 changed files with 110 additions and 125 deletions

View File

@@ -46,7 +46,7 @@ if FreeCAD.GuiUp:
"""Path Job object and FreeCAD command"""
# Qt tanslation handling
def translate(text, context = "Path_Job", disambig=None):
def translate(context, text, disambig=None):
return QtCore.QCoreApplication.translate(context, text, disambig)
class ObjectPathJob:
@@ -176,7 +176,7 @@ class CommandJob:
@staticmethod
def Create():
FreeCAD.ActiveDocument.openTransaction(translate("Create Job"))
FreeCAD.ActiveDocument.openTransaction(translate("Path_Job", "Create Job"))
FreeCADGui.addModule('PathScripts.PathUtils')
FreeCADGui.addModule('PathScripts.PathLoadTool')
snippet = '''
@@ -193,7 +193,7 @@ obj.ViewObject.startEditing()
class TaskPanel:
def __init__(self, obj, deleteOnReject):
FreeCAD.ActiveDocument.openTransaction(translate("Edit Job"))
FreeCAD.ActiveDocument.openTransaction(translate("Path_Job", "Edit Job"))
self.obj = obj
self.deleteOnReject = deleteOnReject
self.form = FreeCADGui.PySideUic.loadUi(":/panels/JobEdit.ui")
@@ -227,7 +227,7 @@ class TaskPanel:
FreeCADGui.Control.closeDialog()
FreeCAD.ActiveDocument.abortTransaction()
if self.deleteOnReject:
FreeCAD.ActiveDocument.openTransaction(translate("Uncreate Job"))
FreeCAD.ActiveDocument.openTransaction(translate("Path_Job", "Uncreate Job"))
for child in self.obj.Group:
FreeCAD.ActiveDocument.removeObject(child.Name)
FreeCAD.ActiveDocument.removeObject(self.obj.Name)
@@ -309,7 +309,7 @@ class TaskPanel:
pass
def setFile(self):
filename = QtGui.QFileDialog.getSaveFileName(self.form, translate("Select Output File"), None, translate("All Files (*.*)"))
filename = QtGui.QFileDialog.getSaveFileName(self.form, translate("Path_Job", "Select Output File"), None, translate("Path_Job", "All Files (*.*)"))
if filename and filename[0]:
self.obj.PostProcessorOutputFile = str(filename[0])
self.setFields()