1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-11 08:34:34 +02:00

Merge pull request #178 from xhochy/fix/dbus-notify-linebreak

Replace <br /> with \n in Notifictation messages
This commit is contained in:
Christian Muehlhaeuser
2013-03-29 13:21:57 -07:00

View File

@@ -190,12 +190,13 @@ FdoNotifyPlugin::nowPlaying( const QVariant& input )
// Remark: If using xml-based markup in notifications, the supplied strings need to be escaped.
QString album;
if ( !hash[ "album" ].isEmpty() )
album = tr( "<br /><i>on</i> %1", "%1 is an album name" ).arg( Qt::escape( hash[ "album" ] ) );
album = QString( "\n<i>%1</i> %2" ).arg( tr( "on", "'on' is followed by an album name" ) ).arg( Qt::escape( hash[ "album" ] ) );
messageText = tr( "%1<br /><i>by</i> %2%3.", "%1 is a title, %2 is an artist and %3 is replaced by either the previous message or nothing" )
messageText = tr( "%1%4 %2%3.", "%1 is a title, %2 is an artist and %3 is replaced by either the previous message or nothing, %4 is the preposition used to link track and artist ('by' in english)" )
.arg( Qt::escape( hash[ "title" ] ) )
.arg( Qt::escape( hash[ "artist" ] ) )
.arg( album );
.arg( album )
.arg( QString( "\n<i>%1</i>" ).arg( tr( "by", "preposition to link track and artist" ) ) );
}
else
{