Skip to content

Commit

Permalink
Make modeler text translatable
Browse files Browse the repository at this point in the history
  • Loading branch information
m-kuhn committed Apr 5, 2018
1 parent 0aa8241 commit 7c191a4
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions python/plugins/processing/modeler/ModelerParametersDialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,6 @@


class ModelerParametersDialog(QDialog):
ENTER_NAME = '[Enter name if this is a final result]'
NOT_SELECTED = '[Not selected]'
USE_MIN_COVERING_EXTENT = '[Use min covering extent]'

def __init__(self, alg, model, algName=None):
QDialog.__init__(self)
self.setModal(True)
Expand Down Expand Up @@ -157,7 +153,7 @@ def setupUi(self):
label = QLabel(dest.description())
item = QgsFilterLineEdit()
if hasattr(item, 'setPlaceholderText'):
item.setPlaceholderText(ModelerParametersDialog.ENTER_NAME)
item.setPlaceholderText(self.tr('[Enter name if this is a final result]'))
self.verticalLayout.addWidget(label)
self.verticalLayout.addWidget(item)
self.valueItems[dest.name()] = item
Expand Down Expand Up @@ -320,7 +316,7 @@ def createAlgorithm(self):
for dest in self._alg.destinationParameterDefinitions():
if not dest.flags() & QgsProcessingParameterDefinition.FlagHidden:
name = str(self.valueItems[dest.name()].text())
if name.strip() != '' and name != ModelerParametersDialog.ENTER_NAME:
if name.strip() != '':
output = QgsProcessingModelOutput(name, name)
output.setChildId(alg.childId())
output.setChildOutputName(dest.name())
Expand Down

0 comments on commit 7c191a4

Please sign in to comment.