Skip to content
Permalink
Browse files

processing: make error messages moved to message bar translatable aga…

…in (followup 6e2288d)
  • Loading branch information
jef-n committed Mar 9, 2018
1 parent e1f5c3f commit ad4d0a17d5e5f3a69933077876ec1f75fe6b5d4d
Showing with 6 additions and 6 deletions.
  1. +6 −6 python/plugins/processing/modeler/ModelerDialog.py
@@ -328,7 +328,7 @@ def editHelp(self):

def runModel(self):
if len(self.model.childAlgorithms()) == 0:
self.bar.pushMessage("", "Model doesn't contain any algorithm and/or parameter and can't be executed", level=Qgis.Warning, duration=5)
self.bar.pushMessage("", self.tr("Model doesn't contain any algorithm and/or parameter and can't be executed"), level=Qgis.Warning, duration=5)
return

dlg = AlgorithmDialog(self.model)
@@ -399,7 +399,7 @@ def exportAsImage(self):

img.save(filename)

self.bar.pushMessage("", "Model was correctly exported as image", level=Qgis.Success, duration=5)
self.bar.pushMessage("", self.tr("Model was correctly exported as image"), level=Qgis.Success, duration=5)
self.repaintModel(controls=True)

def exportAsPdf(self):
@@ -427,7 +427,7 @@ def exportAsPdf(self):
self.scene.render(painter, printerRect, totalRect)
painter.end()

self.bar.pushMessage("", "Model was correctly exported as PDF", level=Qgis.Success, duration=5)
self.bar.pushMessage("", self.tr("Model was correctly exported as PDF"), level=Qgis.Success, duration=5)
self.repaintModel(controls=True)

def exportAsSvg(self):
@@ -455,7 +455,7 @@ def exportAsSvg(self):
self.scene.render(painter, svgRect, totalRect)
painter.end()

self.bar.pushMessage("", "Model was correctly exported as SVG", level=Qgis.Success, duration=5)
self.bar.pushMessage("", self.tr("Model was correctly exported as SVG"), level=Qgis.Success, duration=5)
self.repaintModel(controls=True)

def exportAsPython(self):
@@ -472,7 +472,7 @@ def exportAsPython(self):
with codecs.open(filename, 'w', encoding='utf-8') as fout:
fout.write(text)

self.bar.pushMessage("", "Model was correctly exported as python script", level=Qgis.Success, duration=5)
self.bar.pushMessage("", self.tr("Model was correctly exported as python script"), level=Qgis.Success, duration=5)

def saveModel(self, saveAs):
if str(self.textGroup.text()).strip() == '' \
@@ -506,7 +506,7 @@ def saveModel(self, saveAs):
)
return
self.update_model.emit()
self.bar.pushMessage("", "Model was correctly saved", level=Qgis.Success, duration=5)
self.bar.pushMessage("", self.tr("Model was correctly saved"), level=Qgis.Success, duration=5)

self.hasChanged = False

0 comments on commit ad4d0a1

Please sign in to comment.
You can’t perform that action at this time.