Skip to content
Permalink
Browse files

Capitalization, string fixes

Turns out correct title case always uses uppercase for the
final word, even if the word wouldn't normally be uppercased
  • Loading branch information
nyalldawson committed May 16, 2018
1 parent 0e57b88 commit 698fad65a2360ad7787afa5687bc77fc4711fff5
@@ -44,9 +44,9 @@ Qgs3DMapCanvasDockWidget::Qgs3DMapCanvasDockWidget( QWidget *parent )
toolBar->addAction( QgsApplication::getThemeIcon( QStringLiteral( "mActionZoomFullExtent.svg" ) ),
tr( "Zoom Full" ), this, &Qgs3DMapCanvasDockWidget::resetView );
toolBar->addAction( QgsApplication::getThemeIcon( QStringLiteral( "mActionSaveMapAsImage.svg" ) ),
tr( "Save as image" ), this, &Qgs3DMapCanvasDockWidget::saveAsImage );
tr( "Save as Image" ), this, &Qgs3DMapCanvasDockWidget::saveAsImage );
toolBar->addAction( QgsApplication::getThemeIcon( QStringLiteral( "mIconProperties.svg" ) ),
tr( "Configure" ), this, &Qgs3DMapCanvasDockWidget::configure );
tr( "Configure" ), this, &Qgs3DMapCanvasDockWidget::configure );

