Skip to content

Commit

Permalink
Make some strings translatable in various Qgs* classes (#50442)
Browse files Browse the repository at this point in the history
  • Loading branch information
agiudiceandrea committed Oct 3, 2022
1 parent 2313140 commit bc6bde5
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions src/analysis/georeferencing/qgsleastsquares.cpp
Expand Up @@ -77,7 +77,7 @@ void QgsLeastSquares::helmert( const QVector<QgsPointXY> &sourceCoordinates,
( void )origin;
( void )pixelSize;
( void )rotation;
throw QgsNotSupportedException( QStringLiteral( "Calculating a helmert transformation requires a QGIS build based GSL" ) );
throw QgsNotSupportedException( QObject::tr( "Calculating a helmert transformation requires a QGIS build based GSL" ) );
#else
const int n = destinationCoordinates.size();
if ( n < 2 )
Expand Down Expand Up @@ -262,7 +262,7 @@ void QgsLeastSquares::projective( const QVector<QgsPointXY> &sourceCoordinates,
( void )sourceCoordinates;
( void )destinationCoordinates;
( void )H;
throw QgsNotSupportedException( QStringLiteral( "Calculating a projective transformation requires a QGIS build based GSL" ) );
throw QgsNotSupportedException( QObject::tr( "Calculating a projective transformation requires a QGIS build based GSL" ) );
#else
Q_ASSERT( sourceCoordinates.size() == destinationCoordinates.size() );

Expand Down
6 changes: 3 additions & 3 deletions src/core/geometry/qgsgeos.cpp
Expand Up @@ -169,10 +169,10 @@ std::unique_ptr<QgsAbstractGeometry> QgsGeos::makeValid( Qgis::MakeValidMethod m

#if GEOS_VERSION_MAJOR==3 && GEOS_VERSION_MINOR<10
if ( method != Qgis::MakeValidMethod::Linework )
throw QgsNotSupportedException( QStringLiteral( "The structured method to make geometries valid requires a QGIS build based on GEOS 3.10 or later" ) );
throw QgsNotSupportedException( QObject::tr( "The structured method to make geometries valid requires a QGIS build based on GEOS 3.10 or later" ) );

if ( keepCollapsed )
throw QgsNotSupportedException( QStringLiteral( "The keep collapsed option for making geometries valid requires a QGIS build based on GEOS 3.10 or later" ) );
throw QgsNotSupportedException( QObject::tr( "The keep collapsed option for making geometries valid requires a QGIS build based on GEOS 3.10 or later" ) );
geos::unique_ptr geos;
try
{
Expand Down Expand Up @@ -2011,7 +2011,7 @@ QgsAbstractGeometry *QgsGeos::concaveHull( double targetPercent, bool allowHoles
( void )allowHoles;
( void )targetPercent;
( void )errorMsg;
throw QgsNotSupportedException( QStringLiteral( "Calculating concaveHull requires a QGIS build based on GEOS 3.11 or later" ) );
throw QgsNotSupportedException( QObject::tr( "Calculating concaveHull requires a QGIS build based on GEOS 3.11 or later" ) );
#else
if ( !mGeos )
{
Expand Down
4 changes: 2 additions & 2 deletions src/core/proj/qgscoordinatereferencesystem.cpp
Expand Up @@ -1326,7 +1326,7 @@ QString QgsCoordinateReferenceSystem::celestialBodyName() const

return QString( proj_get_celestial_body_name( context, pj ) );
#else
throw QgsNotSupportedException( QStringLiteral( "Retrieving celestial body requires a QGIS build based on PROJ 8.1 or later" ) );
throw QgsNotSupportedException( QObject::tr( "Retrieving celestial body requires a QGIS build based on PROJ 8.1 or later" ) );
#endif
}

Expand Down Expand Up @@ -1389,7 +1389,7 @@ QgsDatumEnsemble QgsCoordinateReferenceSystem::datumEnsemble() const
}
return res;
#else
throw QgsNotSupportedException( QStringLiteral( "Calculating datum ensembles requires a QGIS build based on PROJ 8.0 or later" ) );
throw QgsNotSupportedException( QObject::tr( "Calculating datum ensembles requires a QGIS build based on PROJ 8.0 or later" ) );
#endif
}

Expand Down
2 changes: 1 addition & 1 deletion src/core/proj/qgscoordinatereferencesystemregistry.cpp
Expand Up @@ -406,6 +406,6 @@ QList< QgsCelestialBody> QgsCoordinateReferenceSystemRegistry::celestialBodies()

return mCelestialBodies;
#else
throw QgsNotSupportedException( QStringLiteral( "Retrieving celestial bodies requires a QGIS build based on PROJ 8.1 or later" ) );
throw QgsNotSupportedException( QObject::tr( "Retrieving celestial bodies requires a QGIS build based on PROJ 8.1 or later" ) );
#endif
}
2 changes: 1 addition & 1 deletion src/core/proj/qgsprojutils.cpp
Expand Up @@ -227,7 +227,7 @@ QgsProjUtils::proj_pj_unique_ptr QgsProjUtils::crsToDatumEnsemble( const PJ *crs

return QgsProjUtils::proj_pj_unique_ptr( proj_crs_get_datum_ensemble( context, singleCrs.get() ) );
#else
throw QgsNotSupportedException( QStringLiteral( "Calculating datum ensembles requires a QGIS build based on PROJ 8.0 or later" ) );
throw QgsNotSupportedException( QObject::tr( "Calculating datum ensembles requires a QGIS build based on PROJ 8.0 or later" ) );
#endif
}

Expand Down

0 comments on commit bc6bde5

Please sign in to comment.