Skip to content
Permalink
Browse files

Fix incorrectly capitalized accented menu entries

Fixes #19102
  • Loading branch information
nyalldawson committed Jun 4, 2018
1 parent 36712b9 commit b65ee54527e1320e0a2e9c9316f6a4ce541cb32b
Showing with 2 additions and 1 deletion.
  1. +1 −1 src/core/qgsstringutils.cpp
  2. +1 −0 tests/src/core/testqgsstringutils.cpp
@@ -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 );
@@ -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()

0 comments on commit b65ee54

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