|
27 | 27 |
|
28 | 28 | import os |
29 | 29 |
|
| 30 | +from qgis.PyQt.QtCore import QCoreApplication |
30 | 31 | from qgis.PyQt.QtGui import QIcon |
31 | 32 |
|
32 | 33 | from qgis.core import (QgsProcessing, |
@@ -74,31 +75,31 @@ def defaultFileExtension(self): |
74 | 75 | return 'vrt' |
75 | 76 |
|
76 | 77 | self.addParameter(QgsProcessingParameterMultipleLayers(self.INPUT, |
77 | | - self.tr('Input layers'), |
| 78 | + QCoreApplication.translate("ParameterVrtDestination", 'Input layers'), |
78 | 79 | QgsProcessing.TypeRaster)) |
79 | 80 | self.addParameter(QgsProcessingParameterEnum(self.RESOLUTION, |
80 | | - self.tr('Resolution'), |
| 81 | + QCoreApplication.translate("ParameterVrtDestination", 'Resolution'), |
81 | 82 | options=self.RESOLUTION_OPTIONS, |
82 | 83 | defaultValue=0)) |
83 | 84 | self.addParameter(QgsProcessingParameterBoolean(self.SEPARATE, |
84 | | - self.tr('Layer stack'), |
| 85 | + QCoreApplication.translate("ParameterVrtDestination", 'Layer stack'), |
85 | 86 | defaultValue=True)) |
86 | 87 | self.addParameter(QgsProcessingParameterBoolean(self.PROJ_DIFFERENCE, |
87 | | - self.tr('Allow projection difference'), |
| 88 | + QCoreApplication.translate("ParameterVrtDestination", 'Allow projection difference'), |
88 | 89 | defaultValue=False)) |
89 | | - self.addParameter(ParameterVrtDestination(self.OUTPUT, self.tr('Virtual'))) |
| 90 | + self.addParameter(ParameterVrtDestination(self.OUTPUT, QCoreApplication.translate("ParameterVrtDestination", 'Virtual'))) |
90 | 91 |
|
91 | 92 | def name(self): |
92 | 93 | return 'buildvirtualraster' |
93 | 94 |
|
94 | 95 | def displayName(self): |
95 | | - return self.tr('Build Virtual Raster') |
| 96 | + return QCoreApplication.translate("buildvrt", 'Build Virtual Raster') |
96 | 97 |
|
97 | 98 | def icon(self): |
98 | 99 | return QIcon(os.path.join(pluginPath, 'images', 'gdaltools', 'vrt.png')) |
99 | 100 |
|
100 | 101 | def group(self): |
101 | | - return self.tr('Raster miscellaneous') |
| 102 | + return QCoreApplication.translate("buildvrt", 'Raster miscellaneous') |
102 | 103 |
|
103 | 104 | def groupId(self): |
104 | 105 | return 'rastermiscellaneous' |
|
0 commit comments