1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-07-31 03:10:12 +02:00

Merge pull request #171 from lliehu/add-context

Add context for placeholders in 3 UI messages added recently
This commit is contained in:
Christian Muehlhaeuser
2013-03-19 11:21:17 -07:00

View File

@@ -190,9 +190,9 @@ FdoNotifyPlugin::nowPlaying( const QVariant& input )
// Remark: If using xml-based markup in notifications, the supplied strings need to be escaped. // Remark: If using xml-based markup in notifications, the supplied strings need to be escaped.
QString album; QString album;
if ( !hash[ "album" ].isEmpty() ) if ( !hash[ "album" ].isEmpty() )
album = tr( "<br /><i>on</i> %1" ).arg( Qt::escape( hash[ "album" ] ) ); album = tr( "<br /><i>on</i> %1", "%1 is an album name" ).arg( Qt::escape( hash[ "album" ] ) );
messageText = tr( "%1<br /><i>by</i> %2%3." ) 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" )
.arg( Qt::escape( hash[ "title" ] ) ) .arg( Qt::escape( hash[ "title" ] ) )
.arg( Qt::escape( hash[ "artist" ] ) ) .arg( Qt::escape( hash[ "artist" ] ) )
.arg( album ); .arg( album );
@@ -201,9 +201,9 @@ FdoNotifyPlugin::nowPlaying( const QVariant& input )
{ {
QString album; QString album;
if ( !hash[ "album" ].isEmpty() ) if ( !hash[ "album" ].isEmpty() )
album = QString( " %1" ).arg( tr( "on \"%1\"" ).arg( hash[ "album" ] ) ); album = QString( " %1" ).arg( tr( "on \"%1\"", "%1 is an album name" ).arg( hash[ "album" ] ) );
messageText = tr( "\"%1\" by %2%3." ) messageText = tr( "\"%1\" by %2%3.", "%1 is a title, %2 is an artist and %3 is replaced by either the previous message or nothing" )
.arg( hash[ "title" ] ) .arg( hash[ "title" ] )
.arg( hash[ "artist" ] ) .arg( hash[ "artist" ] )
.arg( album ); .arg( album );