mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-04-20 16:02:07 +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:
commit
f3b04a01e2
@ -190,9 +190,9 @@ 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" ).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[ "artist" ] ) )
|
||||
.arg( album );
|
||||
@ -201,9 +201,9 @@ FdoNotifyPlugin::nowPlaying( const QVariant& input )
|
||||
{
|
||||
QString album;
|
||||
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[ "artist" ] )
|
||||
.arg( album );
|
||||
|
Loading…
x
Reference in New Issue
Block a user