Skip to content

Commit

Permalink
processing: fix translation context for AlgorithmDialogBase
Browse files Browse the repository at this point in the history
  • Loading branch information
jef-n committed Feb 14, 2016
1 parent 5d989ab commit 6a3753e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions python/plugins/processing/algs/gdal/GdalAlgorithmDialog.py
Expand Up @@ -99,11 +99,11 @@ def parametersHaveChanged(self):
self.parent.setParamValues()
for output in self.alg.outputs:
if output.value is None:
output.value = "[temporary file]"
output.value = self.tr("[temporary file]")
commands = self.alg.getConsoleCommands()
commands = [c for c in commands if c not in ['cmd.exe', '/C ']]
self.text.setPlainText(" ".join(commands))
except AlgorithmDialogBase.InvalidParameterValue as e:
self.text.setPlainText("Invalid value for parameter '%s'" % e.parameter.description)
self.text.setPlainText(self.tr("Invalid value for parameter '%s'") % e.parameter.description)
except:
self.text.setPlainText("")
10 changes: 5 additions & 5 deletions python/plugins/processing/gui/AlgorithmDialogBase.py
Expand Up @@ -45,11 +45,6 @@

class AlgorithmDialogBase(BASE, WIDGET):

class InvalidParameterValue(Exception):

def __init__(self, param, widget):
(self.parameter, self.widget) = (param, widget)

def __init__(self, alg):
super(AlgorithmDialogBase, self).__init__(iface.mainWindow())
self.setupUi(self)
Expand Down Expand Up @@ -175,3 +170,8 @@ def accept(self):

def finish(self):
pass

class InvalidParameterValue(Exception):

def __init__(self, param, widget):
(self.parameter, self.widget) = (param, widget)

0 comments on commit 6a3753e

Please sign in to comment.