Skip to content

Commit

Permalink
Fix incorrectly capitalized accented menu entries
Browse files Browse the repository at this point in the history
Fixes #19102
  • Loading branch information
nyalldawson committed Jun 4, 2018
1 parent 36712b9 commit b65ee54
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/qgsstringutils.cpp
Expand Up @@ -68,7 +68,7 @@ QString QgsStringUtils::capitalize( const QString &string, QgsStringUtils::Capit
{
smallWords = QObject::tr( "a|an|and|as|at|but|by|en|for|if|in|nor|of|on|or|per|s|the|to|vs.|vs|via" ).split( '|' );
newPhraseSeparators = QObject::tr( ".|:" ).split( '|' );
splitWords = QRegularExpression( QStringLiteral( "\\b" ) );
splitWords = QRegularExpression( QStringLiteral( "\\b" ), QRegularExpression::UseUnicodePropertiesOption );
}

const QStringList parts = string.split( splitWords, QString::SkipEmptyParts );
Expand Down
1 change: 1 addition & 0 deletions tests/src/core/testqgsstringutils.cpp
Expand Up @@ -176,6 +176,7 @@ void TestQgsStringUtils::titleCase_data()
QTest::newRow( "last word2" ) << "Ends with small word of" << "Ends With Small Word Of";
QTest::newRow( "string 6" ) << "Merge VRT(s)" << "Merge VRT(s)";
QTest::newRow( "string 6" ) << "multiple sentences. more than one." << "Multiple Sentences. More Than One.";
QTest::newRow( "accented" ) << "extraer vértices" << "Extraer Vértices";
}

void TestQgsStringUtils::titleCase()
Expand Down

0 comments on commit b65ee54

Please sign in to comment.