Skip to content
Permalink
Browse files

fix translation strings

  • Loading branch information
jef-n committed Feb 21, 2018
1 parent 0481666 commit 9a3bfa01c290c0ed3fb6648d5bd8171ec212b27a
@@ -27,7 +27,7 @@

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 @@ def showPopupMenu(self):
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 @@ def showPopupMenu(self, point):
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 @@
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 @@
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 @@

import os

from qgis.PyQt.QtCore import QCoreApplication

from qgis.core import QgsApplication

from processing.gui.ToolboxAction import ToolboxAction
@@ -38,7 +40,7 @@
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 @@
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 @@

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

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

import os

from qgis.PyQt.QtCore import QCoreApplication

from qgis.core import QgsApplication

from processing.gui.ToolboxAction import ToolboxAction
@@ -37,7 +39,7 @@
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 @@

import os

from qgis.PyQt.QtCore import QCoreApplication
from qgis.PyQt.QtWidgets import QMessageBox

from qgis.core import QgsApplication, QgsProcessingAlgorithm
@@ -39,7 +40,7 @@
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 @@

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

0 comments on commit 9a3bfa0

Please sign in to comment.
You can’t perform that action at this time.