Skip to content

Commit da91a9e

Browse files
author
radosuav
committed
Revert "Fix translations in Processing.py"
This reverts commit 81089a1.
1 parent 79f8841 commit da91a9e

1 file changed

Lines changed: 6 additions & 7 deletions

File tree

‎python/plugins/processing/core/Processing.py‎

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ def addProvider(provider, updateList=False):
9595
Processing.updateAlgsList()
9696
except:
9797
ProcessingLog.addToLog(ProcessingLog.LOG_ERROR,
98-
Processing.tr('Could not load provider: %s\n%s')
98+
self.tr('Could not load provider: %s\n%s')
9999
% (provider.getDescription(), unicode(sys.exc_info()[1])))
100100
Processing.removeProvider(provider)
101101

@@ -294,7 +294,7 @@ def runAlgorithm(algOrName, onFinish, *args):
294294
print 'Error: Wrong parameter value %s for parameter %s.' \
295295
% (value, name)
296296
ProcessingLog.addToLog(ProcessingLog.LOG_ERROR,
297-
Processing.tr('Error in %s. Wrong parameter value %s for parameter %s.') \
297+
self.tr('Error in %s. Wrong parameter value %s for parameter %s.') \
298298
% (alg.name, value, name))
299299
return
300300
# fill any missing parameters with default values if allowed
@@ -303,7 +303,7 @@ def runAlgorithm(algOrName, onFinish, *args):
303303
if not param.setValue(None):
304304
print ('Error: Missing parameter value for parameter %s.' % (param.name))
305305
ProcessingLog.addToLog(ProcessingLog.LOG_ERROR,
306-
Processing.tr('Error in %s. Missing parameter value for parameter %s.') \
306+
self.tr('Error in %s. Missing parameter value for parameter %s.') \
307307
% (alg.name, param.name))
308308
return
309309
else:
@@ -357,10 +357,9 @@ def runAlgorithm(algOrName, onFinish, *args):
357357
QApplication.restoreOverrideCursor()
358358
progress.close()
359359
return alg
360-
361-
@staticmethod
362-
def tr(string, context=''):
360+
361+
def tr(self, string, context=''):
363362
if context == '':
364363
context = 'Processing'
365-
return QCoreApplication.translate(context, string)
364+
return QtCore.QCoreApplication.translate(context, string)
366365

0 commit comments

Comments
 (0)