Skip to content
Permalink
Browse files

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

…in (followup 6e2288d)

(cherry picked from commit ad4d0a1)
  • Loading branch information
jef-n committed Mar 9, 2018
1 parent 2e9aa6d commit dd5e96393f02084053ac664366bf8dcd2ed3efff
Showing with 6 additions and 6 deletions.
  1. +6 −6 python/plugins/processing/modeler/ModelerDialog.py
@@ -325,7 +325,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)
@@ -396,7 +396,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):
@@ -424,7 +424,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):
@@ -452,7 +452,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):
@@ -469,7 +469,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() == '' \
@@ -503,7 +503,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 dd5e963

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