mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-25 00:58:06 -05:00
fix translation strings
This commit is contained in:
parent
0481666b77
commit
9a3bfa01c2
@ -27,7 +27,7 @@ __revision__ = '$Format:%H$'
|
||||
|
||||
import os
|
||||
|
||||
from qgis.PyQt.QtCore import pyqtSignal
|
||||
from qgis.PyQt.QtCore import pyqtSignal, QCoreApplication
|
||||
from qgis.PyQt.QtWidgets import QWidget, QHBoxLayout, QMenu, QPushButton, QLineEdit, QSizePolicy, QAction, QFileDialog
|
||||
from qgis.PyQt.QtGui import QCursor
|
||||
|
||||
@ -87,12 +87,12 @@ class BatchInputSelectionPanel(QWidget):
|
||||
if not (isinstance(self.param, QgsProcessingParameterMultipleLayers) and
|
||||
self.param.layerType == dataobjects.TYPE_FILE):
|
||||
selectLayerAction = QAction(
|
||||
self.tr('Select from Open Layers…'), self.pushButton)
|
||||
QCoreApplication.translate('BatchInputSelectionPanel', 'Select from Open Layers…'), self.pushButton)
|
||||
selectLayerAction.triggered.connect(self.showLayerSelectionDialog)
|
||||
popupmenu.addAction(selectLayerAction)
|
||||
|
||||
selectFileAction = QAction(
|
||||
self.tr('Select from File System…'), self.pushButton)
|
||||
QCoreApplication.translate('BatchInputSelectionPanel', 'Select from File System…'), self.pushButton)
|
||||
selectFileAction.triggered.connect(self.showFileSelectionDialog)
|
||||
popupmenu.addAction(selectFileAction)
|
||||
|
||||
|
@ -232,19 +232,19 @@ class ProcessingToolbox(QgsDockWidget, WIDGET):
|
||||
popupmenu = QMenu()
|
||||
if isinstance(item, TreeAlgorithmItem):
|
||||
alg = item.alg
|
||||
executeAction = QAction(self.tr('Execute…'), self.algorithmTree)
|
||||
executeAction = QAction(QCoreApplication.translate('ProcessingToolbox', 'Execute…'), self.algorithmTree)
|
||||
executeAction.triggered.connect(self.executeAlgorithm)
|
||||
popupmenu.addAction(executeAction)
|
||||
if alg.flags() & QgsProcessingAlgorithm.FlagSupportsBatch:
|
||||
executeBatchAction = QAction(
|
||||
self.tr('Execute as Batch Process…'),
|
||||
QCoreApplication.translate('ProcessingToolbox', 'Execute as Batch Process…'),
|
||||
self.algorithmTree)
|
||||
executeBatchAction.triggered.connect(
|
||||
self.executeAlgorithmAsBatchProcess)
|
||||
popupmenu.addAction(executeBatchAction)
|
||||
popupmenu.addSeparator()
|
||||
editRenderingStylesAction = QAction(
|
||||
self.tr('Edit Rendering Styles for Outputs…'),
|
||||
QCoreApplication.translate('ProcessingToolbox', 'Edit Rendering Styles for Outputs…'),
|
||||
self.algorithmTree)
|
||||
editRenderingStylesAction.triggered.connect(
|
||||
self.editRenderingStyles)
|
||||
|
@ -28,7 +28,7 @@ __revision__ = '$Format:%H$'
|
||||
import os
|
||||
import shutil
|
||||
from qgis.PyQt.QtWidgets import QFileDialog, QMessageBox
|
||||
from qgis.PyQt.QtCore import QFileInfo
|
||||
from qgis.PyQt.QtCore import QFileInfo, QCoreApplication
|
||||
|
||||
from qgis.core import QgsApplication, QgsSettings, QgsProcessingModelAlgorithm
|
||||
|
||||
@ -42,7 +42,7 @@ pluginPath = os.path.split(os.path.dirname(__file__))[0]
|
||||
class AddModelFromFileAction(ToolboxAction):
|
||||
|
||||
def __init__(self):
|
||||
self.name = self.tr('Add Model from File…')
|
||||
self.name = QCoreApplication.translate('AddModelFromFileAction', 'Add Model from File…')
|
||||
self.group = self.tr('Tools')
|
||||
|
||||
def getIcon(self):
|
||||
|
@ -27,6 +27,8 @@ __revision__ = '$Format:%H$'
|
||||
|
||||
import os
|
||||
|
||||
from qgis.PyQt.QtCore import QCoreApplication
|
||||
|
||||
from qgis.core import QgsApplication
|
||||
|
||||
from processing.gui.ToolboxAction import ToolboxAction
|
||||
@ -38,7 +40,7 @@ pluginPath = os.path.split(os.path.dirname(__file__))[0]
|
||||
class CreateNewModelAction(ToolboxAction):
|
||||
|
||||
def __init__(self):
|
||||
self.name = self.tr('Create New Model…')
|
||||
self.name = QCoreApplication.translate('CreateNewModelAction', 'Create New Model…')
|
||||
self.group = self.tr('Tools')
|
||||
|
||||
def getIcon(self):
|
||||
|
@ -28,13 +28,14 @@ __revision__ = '$Format:%H$'
|
||||
import os
|
||||
from qgis.core import QgsApplication, QgsProcessingModelAlgorithm
|
||||
from qgis.PyQt.QtWidgets import QMessageBox
|
||||
from qgis.PyQt.QtCore import QCoreApplication
|
||||
from processing.gui.ContextAction import ContextAction
|
||||
|
||||
|
||||
class DeleteModelAction(ContextAction):
|
||||
|
||||
def __init__(self):
|
||||
self.name = self.tr('Delete Model…', 'DeleteModelAction')
|
||||
self.name = QCoreApplication.translate('DeleteModelAction', 'Delete Model…')
|
||||
|
||||
def isEnabled(self):
|
||||
return isinstance(self.itemData, QgsProcessingModelAlgorithm)
|
||||
|
@ -25,6 +25,7 @@ __copyright__ = '(C) 2012, Victor Olaya'
|
||||
|
||||
__revision__ = '$Format:%H$'
|
||||
|
||||
from qgis.PyQt.QtCore import QCoreApplication
|
||||
from qgis.core import QgsApplication, QgsProcessingModelAlgorithm
|
||||
from processing.gui.ContextAction import ContextAction
|
||||
from processing.modeler.ModelerDialog import ModelerDialog
|
||||
@ -33,7 +34,7 @@ from processing.modeler.ModelerDialog import ModelerDialog
|
||||
class EditModelAction(ContextAction):
|
||||
|
||||
def __init__(self):
|
||||
self.name = self.tr('Edit Model…', 'EditModelAction')
|
||||
self.name = QCoreApplication.translate('EditModelAction', 'Edit Model…')
|
||||
|
||||
def isEnabled(self):
|
||||
return isinstance(self.itemData, QgsProcessingModelAlgorithm)
|
||||
|
@ -26,11 +26,10 @@ __copyright__ = '(C) 2018, Nyall Dawson'
|
||||
__revision__ = '$Format:%H$'
|
||||
|
||||
import os
|
||||
import shutil
|
||||
from qgis.PyQt.QtWidgets import QFileDialog, QMessageBox
|
||||
from qgis.PyQt.QtCore import QFileInfo
|
||||
from qgis.PyQt.QtWidgets import QFileDialog
|
||||
from qgis.PyQt.QtCore import QFileInfo, QCoreApplication
|
||||
|
||||
from qgis.core import QgsApplication, QgsSettings, QgsProcessingModelAlgorithm
|
||||
from qgis.core import QgsApplication, QgsSettings
|
||||
|
||||
from processing.gui.ToolboxAction import ToolboxAction
|
||||
from processing.modeler.ModelerDialog import ModelerDialog
|
||||
@ -41,7 +40,7 @@ pluginPath = os.path.split(os.path.dirname(__file__))[0]
|
||||
class OpenModelFromFileAction(ToolboxAction):
|
||||
|
||||
def __init__(self):
|
||||
self.name = self.tr('Open Existing Model…')
|
||||
self.name = QCoreApplication.translate('OpenModelFromFileAction', 'Open Existing Model…')
|
||||
self.group = self.tr('Tools')
|
||||
|
||||
def getIcon(self):
|
||||
|
@ -26,6 +26,7 @@ __copyright__ = '(C) 2016, Victor Olaya'
|
||||
__revision__ = '$Format:%H$'
|
||||
|
||||
import os
|
||||
from qgis.PyQt.QtCore import QCoreApplication
|
||||
from qgis.PyQt.QtWidgets import QMessageBox
|
||||
from qgis.core import QgsApplication
|
||||
from processing.gui.ContextAction import ContextAction
|
||||
@ -35,7 +36,7 @@ from processing.preconfigured.PreconfiguredAlgorithm import PreconfiguredAlgorit
|
||||
class DeletePreconfiguredAlgorithmAction(ContextAction):
|
||||
|
||||
def __init__(self):
|
||||
self.name = self.tr('Delete Preconfigured Algorithm…', 'DeletePreconfiguredAlgorithmAction')
|
||||
self.name = QCoreApplication.translate('DeletePreconfiguredAlgorithmAction', 'Delete Preconfigured Algorithm…')
|
||||
|
||||
def isEnabled(self):
|
||||
return isinstance(self.itemData, PreconfiguredAlgorithm)
|
||||
|
@ -26,6 +26,8 @@ __copyright__ = '(C) 2016, Victor Olaya'
|
||||
|
||||
__revision__ = '$Format:%H$'
|
||||
|
||||
from qgis.PyQt.QtCore import QCoreApplication
|
||||
from processing.core.GeoAlgorithm import GeoAlgorithm
|
||||
from processing.gui.ContextAction import ContextAction
|
||||
from processing.preconfigured.PreconfiguredAlgorithmDialog import PreconfiguredAlgorithmDialog
|
||||
from processing.preconfigured.PreconfiguredAlgorithm import PreconfiguredAlgorithm
|
||||
@ -34,7 +36,7 @@ from processing.preconfigured.PreconfiguredAlgorithm import PreconfiguredAlgorit
|
||||
class NewPreconfiguredAlgorithmAction(ContextAction):
|
||||
|
||||
def __init__(self):
|
||||
self.name = self.tr('Create Preconfigured Algorithm…', 'NewPreconfiguredAlgorithmAction')
|
||||
self.name = QCoreApplication.translate('NewPreconfiguredAlgorithmAction', 'Create Preconfigured Algorithm…')
|
||||
|
||||
def isEnabled(self):
|
||||
return (isinstance(self.itemData, GeoAlgorithm) and
|
||||
|
@ -27,6 +27,8 @@ __revision__ = '$Format:%H$'
|
||||
|
||||
import os
|
||||
|
||||
from qgis.PyQt.QtCore import QCoreApplication
|
||||
|
||||
from qgis.core import QgsApplication
|
||||
|
||||
from processing.gui.ToolboxAction import ToolboxAction
|
||||
@ -37,7 +39,7 @@ from processing.script.ScriptEditorDialog import ScriptEditorDialog
|
||||
class CreateNewScriptAction(ToolboxAction):
|
||||
|
||||
def __init__(self):
|
||||
self.name = self.tr("Create New Script…")
|
||||
self.name = QCoreApplication.translate("CreateNewScriptAction", "Create New Script…")
|
||||
self.group = self.tr("Tools")
|
||||
|
||||
def execute(self):
|
||||
|
@ -27,6 +27,7 @@ __revision__ = '$Format:%H$'
|
||||
|
||||
import os
|
||||
|
||||
from qgis.PyQt.QtCore import QCoreApplication
|
||||
from qgis.PyQt.QtWidgets import QMessageBox
|
||||
|
||||
from qgis.core import QgsApplication, QgsProcessingAlgorithm
|
||||
@ -39,7 +40,7 @@ from processing.script import ScriptUtils
|
||||
class DeleteScriptAction(ContextAction):
|
||||
|
||||
def __init__(self):
|
||||
self.name = self.tr("Delete Script…")
|
||||
self.name = QCoreApplication.translate("DeleteScriptAction", "Delete Script…")
|
||||
|
||||
def isEnabled(self):
|
||||
return isinstance(self.itemData, QgsProcessingAlgorithm) and self.itemData.provider().id() == "script"
|
||||
|
@ -29,6 +29,7 @@ import inspect
|
||||
|
||||
from qgis.core import QgsProcessingAlgorithm
|
||||
from qgis.utils import iface
|
||||
from qgis.PyQt.QtCore import QCoreApplication
|
||||
from qgis.PyQt.QtWidgets import QMessageBox
|
||||
|
||||
from processing.gui.ContextAction import ContextAction
|
||||
@ -40,7 +41,7 @@ from processing.script import ScriptUtils
|
||||
class EditScriptAction(ContextAction):
|
||||
|
||||
def __init__(self):
|
||||
self.name = self.tr("Edit Script…")
|
||||
self.name = QCoreApplication.translate("EditScriptAction", "Edit Script…")
|
||||
|
||||
def isEnabled(self):
|
||||
return isinstance(self.itemData, QgsProcessingAlgorithm) and self.itemData.provider().id() == "script"
|
||||
|
Loading…
x
Reference in New Issue
Block a user