Skip to content

Commit

Permalink
Simplify strings
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Jul 18, 2023
1 parent e25dbbe commit 78d8a15
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions src/gui/qgscoordinatereferencesystemmodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ void QgsCoordinateReferenceSystemModel::userCrsAdded( const QString &id )
if ( !group )
{
std::unique_ptr< QgsCoordinateReferenceSystemModelGroupNode > newGroup = std::make_unique< QgsCoordinateReferenceSystemModelGroupNode >(
tr( "User Defined Coordinate Systems" ),
tr( "User-defined" ),
QgsApplication::getThemeIcon( QStringLiteral( "/user.svg" ) ), QStringLiteral( "USER" ) );
beginInsertRows( QModelIndex(), mRootNode->children().length(), mRootNode->children().length() );
mRootNode->addChildNode( newGroup.get() );
Expand Down Expand Up @@ -358,7 +358,7 @@ QgsCoordinateReferenceSystemModelCrsNode *QgsCoordinateReferenceSystemModel::add
QIcon groupIcon;
if ( record.authName == QLatin1String( "USER" ) )
{
groupName = tr( "User Defined Coordinate Systems" );
groupName = tr( "User-defined" );
groupId = QStringLiteral( "USER" );
groupIcon = QgsApplication::getThemeIcon( QStringLiteral( "/user.svg" ) );
}
Expand Down Expand Up @@ -468,7 +468,7 @@ QModelIndex QgsCoordinateReferenceSystemModel::addCustomCrs( const QgsCoordinate
if ( !group )
{
std::unique_ptr< QgsCoordinateReferenceSystemModelGroupNode > newGroup = std::make_unique< QgsCoordinateReferenceSystemModelGroupNode >(
tr( "Custom Coordinate Systems" ),
tr( "Custom" ),
QgsApplication::getThemeIcon( QStringLiteral( "/user.svg" ) ), QStringLiteral( "CUSTOM" ) );
beginInsertRows( QModelIndex(), mRootNode->children().length(), mRootNode->children().length() );
mRootNode->addChildNode( newGroup.get() );
Expand Down
10 changes: 5 additions & 5 deletions tests/src/python/test_qgscoordinatereferencesystemmodel.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ def test_model(self):
self.assertNotIn('Cassini', top_level_items)

# user and custom groups should not be created until required
self.assertNotIn("User Defined Coordinate Systems", top_level_items)
self.assertNotIn("Custom Coordinate Systems", top_level_items)
self.assertNotIn("User-defined", top_level_items)
self.assertNotIn("Custom", top_level_items)

# check group ids
top_level_item_group_ids = [
Expand Down Expand Up @@ -226,8 +226,8 @@ def test_model(self):
top_level_items = [
model.data(model.index(row, 0, QModelIndex()), Qt.DisplayRole) for row in range(model.rowCount(QModelIndex()))
]
self.assertIn('User Defined Coordinate Systems', top_level_items)
self.assertNotIn("Custom Coordinate Systems", top_level_items)
self.assertIn('User-defined', top_level_items)
self.assertNotIn("Custom", top_level_items)

# check group ids
top_level_item_group_ids = [
Expand Down Expand Up @@ -306,7 +306,7 @@ def test_model(self):
top_level_items = [
model.data(model.index(row, 0, QModelIndex()), Qt.DisplayRole) for row in range(model.rowCount(QModelIndex()))
]
self.assertIn("Custom Coordinate Systems", top_level_items)
self.assertIn("Custom", top_level_items)

# check group ids
top_level_item_group_ids = [
Expand Down

0 comments on commit 78d8a15

Please sign in to comment.