mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-25 00:58:06 -05:00
[processing] More string HIG fixes
This commit is contained in:
parent
bd99f6979b
commit
835cca7cae
@ -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)
|
||||
self.tr('Select from Open Layers…'), self.pushButton)
|
||||
selectLayerAction.triggered.connect(self.showLayerSelectionDialog)
|
||||
popupmenu.addAction(selectLayerAction)
|
||||
|
||||
selectFileAction = QAction(
|
||||
self.tr('Select from file system'), self.pushButton)
|
||||
self.tr('Select from File System…'), self.pushButton)
|
||||
selectFileAction.triggered.connect(self.showFileSelectionDialog)
|
||||
popupmenu.addAction(selectFileAction)
|
||||
|
||||
@ -156,7 +156,7 @@ class BatchInputSelectionPanel(QWidget):
|
||||
else:
|
||||
path = ''
|
||||
|
||||
ret, selected_filter = QFileDialog.getOpenFileNames(self, self.tr('Open file'), path,
|
||||
ret, selected_filter = QFileDialog.getOpenFileNames(self, self.tr('Select Files'), path,
|
||||
getFileFilter(self.param))
|
||||
if ret:
|
||||
files = list(ret)
|
||||
|
@ -81,7 +81,7 @@ class BatchOutputSelectionPanel(QWidget):
|
||||
else:
|
||||
path = ''
|
||||
filename, selectedFileFilter = QFileDialog.getSaveFileName(self,
|
||||
self.tr('Save file'), path, filefilter)
|
||||
self.tr('Save File'), path, filefilter)
|
||||
if filename:
|
||||
if not filename.lower().endswith(
|
||||
tuple(re.findall("\\*(\\.[a-z]{1,10})", filefilter))):
|
||||
@ -143,7 +143,7 @@ class BatchOutputSelectionPanel(QWidget):
|
||||
lastDir = ''
|
||||
|
||||
dirName = QFileDialog.getExistingDirectory(self,
|
||||
self.tr('Select directory'), lastDir, QFileDialog.ShowDirsOnly)
|
||||
self.tr('Output Directory'), lastDir, QFileDialog.ShowDirsOnly)
|
||||
|
||||
if dirName:
|
||||
self.table.cellWidget(self.row, self.col).setValue(dirName)
|
||||
|
@ -102,7 +102,7 @@ class DestinationSelectionPanel(BASE, WIDGET):
|
||||
|
||||
if self.parameter.flags() & QgsProcessingParameterDefinition.FlagOptional:
|
||||
actionSkipOutput = QAction(
|
||||
self.tr('Skip output'), self.btnSelect)
|
||||
self.tr('Skip Output'), self.btnSelect)
|
||||
actionSkipOutput.triggered.connect(self.skipOutput)
|
||||
popupMenu.addAction(actionSkipOutput)
|
||||
|
||||
@ -110,15 +110,15 @@ class DestinationSelectionPanel(BASE, WIDGET):
|
||||
and self.parameter.supportsNonFileBasedOutput():
|
||||
# use memory layers for temporary layers if supported
|
||||
actionSaveToTemp = QAction(
|
||||
self.tr('Create temporary layer'), self.btnSelect)
|
||||
self.tr('Create Temporary Layer'), self.btnSelect)
|
||||
else:
|
||||
actionSaveToTemp = QAction(
|
||||
self.tr('Save to a temporary file'), self.btnSelect)
|
||||
self.tr('Save to a Temporary File'), self.btnSelect)
|
||||
actionSaveToTemp.triggered.connect(self.saveToTemporary)
|
||||
popupMenu.addAction(actionSaveToTemp)
|
||||
|
||||
actionSaveToFile = QAction(
|
||||
QCoreApplication.translate('DestinationSelectionPanel', 'Save to file…'), self.btnSelect)
|
||||
QCoreApplication.translate('DestinationSelectionPanel', 'Save to File…'), self.btnSelect)
|
||||
actionSaveToFile.triggered.connect(self.selectFile)
|
||||
popupMenu.addAction(actionSaveToFile)
|
||||
|
||||
@ -129,7 +129,7 @@ class DestinationSelectionPanel(BASE, WIDGET):
|
||||
actionSaveToGpkg.triggered.connect(self.saveToGeopackage)
|
||||
popupMenu.addAction(actionSaveToGpkg)
|
||||
actionSaveToPostGIS = QAction(
|
||||
QCoreApplication.translate('DestinationSelectionPanel', 'Save to PostGIS table…'), self.btnSelect)
|
||||
QCoreApplication.translate('DestinationSelectionPanel', 'Save to PostGIS Table…'), self.btnSelect)
|
||||
actionSaveToPostGIS.triggered.connect(self.saveToPostGIS)
|
||||
settings = QgsSettings()
|
||||
settings.beginGroup('/PostgreSQL/connections/')
|
||||
@ -139,7 +139,7 @@ class DestinationSelectionPanel(BASE, WIDGET):
|
||||
popupMenu.addAction(actionSaveToPostGIS)
|
||||
|
||||
actionSetEncoding = QAction(
|
||||
QCoreApplication.translate('DestinationSelectionPanel', 'Change file encoding ({})…').format(self.encoding), self.btnSelect)
|
||||
QCoreApplication.translate('DestinationSelectionPanel', 'Change File Encoding ({})…').format(self.encoding), self.btnSelect)
|
||||
actionSetEncoding.triggered.connect(self.selectEncoding)
|
||||
popupMenu.addAction(actionSetEncoding)
|
||||
|
||||
@ -260,7 +260,7 @@ class DestinationSelectionPanel(BASE, WIDGET):
|
||||
if not lastDir:
|
||||
lastDir = settings.value("/Processing/LastOutputPath", QDir.homePath())
|
||||
|
||||
dirName = QFileDialog.getExistingDirectory(self, self.tr('Select directory'),
|
||||
dirName = QFileDialog.getExistingDirectory(self, self.tr('Select Directory'),
|
||||
lastDir, QFileDialog.ShowDirsOnly)
|
||||
if dirName:
|
||||
self.leText.setText(QDir.toNativeSeparators(dirName))
|
||||
|
@ -132,7 +132,7 @@ class ExtentSelectionPanel(BASE, WIDGET):
|
||||
layerName = layer.name()
|
||||
extents.append(layerName)
|
||||
extentsDict[layerName] = {"extent": layer.extent(), "authid": authid}
|
||||
(item, ok) = QInputDialog.getItem(self, self.tr('Select extent'),
|
||||
(item, ok) = QInputDialog.getItem(self, self.tr('Select Extent'),
|
||||
self.tr('Use extent from'), extents, False)
|
||||
if ok:
|
||||
self.setValueFromRect(QgsReferencedRectangle(extentsDict[item]["extent"], QgsCoordinateReferenceSystem(extentsDict[item]["authid"])))
|
||||
|
@ -64,14 +64,14 @@ class FileSelectionPanel(BASE, WIDGET):
|
||||
|
||||
if self.isFolder:
|
||||
folder = QFileDialog.getExistingDirectory(self,
|
||||
self.tr('Select folder'), path)
|
||||
self.tr('Select Folder'), path)
|
||||
if folder:
|
||||
self.leText.setText(folder)
|
||||
settings.setValue('/Processing/LastInputPath',
|
||||
os.path.dirname(folder))
|
||||
else:
|
||||
filenames, selected_filter = QFileDialog.getOpenFileNames(self,
|
||||
self.tr('Select file'), path, self.tr('{} files').format(self.ext.upper()) + ' (*.' + self.ext + self.tr(');;All files (*.*)'))
|
||||
self.tr('Select File'), path, self.tr('{} files').format(self.ext.upper()) + ' (*.' + self.ext + self.tr(');;All files (*.*)'))
|
||||
if filenames:
|
||||
self.leText.setText(u';'.join(filenames))
|
||||
settings.setValue('/Processing/LastInputPath',
|
||||
|
@ -85,7 +85,7 @@ class HistoryDialog(BASE, WIDGET):
|
||||
|
||||
def saveLog(self):
|
||||
fileName, filter = QFileDialog.getSaveFileName(self,
|
||||
self.tr('Save file'), '.', self.tr('Log files (*.log *.LOG)'))
|
||||
self.tr('Save File'), '.', self.tr('Log files (*.log *.LOG)'))
|
||||
|
||||
if fileName == '':
|
||||
return
|
||||
@ -133,7 +133,7 @@ class HistoryDialog(BASE, WIDGET):
|
||||
if isinstance(item, TreeLogEntryItem):
|
||||
if item.isAlg:
|
||||
popupmenu = QMenu()
|
||||
createTestAction = QAction(self.tr('Create test'), self.tree)
|
||||
createTestAction = QAction(self.tr('Create Test…'), self.tree)
|
||||
createTestAction.triggered.connect(self.createTest)
|
||||
popupmenu.addAction(createTestAction)
|
||||
popupmenu.exec_(self.tree.mapToGlobal(point))
|
||||
|
@ -101,7 +101,7 @@ class MultipleFileInputDialog(BASE, WIDGET):
|
||||
path = ''
|
||||
|
||||
files, selected_filter = QFileDialog.getOpenFileNames(self,
|
||||
self.tr('Select file(s)'), path, self.tr('All files (*.*)'))
|
||||
self.tr('Select File(s)'), path, self.tr('All files (*.*)'))
|
||||
|
||||
if len(files) == 0:
|
||||
return
|
||||
|
@ -168,7 +168,7 @@ class MultipleInputDialog(BASE, WIDGET):
|
||||
settings = QgsSettings()
|
||||
path = str(settings.value('/Processing/LastInputPath'))
|
||||
|
||||
ret, selected_filter = QFileDialog.getOpenFileNames(self, self.tr('Select file(s)'),
|
||||
ret, selected_filter = QFileDialog.getOpenFileNames(self, self.tr('Select File(s)'),
|
||||
path, filter)
|
||||
if ret:
|
||||
files = list(ret)
|
||||
|
@ -85,7 +85,7 @@ class ModellerNumberInputPanel(BASE, WIDGET):
|
||||
|
||||
dlg = QgsExpressionBuilderDialog(None, str(self.leText.text()), self, 'generic', context)
|
||||
|
||||
dlg.setWindowTitle(self.tr('Expression based input'))
|
||||
dlg.setWindowTitle(self.tr('Expression Based Input'))
|
||||
if dlg.exec_() == QDialog.Accepted:
|
||||
exp = QgsExpression(dlg.expressionText())
|
||||
if not exp.hasParserError():
|
||||
|
@ -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(self.tr('Execute…'), self.algorithmTree)
|
||||
executeAction.triggered.connect(self.executeAlgorithm)
|
||||
popupmenu.addAction(executeAction)
|
||||
if alg.flags() & QgsProcessingAlgorithm.FlagSupportsBatch:
|
||||
executeBatchAction = QAction(
|
||||
self.tr('Execute as batch process'),
|
||||
self.tr('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'),
|
||||
self.tr('Edit Rendering Styles for Outputs…'),
|
||||
self.algorithmTree)
|
||||
editRenderingStylesAction.triggered.connect(
|
||||
self.editRenderingStyles)
|
||||
|
@ -47,7 +47,7 @@ class RenderingStyleFilePanel(BASE, WIDGET):
|
||||
|
||||
def showSelectionDialog(self):
|
||||
filename, selected_filter = QFileDialog.getOpenFileName(self,
|
||||
self.tr('Select style file'), '',
|
||||
self.tr('Select Style File'), '',
|
||||
self.tr('QGIS Layer Style File (*.qml *.QML)'))
|
||||
if filename:
|
||||
self.leText.setText(filename)
|
||||
|
@ -301,7 +301,7 @@ class ShowTestDialog(QDialog):
|
||||
QDialog.__init__(self)
|
||||
self.setModal(True)
|
||||
self.resize(600, 400)
|
||||
self.setWindowTitle(self.tr('Unit test'))
|
||||
self.setWindowTitle(self.tr('Unit Test'))
|
||||
layout = QVBoxLayout()
|
||||
self.text = QTextEdit()
|
||||
self.text.setFontFamily("monospace")
|
||||
|
@ -218,7 +218,7 @@ class WidgetWrapper(QObject):
|
||||
path = ''
|
||||
|
||||
# TODO: should use selectedFilter argument for default file format
|
||||
filename, selected_filter = QFileDialog.getOpenFileName(self.widget, self.tr('Select file'),
|
||||
filename, selected_filter = QFileDialog.getOpenFileName(self.widget, self.tr('Select File'),
|
||||
path, getFileFilter(self.param))
|
||||
if filename:
|
||||
settings.setValue('/Processing/LastInputPath',
|
||||
@ -505,7 +505,7 @@ class FileWidgetWrapper(WidgetWrapper):
|
||||
filter = self.tr('All files (*.*)')
|
||||
|
||||
filename, selected_filter = QFileDialog.getOpenFileName(self.widget,
|
||||
self.tr('Select file'), path,
|
||||
self.tr('Select File'), path,
|
||||
filter)
|
||||
if filename:
|
||||
self.combo.setEditText(filename)
|
||||
|
@ -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 = self.tr('Add Model from File…')
|
||||
self.group = self.tr('Tools')
|
||||
|
||||
def getIcon(self):
|
||||
|
@ -40,7 +40,7 @@ from processing.script import ScriptUtils
|
||||
class AddScriptFromFileAction(ToolboxAction):
|
||||
|
||||
def __init__(self):
|
||||
self.name = self.tr("Add Script From File…")
|
||||
self.name = self.tr("Add Script from File…")
|
||||
self.group = self.tr("Tools")
|
||||
|
||||
def execute(self):
|
||||
|
Loading…
x
Reference in New Issue
Block a user