[Amarok] 2b03c5e EBN fixes: Incorrect usage of i18n().
Mark Kretschmann
kretschmann at kde.org
Sat Mar 20 08:45:04 CET 2010
commit 2b03c5ee7860aaa03641f93816ca60ea26df2127
Author: Mark Kretschmann <kretschmann at kde.org>
Date: Sat Mar 20 08:49:31 2010 +0100
EBN fixes: Incorrect usage of i18n().
Folks, please remember that extra i18n() arguments are _not_ given with
.arg(), but rather right after the string, separated by a comma.
CCMAIL: amarok-devel at kde.org
diff --git a/src/browsers/collectionbrowser/CollectionTreeItemDelegate.cpp b/src/browsers/collectionbrowser/CollectionTreeItemDelegate.cpp
index ee56b6c..5202adb 100644
--- a/src/browsers/collectionbrowser/CollectionTreeItemDelegate.cpp
+++ b/src/browsers/collectionbrowser/CollectionTreeItemDelegate.cpp
@@ -154,7 +154,7 @@ CollectionTreeItemDelegate::paint( QPainter *painter, const QStyleOptionViewItem
// TODO: set text in a tooltip where we can show extra info (eg bytes available, not just percentage)
if( isHover && capacityRect.contains( cursorPos ) )
- capacityBar.setText( i18n("%1% used").arg( QString::number(used) ) );
+ capacityBar.setText( i18n("%1% used", QString::number(used) ) );
capacityBar.drawCapacityBar( painter, capacityRect );
}
diff --git a/src/collection/ipodcollection/handler/IpodHandler.cpp b/src/collection/ipodcollection/handler/IpodHandler.cpp
index fc75bba..9f46a99 100644
--- a/src/collection/ipodcollection/handler/IpodHandler.cpp
+++ b/src/collection/ipodcollection/handler/IpodHandler.cpp
@@ -243,8 +243,8 @@ IpodHandler::init()
// TODO: turn into a switch statement, this is too convoluted
- QString msg = i18n( "Media Device: could not find iTunesDB on device mounted at %1. "
- "Attempt to initialize your iPod?" ).arg( mountPoint() );
+ const QString msg = i18n( "Media Device: could not find iTunesDB on device mounted at %1. "
+ "Attempt to initialize your iPod?", mountPoint() );
if( KMessageBox::warningContinueCancel( 0, msg, i18n( "Initialize iPod?" ),
KGuiItem( i18n( "&Initialize" ), "new" ) ) == KMessageBox::Continue )
{
diff --git a/src/dialogs/CollectionSetup.cpp b/src/dialogs/CollectionSetup.cpp
index 2a67d24..d5bb5f2 100644
--- a/src/dialogs/CollectionSetup.cpp
+++ b/src/dialogs/CollectionSetup.cpp
@@ -64,7 +64,7 @@ CollectionSetupTreeView::slotPressed( const QModelIndex &index )
QDBusReply<bool> reply = interface.call( "isDirInCollection", m_currDir );
if( reply.isValid() && reply.value() )
{
- m_rescanDirAction->setText( i18n( "Rescan '%1'" ).arg( m_currDir ) );
+ m_rescanDirAction->setText( i18n( "Rescan '%1'", m_currDir ) );
QMenu menu;
menu.addAction( m_rescanDirAction );
menu.exec( QCursor::pos() );
diff --git a/src/playlist/PlaylistWidget.cpp b/src/playlist/PlaylistWidget.cpp
index 7c61120..b03dab3 100644
--- a/src/playlist/PlaylistWidget.cpp
+++ b/src/playlist/PlaylistWidget.cpp
@@ -189,10 +189,7 @@ Playlist::Widget::playlistProviderAdded( PlaylistProvider *provider, int categor
dynamic_cast<UserPlaylistProvider *>(provider);
if( userProvider == 0 )
return;
- QAction *action = new KAction( userProvider->icon(),
- i18n("&Save playlist to \"%1\"").arg( provider->prettyName() ),
- this
- );
+ QAction *action = new KAction( userProvider->icon(), i18n("&Save playlist to \"%1\"", provider->prettyName() ), this );
action->setData( QVariant::fromValue( QPointer<UserPlaylistProvider>( userProvider ) ) );
m_saveActions->addAction( provider->objectName(), action );
More information about the Amarok-devel
mailing list