Navigation Menu

Skip to content

Commit

Permalink
Capitalization, string fixes
Browse files Browse the repository at this point in the history
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 698fad6
Show file tree
Hide file tree
Showing 14 changed files with 28 additions and 28 deletions.
4 changes: 2 additions & 2 deletions src/app/3d/qgs3dmapcanvasdockwidget.cpp
Expand Up @@ -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 ) );
Expand Down
2 changes: 1 addition & 1 deletion src/app/gps/qgsgpsinformationwidget.cpp
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions src/app/layout/qgslayoutdesignerdialog.cpp
Expand Up @@ -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() )
Expand Down Expand Up @@ -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() )
Expand Down
2 changes: 1 addition & 1 deletion src/app/qgisapp.cpp
Expand Up @@ -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() )
Expand Down
6 changes: 3 additions & 3 deletions src/app/qgsapplayertreeviewmenuprovider.cpp
Expand Up @@ -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 );
Expand All @@ -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(); } );
Expand Down
2 changes: 1 addition & 1 deletion src/app/qgsidentifyresultsdialog.cpp
Expand Up @@ -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()
);
Expand Down
2 changes: 1 addition & 1 deletion src/app/qgsmapsavedialog.cpp
Expand Up @@ -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();
Expand Down
14 changes: 7 additions & 7 deletions src/gui/ogr/qgsvectorlayersaveasdialog.cpp
Expand Up @@ -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 )
Expand Down Expand Up @@ -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 );
Expand All @@ -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;
Expand All @@ -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 );
Expand All @@ -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 );
Expand All @@ -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;
Expand All @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions src/gui/qgsmaplayerstylemanagerwidget.cpp
Expand Up @@ -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 );


Expand Down
2 changes: 1 addition & 1 deletion src/gui/qgsnewvectorlayerdialog.cpp
Expand Up @@ -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, [ = ]
{
Expand Down
4 changes: 2 additions & 2 deletions src/gui/qgsrasterlayersaveasdialog.cpp
Expand Up @@ -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 )
Expand Down Expand Up @@ -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" ) );
}
}

Expand Down
4 changes: 2 additions & 2 deletions src/plugins/georeferencer/qgstransformsettingsdialog.cpp
Expand Up @@ -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, [ = ]
{
Expand All @@ -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, [ = ]
{
Expand Down
4 changes: 2 additions & 2 deletions src/plugins/gps_importer/qgsgpsplugin.cpp
Expand Up @@ -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() )
Expand All @@ -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." ) );
Expand Down
2 changes: 1 addition & 1 deletion src/ui/qgisapp.ui
Expand Up @@ -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"/>
Expand Down

0 comments on commit 698fad6

Please sign in to comment.