1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-04-14 04:51:53 +02:00

grammar tweaks again

This commit is contained in:
Leo Franchi 2011-01-29 13:12:14 -05:00
parent 824c407040
commit b5698e9010

View File

@ -310,14 +310,16 @@ EchonestGenerator::sentenceSummary()
QString center, suffix;
QString summary = artist.dynamicCast< EchonestControl >()->summary();
if( i == 0 ) { // if it's the first and only one
if( i == 0 ) { // if it's the first.. special case
center = summary.remove( "~" );
if( artists.size() == 2 ) // special case for 2, no comma. ( X and Y )
suffix = " and ";
else if( artists.size() > 2 )
else if( artists.size() > 2 ) // in a list with more after
suffix = ", ";
else
else if( allcontrols.isEmpty() ) // the last one, and no more controls, so put a period
suffix = ".";
else
suffix = " ";
} else {
center = summary.mid( summary.indexOf( "~" ) + 1 );
if( i == artists.size() - 1 ) { // if there are more, add an " and "