mCanvas = new Qgs3DMapCanvas( contentsWidget );
mCanvas->setMinimumSize( QSize( 200, 200 ) );
@@ -1019,7 +1019,7 @@ void QgsGpsInformationWidget::mBtnLogFile_clicked()
QgsSettings settings;
QString settingPath( QStringLiteral( "/gps/lastLogFileDir" ) );
QString lastUsedDir = settings.value( settingPath, QDir::homePath() ).toString();
QString saveFilePath = QFileDialog::getSaveFileName( this, tr( "Save GPS log file as" ), lastUsedDir, tr( "NMEA files" ) + " (*.nmea)" );
QString saveFilePath = QFileDialog::getSaveFileName( this, tr( "Save GPS log file As" ), lastUsedDir, tr( "NMEA files" ) + " (*.nmea)" );
if ( saveFilePath.isNull() ) //canceled
{
return;
@@ -1844,7 +1844,7 @@ void QgsLayoutDesignerDialog::exportToRaster()
QgisApp::instance()->activateWindow();
this->raise();
#endif
QPair<QString, QString> fileNExt = QgsGuiUtils::getSaveAsImageName( this, tr( "Save Layout as" ), outputFileName );
QPair<QString, QString> fileNExt = QgsGuiUtils::getSaveAsImageName( this, tr( "Save Layout As" ), outputFileName );
this->activateWindow();

if ( fileNExt.first.isEmpty() )
@@ -2952,7 +2952,7 @@ void QgsLayoutDesignerDialog::exportReportToRaster()
QgsSettings s;
QString outputFileName = QgsFileUtils::stringToSafeFilename( mMasterLayout->name() );

QPair<QString, QString> fileNExt = QgsGuiUtils::getSaveAsImageName( this, tr( "Save Report as" ), outputFileName );
QPair<QString, QString> fileNExt = QgsGuiUtils::getSaveAsImageName( this, tr( "Save Report As" ), outputFileName );
this->activateWindow();

if ( fileNExt.first.isEmpty() )
@@ -5814,7 +5814,7 @@ void QgisApp::fileSaveAs()
const QString zipExt = tr( "QGZ files" ) + " (*.qgz)";
QString filter;
QString path = QFileDialog::getSaveFileName( this,
tr( "Choose a File Name to Save the QGIS Project File as" ),
tr( "Save Project As" ),
lastUsedDir + '/' + QgsProject::instance()->title(),
qgsExt + ";;" + zipExt, &filter );
if ( path.isEmpty() )
@@ -263,10 +263,10 @@ QMenu *QgsAppLayerTreeViewMenuProvider::createContextMenu()
{
// save as vector file
QMenu *menuExportVector = new QMenu( tr( "Export" ), menu );
QAction *actionSaveAs = new QAction( tr( "Save Features as" ), menuExportVector );
QAction *actionSaveAs = new QAction( tr( "Save Features As" ), menuExportVector );
connect( actionSaveAs, &QAction::triggered, QgisApp::instance(), [ = ] { QgisApp::instance()->saveAsFile(); } );
menuExportVector->addAction( actionSaveAs );
QAction *actionSaveSelectedFeaturesAs = new QAction( tr( "Save Selected Features as" ), menuExportVector );
QAction *actionSaveSelectedFeaturesAs = new QAction( tr( "Save Selected Features As" ), menuExportVector );
connect( actionSaveSelectedFeaturesAs, &QAction::triggered, QgisApp::instance(), [ = ] { QgisApp::instance()->saveAsFile( nullptr, true ); } );
actionSaveSelectedFeaturesAs->setEnabled( vlayer->selectedFeatureCount() > 0 );
menuExportVector->addAction( actionSaveSelectedFeaturesAs );
@@ -284,7 +284,7 @@ QMenu *QgsAppLayerTreeViewMenuProvider::createContextMenu()
else if ( rlayer )
{
QMenu *menuExportRaster = new QMenu( tr( "Export" ), menu );
QAction *actionSaveAs = new QAction( tr( "Save as" ), menuExportRaster );
QAction *actionSaveAs = new QAction( tr( "Save As" ), menuExportRaster );
QAction *actionSaveAsDefinitionLayer = new QAction( tr( "Save as Layer Definition File…" ), menuExportRaster );
QAction *actionSaveStyle = new QAction( tr( "Save as QGIS Layer Style File…" ), menuExportRaster );
connect( actionSaveAs, &QAction::triggered, QgisApp::instance(), [ = ] { QgisApp::instance()->saveAsFile(); } );
@@ -125,7 +125,7 @@ void QgsIdentifyResultsWebView::handleDownload( QUrl url )
savePath = QDir::cleanPath( savePath + QDir::separator() + fileName );
}
QString targetFile = QFileDialog::getSaveFileName( this,
tr( "Save as" ),
tr( "Save As" ),
savePath,
info.suffix().isEmpty() ? QString() : "*." + info.suffix()
);
@@ -430,7 +430,7 @@ void QgsMapSaveDialog::onAccepted()
{
QgsSettings settings;
QString lastUsedDir = settings.value( QStringLiteral( "UI/lastSaveAsImageDir" ), QDir::homePath() ).toString();
QString fileName = QFileDialog::getSaveFileName( QgisApp::instance(), tr( "Save map as" ), lastUsedDir, tr( "PDF Format" ) + " (*.pdf *.PDF)" );
QString fileName = QFileDialog::getSaveFileName( QgisApp::instance(), tr( "Save Map As" ), lastUsedDir, tr( "PDF Format" ) + " (*.pdf *.PDF)" );
if ( !fileName.isEmpty() )
{
QgsMapSettings ms = QgsMapSettings();
@@ -140,7 +140,7 @@ void QgsVectorLayerSaveAsDialog::setup()
mExtentGroupBox->setCollapsed( true );

mFilename->setStorageMode( QgsFileWidget::SaveFile );
mFilename->setDialogTitle( tr( "Save Layer as…" ) );
mFilename->setDialogTitle( tr( "Save Layer As" ) );
mFilename->setDefaultRoot( settings.value( QStringLiteral( "UI/lastVectorFileFilterDir" ), QDir::homePath() ).toString() );
mFilename->setConfirmOverwrite( false );
connect( mFilename, &QgsFileWidget::fileChanged, this, [ = ]( const QString & filePath )
@@ -254,7 +254,7 @@ void QgsVectorLayerSaveAsDialog::accept()
{
QMessageBox msgBox;
msgBox.setIcon( QMessageBox::Question );
msgBox.setWindowTitle( tr( "Save Vector Layer as" ) );
msgBox.setWindowTitle( tr( "Save Vector Layer As" ) );
msgBox.setText( tr( "The layer already exists. Do you want to overwrite the whole file or overwrite the layer?" ) );
QPushButton *overwriteFileButton = msgBox.addButton( tr( "Overwrite file" ), QMessageBox::ActionRole );
QPushButton *overwriteLayerButton = msgBox.addButton( tr( "Overwrite layer" ), QMessageBox::ActionRole );
@@ -271,7 +271,7 @@ void QgsVectorLayerSaveAsDialog::accept()
else if ( !( caps & QgsVectorFileWriter::CanAppendToExistingLayer ) )
{
if ( QMessageBox::question( this,
tr( "Save Vector Layer as" ),
tr( "Save Vector Layer As" ),
tr( "The file already exists. Do you want to overwrite it?" ) ) == QMessageBox::NoButton )
{
return;
@@ -283,7 +283,7 @@ void QgsVectorLayerSaveAsDialog::accept()
{
QMessageBox msgBox;
msgBox.setIcon( QMessageBox::Question );
msgBox.setWindowTitle( tr( "Save Vector Layer as" ) );
msgBox.setWindowTitle( tr( "Save Vector Layer As" ) );
msgBox.setText( tr( "The layer already exists. Do you want to overwrite the whole file, overwrite the layer or append features to the layer?" ) );
QPushButton *overwriteFileButton = msgBox.addButton( tr( "Overwrite file" ), QMessageBox::ActionRole );
QPushButton *overwriteLayerButton = msgBox.addButton( tr( "Overwrite layer" ), QMessageBox::ActionRole );
@@ -304,7 +304,7 @@ void QgsVectorLayerSaveAsDialog::accept()
{
QMessageBox msgBox;
msgBox.setIcon( QMessageBox::Question );
msgBox.setWindowTitle( tr( "Save Vector Layer as" ) );
msgBox.setWindowTitle( tr( "Save Vector Layer As" ) );
msgBox.setText( tr( "The layer already exists. Do you want to overwrite the whole file or append features to the layer?" ) );
QPushButton *overwriteFileButton = msgBox.addButton( tr( "Overwrite file" ), QMessageBox::ActionRole );
QPushButton *appendToLayerButton = msgBox.addButton( tr( "Append to layer" ), QMessageBox::ActionRole );
@@ -327,7 +327,7 @@ void QgsVectorLayerSaveAsDialog::accept()
selectedAttributes() ) )
{
if ( QMessageBox::question( this,
tr( "Save Vector Layer as" ),
tr( "Save Vector Layer As" ),
tr( "The existing layer has different fields. Do you want to add the missing fields to the layer?" ) ) == QMessageBox::Yes )
{
mActionOnExistingFile = QgsVectorFileWriter::AppendToLayerAddFields;
@@ -345,7 +345,7 @@ void QgsVectorLayerSaveAsDialog::accept()
else
{
if ( QMessageBox::question( this,
tr( "Save Vector Layer as" ),
tr( "Save Vector Layer As" ),
tr( "The file already exists. Do you want to overwrite it?" ) ) == QMessageBox::NoButton )
{
return;
@@ -51,9 +51,9 @@ QgsMapLayerStyleManagerWidget::QgsMapLayerStyleManagerWidget( QgsMapLayer *layer
QAction *loadFromFileAction = toolbar->addAction( tr( "Load Style" ) );
loadFromFileAction->setIcon( QgsApplication::getThemeIcon( QStringLiteral( "/mActionFileOpen.svg" ) ) );
connect( loadFromFileAction, &QAction::triggered, this, &QgsMapLayerStyleManagerWidget::loadStyle );
QAction *saveAsDefaultAction = toolbar->addAction( tr( "Save as default" ) );
QAction *saveAsDefaultAction = toolbar->addAction( tr( "Save as Default" ) );
connect( saveAsDefaultAction, &QAction::triggered, this, &QgsMapLayerStyleManagerWidget::saveAsDefault );
QAction *loadDefaultAction = toolbar->addAction( tr( "Restore default" ) );
QAction *loadDefaultAction = toolbar->addAction( tr( "Restore Default" ) );
connect( loadDefaultAction, &QAction::triggered, this, &QgsMapLayerStyleManagerWidget::loadDefault );


@@ -104,7 +104,7 @@ QgsNewVectorLayerDialog::QgsNewVectorLayerDialog( QWidget *parent, Qt::WindowFla

mFileName->setStorageMode( QgsFileWidget::SaveFile );
mFileName->setFilter( QgsVectorFileWriter::filterForDriver( mFileFormatComboBox->currentData( Qt::UserRole ).toString() ) );
mFileName->setDialogTitle( tr( "Save Layer as…" ) );
mFileName->setDialogTitle( tr( "Save Layer As" ) );
mFileName->setDefaultRoot( settings.value( QStringLiteral( "UI/lastVectorFileFilterDir" ), QDir::homePath() ).toString() );
connect( mFileName, &QgsFileWidget::fileChanged, this, [ = ]
{
@@ -169,7 +169,7 @@ QgsRasterLayerSaveAsDialog::QgsRasterLayerSaveAsDialog( QgsRasterLayer *rasterLa
else
{
mFilename->setStorageMode( QgsFileWidget::SaveFile );
mFilename->setDialogTitle( tr( "Save Layer as…" ) );
mFilename->setDialogTitle( tr( "Save Layer As" ) );
}
mFilename->setDefaultRoot( settings.value( QStringLiteral( "UI/lastRasterFileDir" ), QDir::homePath() ).toString() );
connect( mFilename, &QgsFileWidget::fileChanged, this, [ = ]( const QString & filePath )
@@ -717,7 +717,7 @@ void QgsRasterLayerSaveAsDialog::mTileModeCheckBox_toggled( bool toggled )
{
mTilesGroupBox->hide();
mFilename->setStorageMode( QgsFileWidget::SaveFile );
mFilename->setDialogTitle( tr( "Save Layer as…" ) );
mFilename->setDialogTitle( tr( "Save Layer As" ) );
}
}

@@ -57,7 +57,7 @@ QgsTransformSettingsDialog::QgsTransformSettingsDialog( const QString &raster, c

mPdfMap->setStorageMode( QgsFileWidget::SaveFile );
mPdfMap->setFilter( tr( "PDF files" ) + " (*.pdf *.PDF)" );
mPdfMap->setDialogTitle( tr( "Save Map File as" ) );
mPdfMap->setDialogTitle( tr( "Save Map File As" ) );
mPdfMap->setDefaultRoot( settings.value( QStringLiteral( "/Plugin-GeoReferencer/lastPDFReportDir" ), QDir::homePath() ).toString() );
connect( mPdfMap, &QgsFileWidget::fileChanged, this, [ = ]
{
@@ -68,7 +68,7 @@ QgsTransformSettingsDialog::QgsTransformSettingsDialog( const QString &raster, c

mPdfReport->setStorageMode( QgsFileWidget::SaveFile );
mPdfReport->setFilter( tr( "PDF files" ) + " (*.pdf *.PDF)" );
mPdfReport->setDialogTitle( tr( "Save Report File as" ) );
mPdfReport->setDialogTitle( tr( "Save Report File As" ) );
mPdfReport->setDefaultRoot( settings.value( QStringLiteral( "/Plugin-GeoReferencer/lastPDFReportDir" ), QDir::homePath() ).toString() );
connect( mPdfReport, &QgsFileWidget::fileChanged, this, [ = ]
{
@@ -154,7 +154,7 @@ void QgsGpsPlugin::createGPX()
QString dir = settings.value( QStringLiteral( "Plugin-GPS/gpxdirectory" ), QDir::homePath() ).toString();
QString fileName =
QFileDialog::getSaveFileName( mQGisInterface->mainWindow(),
tr( "Save New GPX File as…" ),
tr( "Save New GPX File As" ),
dir,
tr( "GPS eXchange file" ) + " (*.gpx)" );
if ( !fileName.isEmpty() )
@@ -167,7 +167,7 @@ void QgsGpsPlugin::createGPX()
std::ofstream ofs( fileName.toUtf8() );
if ( !ofs )
{
QMessageBox::warning( nullptr, tr( "Save New GPX File as…" ),
QMessageBox::warning( nullptr, tr( "Save New GPX File" ),
tr( "Unable to create a GPX file with the given name. "
"Try again with another name or in another "
"directory." ) );
@@ -285,7 +285,7 @@
</widget>
<widget class="QMenu" name="mMenuPasteAs">
<property name="title">
<string>Paste Features as</string>
<string>Paste Features As</string>
</property>
<addaction name="mActionPasteAsNewVector"/>
<addaction name="mActionPasteAsNewMemoryVector"/>

0 comments on commit 698fad6

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