fix processing plugin main translation and add translations

for toplevel toolbox entries (fixes #12168)
This commit is contained in:
Juergen E. Fischer 2015-02-13 19:48:17 +01:00
parent 0a5126052a
commit 4a44956222
10 changed files with 11 additions and 12 deletions

View File

@ -156,4 +156,4 @@ class ProcessingPlugin:
dlg.exec_()
def tr(self, message):
return QCoreApplication.translate('Processing', message)
return QCoreApplication.translate('ProcessingPlugin', message)

View File

@ -100,7 +100,7 @@ class GdalOgrAlgorithmProvider(AlgorithmProvider):
return os.path.dirname(__file__) + '/scripts'
def getDescription(self):
return 'GDAL/OGR'
return self.tr('GDAL/OGR')
def getName(self):
return 'gdalogr'

View File

@ -88,7 +88,7 @@ class GrassAlgorithmProvider(AlgorithmProvider):
self.algs = self.preloadedAlgs
def getDescription(self):
return 'GRASS commands'
return self.tr('GRASS commands')
def getName(self):
return 'grass'

View File

@ -93,7 +93,7 @@ class Grass7AlgorithmProvider(AlgorithmProvider):
self.algs = self.preloadedAlgs
def getDescription(self):
return 'GRASS GIS 7 commands'
return self.tr('GRASS GIS 7 commands')
def getName(self):
return 'grass70'

View File

@ -223,7 +223,7 @@ class LidarToolsAlgorithmProvider(AlgorithmProvider):
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')

View File

@ -45,7 +45,7 @@ class OTBAlgorithmProvider(AlgorithmProvider):
def getDescription(self):
return "Orfeo Toolbox (Image analysis)"
return self.tr("Orfeo Toolbox (Image analysis)")
def getName(self):
return "otb"

View File

@ -207,7 +207,7 @@ class QGISAlgorithmProvider(AlgorithmProvider):
return 'qgis'
def getDescription(self):
return 'QGIS geoalgorithms'
return self.tr('QGIS geoalgorithms')
def getIcon(self):
return self._icon

View File

@ -54,7 +54,7 @@ class TauDEMAlgorithmProvider(AlgorithmProvider):
self.createAlgsList()
def getDescription(self):
return 'TauDEM (hydrologic analysis)'
return self.tr('TauDEM (hydrologic analysis)')
def getName(self):
return 'taudem'

View File

@ -26,7 +26,7 @@ __copyright__ = '(C) 2012, Victor Olaya'
__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
@ -404,7 +404,7 @@ class TreeProviderItem(QTreeWidgetItem):
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)

View File

@ -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