Skip to content

Commit

Permalink
fix processing plugin main translation and add translations
Browse files Browse the repository at this point in the history
for toplevel toolbox entries (fixes #12168)
  • Loading branch information
jef-n committed Feb 13, 2015
1 parent 0a51260 commit 4a44956
Show file tree
Hide file tree
Showing 10 changed files with 11 additions and 12 deletions.
2 changes: 1 addition & 1 deletion python/plugins/processing/ProcessingPlugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,4 +156,4 @@ def openConfig(self):
dlg.exec_()

def tr(self, message):
return QCoreApplication.translate('Processing', message)
return QCoreApplication.translate('ProcessingPlugin', message)
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ def scriptsFolder(self):
return os.path.dirname(__file__) + '/scripts'

def getDescription(self):
return 'GDAL/OGR'
return self.tr('GDAL/OGR')

def getName(self):
return 'gdalogr'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ def _loadAlgorithms(self):
self.algs = self.preloadedAlgs

def getDescription(self):
return 'GRASS commands'
return self.tr('GRASS commands')

def getName(self):
return 'grass'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ def _loadAlgorithms(self):
self.algs = self.preloadedAlgs

def getDescription(self):
return 'GRASS GIS 7 commands'
return self.tr('GRASS GIS 7 commands')

def getName(self):
return 'grass70'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ def getName(self):
return 'lidartools'

def getDescription(self):
return 'Tools for LiDAR data'
return self.tr('Tools for LiDAR data')

def getIcon(self):
return QIcon(os.path.dirname(__file__) + '/../../images/tool.png')
Expand Down
2 changes: 1 addition & 1 deletion python/plugins/processing/algs/otb/OTBAlgorithmProvider.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def __init__(self):


def getDescription(self):
return "Orfeo Toolbox (Image analysis)"
return self.tr("Orfeo Toolbox (Image analysis)")

def getName(self):
return "otb"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ def getName(self):
return 'qgis'

def getDescription(self):
return 'QGIS geoalgorithms'
return self.tr('QGIS geoalgorithms')

def getIcon(self):
return self._icon
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def __init__(self):
self.createAlgsList()

def getDescription(self):
return 'TauDEM (hydrologic analysis)'
return self.tr('TauDEM (hydrologic analysis)')

def getName(self):
return 'taudem'
Expand Down
4 changes: 2 additions & 2 deletions python/plugins/processing/gui/ProcessingToolbox.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

__revision__ = '$Format:%H$'

from PyQt4.QtCore import Qt, QSettings
from PyQt4.QtCore import Qt, QSettings, QCoreApplication
from PyQt4.QtGui import QDockWidget, QMenu, QAction, QTreeWidgetItem
from qgis.utils import iface
from processing.modeler.ModelerUtils import ModelerUtils
Expand Down Expand Up @@ -404,7 +404,7 @@ def populate(self):
groupItem.addChild(algItem)

self.setText(0, self.provider.getDescription()
+ ' [' + str(count) + ' geoalgorithms]')
+ QCoreApplication.translate( "TreeProviderItem", " [{0} geoalgorithms]" ).format( count ) )
self.setToolTip(0, self.text(0))
for groupItem in groups.values():
self.addChild(groupItem)
3 changes: 1 addition & 2 deletions scripts/update_ts_files.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@
# Note the .pro file must NOT be named qgis.pro as this
# name is reserved for the Windows qmake project file

echo "deprecated - use push_ts.sh and pull_ts.sh"
exit 1
echo "deprecated - use push_ts.sh and pull_ts.sh" >&2

set -e

Expand Down

0 comments on commit 4a44956

Please sign in to comment.