Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Revert "Fix translations in Processing.py"
This reverts commit 81089a1.
  • Loading branch information
radosuav committed Nov 18, 2014
1 parent 79f8841 commit da91a9e
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions python/plugins/processing/core/Processing.py
Expand Up @@ -95,7 +95,7 @@ def addProvider(provider, updateList=False):
Processing.updateAlgsList()
except:
ProcessingLog.addToLog(ProcessingLog.LOG_ERROR,
Processing.tr('Could not load provider: %s\n%s')
self.tr('Could not load provider: %s\n%s')
% (provider.getDescription(), unicode(sys.exc_info()[1])))
Processing.removeProvider(provider)

Expand Down Expand Up @@ -294,7 +294,7 @@ def runAlgorithm(algOrName, onFinish, *args):
print 'Error: Wrong parameter value %s for parameter %s.' \
% (value, name)
ProcessingLog.addToLog(ProcessingLog.LOG_ERROR,
Processing.tr('Error in %s. Wrong parameter value %s for parameter %s.') \
self.tr('Error in %s. Wrong parameter value %s for parameter %s.') \
% (alg.name, value, name))
return
# fill any missing parameters with default values if allowed
Expand All @@ -303,7 +303,7 @@ def runAlgorithm(algOrName, onFinish, *args):
if not param.setValue(None):
print ('Error: Missing parameter value for parameter %s.' % (param.name))
ProcessingLog.addToLog(ProcessingLog.LOG_ERROR,
Processing.tr('Error in %s. Missing parameter value for parameter %s.') \
self.tr('Error in %s. Missing parameter value for parameter %s.') \
% (alg.name, param.name))
return
else:
Expand Down Expand Up @@ -357,10 +357,9 @@ def runAlgorithm(algOrName, onFinish, *args):
QApplication.restoreOverrideCursor()
progress.close()
return alg

@staticmethod
def tr(string, context=''):

def tr(self, string, context=''):
if context == '':
context = 'Processing'
return QCoreApplication.translate(context, string)
return QtCore.QCoreApplication.translate(context, string)

0 comments on commit da91a9e

Please sign in to comment.