Skip to content

Commit 64d5193

Browse files
ajolmanyalldawson
authored andcommitted
Translation fixes for GDAL build VRT.
1 parent 3fff872 commit 64d5193

2 files changed

Lines changed: 9 additions & 8 deletions

File tree

‎python/plugins/processing/algs/gdal/buildvrt.py‎

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727

2828
import os
2929

30+
from qgis.PyQt.QtCore import QCoreApplication
3031
from qgis.PyQt.QtGui import QIcon
3132

3233
from qgis.core import (QgsProcessing,
@@ -74,31 +75,31 @@ def defaultFileExtension(self):
7475
return 'vrt'
7576

7677
self.addParameter(QgsProcessingParameterMultipleLayers(self.INPUT,
77-
self.tr('Input layers'),
78+
QCoreApplication.translate("ParameterVrtDestination", 'Input layers'),
7879
QgsProcessing.TypeRaster))
7980
self.addParameter(QgsProcessingParameterEnum(self.RESOLUTION,
80-
self.tr('Resolution'),
81+
QCoreApplication.translate("ParameterVrtDestination", 'Resolution'),
8182
options=self.RESOLUTION_OPTIONS,
8283
defaultValue=0))
8384
self.addParameter(QgsProcessingParameterBoolean(self.SEPARATE,
84-
self.tr('Layer stack'),
85+
QCoreApplication.translate("ParameterVrtDestination", 'Layer stack'),
8586
defaultValue=True))
8687
self.addParameter(QgsProcessingParameterBoolean(self.PROJ_DIFFERENCE,
87-
self.tr('Allow projection difference'),
88+
QCoreApplication.translate("ParameterVrtDestination", 'Allow projection difference'),
8889
defaultValue=False))
89-
self.addParameter(ParameterVrtDestination(self.OUTPUT, self.tr('Virtual')))
90+
self.addParameter(ParameterVrtDestination(self.OUTPUT, QCoreApplication.translate("ParameterVrtDestination", 'Virtual')))
9091

9192
def name(self):
9293
return 'buildvirtualraster'
9394

9495
def displayName(self):
95-
return self.tr('Build Virtual Raster')
96+
return QCoreApplication.translate("buildvrt", 'Build Virtual Raster')
9697

9798
def icon(self):
9899
return QIcon(os.path.join(pluginPath, 'images', 'gdaltools', 'vrt.png'))
99100

100101
def group(self):
101-
return self.tr('Raster miscellaneous')
102+
return QCoreApplication.translate("buildvrt", 'Raster miscellaneous')
102103

103104
def groupId(self):
104105
return 'rastermiscellaneous'

‎python/plugins/processing/gui/ParametersPanel.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ def initWidgets(self):
164164
self.layoutMain.insertWidget(self.layoutMain.count() - 1, widget)
165165
if isinstance(output, (QgsProcessingParameterRasterDestination, QgsProcessingParameterFeatureSink, QgsProcessingParameterVectorDestination)):
166166
check = QCheckBox()
167-
check.setText(self.tr('Open output file after running algorithm'))
167+
check.setText(QCoreApplication.translate('ParametersPanel', 'Open output file after running algorithm'))
168168

169169
def skipOutputChanged(checkbox, skipped):
170170
checkbox.setEnabled(not skipped)

0 commit comments

Comments
 (0)