mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-01 20:00:13 +02:00
grammar tweaks again
This commit is contained in:
@@ -310,14 +310,16 @@ EchonestGenerator::sentenceSummary()
|
|||||||
QString center, suffix;
|
QString center, suffix;
|
||||||
QString summary = artist.dynamicCast< EchonestControl >()->summary();
|
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( "~" );
|
center = summary.remove( "~" );
|
||||||
if( artists.size() == 2 ) // special case for 2, no comma. ( X and Y )
|
if( artists.size() == 2 ) // special case for 2, no comma. ( X and Y )
|
||||||
suffix = " and ";
|
suffix = " and ";
|
||||||
else if( artists.size() > 2 )
|
else if( artists.size() > 2 ) // in a list with more after
|
||||||
suffix = ", ";
|
suffix = ", ";
|
||||||
else
|
else if( allcontrols.isEmpty() ) // the last one, and no more controls, so put a period
|
||||||
suffix = ".";
|
suffix = ".";
|
||||||
|
else
|
||||||
|
suffix = " ";
|
||||||
} else {
|
} else {
|
||||||
center = summary.mid( summary.indexOf( "~" ) + 1 );
|
center = summary.mid( summary.indexOf( "~" ) + 1 );
|
||||||
if( i == artists.size() - 1 ) { // if there are more, add an " and "
|
if( i == artists.size() - 1 ) { // if there are more, add an " and "
|
||||||
|
Reference in New Issue
Block a user