From 031931c0e8d3451f2467c28e99507dc5fd396406 Mon Sep 17 00:00:00 2001 From: Lasse Liehu Date: Sat, 15 Dec 2012 19:02:18 +0200 Subject: [PATCH 1/2] Disable translation of some strings in .ui files They are either * placeholder text or * other text that is never shown to the user --- src/AudioControls.ui | 30 +++++++++---------- src/SearchBox.ui | 2 +- src/Settings_Accounts.ui | 2 +- src/Settings_Advanced.ui | 2 +- src/Settings_Collection.ui | 2 +- src/SocialWidget.ui | 6 ++-- src/accounts/zeroconf/ConfigWidget.ui | 2 +- .../accounts/lastfm/LastFmConfig.ui | 2 +- .../accounts/spotify/SpotifyAccountConfig.ui | 2 +- src/libtomahawk/context/ContextWidget.ui | 2 +- .../filemetadata/MetadataEditor.ui | 2 +- src/libtomahawk/infobar/InfoBar.ui | 2 +- src/libtomahawk/playlist/QueueView.ui | 2 +- .../widgets/infowidgets/AlbumInfoWidget.ui | 4 +-- .../widgets/infowidgets/ArtistInfoWidget.ui | 4 +-- .../widgets/infowidgets/TrackInfoWidget.ui | 6 ++-- 16 files changed, 36 insertions(+), 36 deletions(-) diff --git a/src/AudioControls.ui b/src/AudioControls.ui index 3db6af485..a531df131 100644 --- a/src/AudioControls.ui +++ b/src/AudioControls.ui @@ -71,7 +71,7 @@ -Prev +Prev @@ -83,14 +83,14 @@ -Play +Play -Pause +Pause @@ -99,7 +99,7 @@ -Next +Next @@ -225,7 +225,7 @@ -Artist +Artist @@ -244,7 +244,7 @@ -Album +Album @@ -292,7 +292,7 @@ PointingHandCursor -social +social @@ -308,7 +308,7 @@ PointingHandCursor -love +love @@ -341,7 +341,7 @@ PointingHandCursor -resolver +resolver @@ -377,7 +377,7 @@ -Time +Time Qt::AlignLeft|Qt::AlignVCenter @@ -406,7 +406,7 @@ -Time Left +Time Left Qt::AlignRight|Qt::AlignVCenter @@ -487,7 +487,7 @@ -Shuffle +Shuffle @@ -500,7 +500,7 @@ -Repeat +Repeat @@ -538,7 +538,7 @@ -Low +Low @@ -570,7 +570,7 @@ -High +High diff --git a/src/SearchBox.ui b/src/SearchBox.ui index 95e9a248d..c77443773 100644 --- a/src/SearchBox.ui +++ b/src/SearchBox.ui @@ -11,7 +11,7 @@ - Form + Form diff --git a/src/Settings_Accounts.ui b/src/Settings_Accounts.ui index de51ed1f0..a0154bcba 100644 --- a/src/Settings_Accounts.ui +++ b/src/Settings_Accounts.ui @@ -11,7 +11,7 @@ - Form + Form diff --git a/src/Settings_Advanced.ui b/src/Settings_Advanced.ui index e7e9a5dd7..08636c286 100644 --- a/src/Settings_Advanced.ui +++ b/src/Settings_Advanced.ui @@ -17,7 +17,7 @@ - Form + Form diff --git a/src/Settings_Collection.ui b/src/Settings_Collection.ui index 6579d2d51..590d46fea 100644 --- a/src/Settings_Collection.ui +++ b/src/Settings_Collection.ui @@ -17,7 +17,7 @@ - Form + Form diff --git a/src/SocialWidget.ui b/src/SocialWidget.ui index 636dfaa24..155fa7112 100644 --- a/src/SocialWidget.ui +++ b/src/SocialWidget.ui @@ -11,7 +11,7 @@ - Form + Form @@ -66,7 +66,7 @@ - Cover + Cover @@ -123,7 +123,7 @@ - TextLabel + TextLabel diff --git a/src/accounts/zeroconf/ConfigWidget.ui b/src/accounts/zeroconf/ConfigWidget.ui index 58633a017..84390fa37 100644 --- a/src/accounts/zeroconf/ConfigWidget.ui +++ b/src/accounts/zeroconf/ConfigWidget.ui @@ -11,7 +11,7 @@ - Form + Form diff --git a/src/libtomahawk/accounts/lastfm/LastFmConfig.ui b/src/libtomahawk/accounts/lastfm/LastFmConfig.ui index 19629957b..969b2aa16 100644 --- a/src/libtomahawk/accounts/lastfm/LastFmConfig.ui +++ b/src/libtomahawk/accounts/lastfm/LastFmConfig.ui @@ -11,7 +11,7 @@ - Form + Form diff --git a/src/libtomahawk/accounts/spotify/SpotifyAccountConfig.ui b/src/libtomahawk/accounts/spotify/SpotifyAccountConfig.ui index d465487a1..129d8a129 100644 --- a/src/libtomahawk/accounts/spotify/SpotifyAccountConfig.ui +++ b/src/libtomahawk/accounts/spotify/SpotifyAccountConfig.ui @@ -17,7 +17,7 @@ - Form + Form diff --git a/src/libtomahawk/context/ContextWidget.ui b/src/libtomahawk/context/ContextWidget.ui index 5282df4ad..f47b6a15f 100644 --- a/src/libtomahawk/context/ContextWidget.ui +++ b/src/libtomahawk/context/ContextWidget.ui @@ -23,7 +23,7 @@ - InfoBar + InfoBar diff --git a/src/libtomahawk/filemetadata/MetadataEditor.ui b/src/libtomahawk/filemetadata/MetadataEditor.ui index 0729627d6..5ea2401d4 100644 --- a/src/libtomahawk/filemetadata/MetadataEditor.ui +++ b/src/libtomahawk/filemetadata/MetadataEditor.ui @@ -11,7 +11,7 @@ - Form + Form diff --git a/src/libtomahawk/infobar/InfoBar.ui b/src/libtomahawk/infobar/InfoBar.ui index afb8d6cc9..a24e59030 100644 --- a/src/libtomahawk/infobar/InfoBar.ui +++ b/src/libtomahawk/infobar/InfoBar.ui @@ -23,7 +23,7 @@ - InfoBar + InfoBar diff --git a/src/libtomahawk/playlist/QueueView.ui b/src/libtomahawk/playlist/QueueView.ui index fba21c5b1..faae65081 100644 --- a/src/libtomahawk/playlist/QueueView.ui +++ b/src/libtomahawk/playlist/QueueView.ui @@ -23,7 +23,7 @@ - InfoBar + InfoBar diff --git a/src/libtomahawk/widgets/infowidgets/AlbumInfoWidget.ui b/src/libtomahawk/widgets/infowidgets/AlbumInfoWidget.ui index d565c3776..a4d3b1b66 100644 --- a/src/libtomahawk/widgets/infowidgets/AlbumInfoWidget.ui +++ b/src/libtomahawk/widgets/infowidgets/AlbumInfoWidget.ui @@ -11,7 +11,7 @@ - Form + Form @@ -43,7 +43,7 @@ - Cover + Cover Qt::AlignCenter diff --git a/src/libtomahawk/widgets/infowidgets/ArtistInfoWidget.ui b/src/libtomahawk/widgets/infowidgets/ArtistInfoWidget.ui index b4bed1aea..3ad93f889 100644 --- a/src/libtomahawk/widgets/infowidgets/ArtistInfoWidget.ui +++ b/src/libtomahawk/widgets/infowidgets/ArtistInfoWidget.ui @@ -11,7 +11,7 @@ - Form + Form @@ -43,7 +43,7 @@ - Cover + Cover Qt::AlignCenter diff --git a/src/libtomahawk/widgets/infowidgets/TrackInfoWidget.ui b/src/libtomahawk/widgets/infowidgets/TrackInfoWidget.ui index 926ffe2f6..9a36699d3 100644 --- a/src/libtomahawk/widgets/infowidgets/TrackInfoWidget.ui +++ b/src/libtomahawk/widgets/infowidgets/TrackInfoWidget.ui @@ -11,7 +11,7 @@ - Form + Form @@ -43,7 +43,7 @@ - Cover + Cover Qt::AlignCenter @@ -78,7 +78,7 @@ - Statistics + Statistics Qt::AlignCenter From 66c05cf9b336e17d06ba0c526551b543eca0c627 Mon Sep 17 00:00:00 2001 From: Lasse Liehu Date: Thu, 20 Dec 2012 13:57:20 +0200 Subject: [PATCH 2/2] A few string changes Make a few better translatable and one more understandable --- src/accounts/zeroconf/ZeroconfAccount.cpp | 4 ++-- src/accounts/zeroconf/ZeroconfAccount.h | 2 +- src/libtomahawk/Query.cpp | 2 +- src/libtomahawk/TomahawkSettings.cpp | 2 +- src/libtomahawk/accounts/lastfm/LastFmConfig.cpp | 1 + src/libtomahawk/utils/GuiHelpers.cpp | 8 ++++---- 6 files changed, 10 insertions(+), 9 deletions(-) diff --git a/src/accounts/zeroconf/ZeroconfAccount.cpp b/src/accounts/zeroconf/ZeroconfAccount.cpp index b337b48e1..e2cf9a674 100644 --- a/src/accounts/zeroconf/ZeroconfAccount.cpp +++ b/src/accounts/zeroconf/ZeroconfAccount.cpp @@ -64,8 +64,8 @@ ZeroconfFactory::icon() const ZeroconfAccount::ZeroconfAccount( const QString& accountId ) : Account( accountId ) { - setAccountServiceName( "Local Network" ); - setAccountFriendlyName( "Local Network" ); + setAccountServiceName( tr( "Local Network" ) ); + setAccountFriendlyName( tr( "Local Network" ) ); setTypes( SipType ); } diff --git a/src/accounts/zeroconf/ZeroconfAccount.h b/src/accounts/zeroconf/ZeroconfAccount.h index 136c971c0..fc7a939ae 100644 --- a/src/accounts/zeroconf/ZeroconfAccount.h +++ b/src/accounts/zeroconf/ZeroconfAccount.h @@ -39,7 +39,7 @@ public: virtual ~ZeroconfFactory(); virtual QString factoryId() const { return "zeroconfaccount"; } - virtual QString prettyName() const { return "Local Network"; } + virtual QString prettyName() const { return tr( "Local Network" ); } QString description() const { return tr( "Automatically connect to Tomahawks on the local network" ); } virtual bool isUnique() const { return true; } AccountTypes types() const { return AccountTypes( SipType ); }; diff --git a/src/libtomahawk/Query.cpp b/src/libtomahawk/Query.cpp index 378bb8d0c..47e5852fc 100644 --- a/src/libtomahawk/Query.cpp +++ b/src/libtomahawk/Query.cpp @@ -773,7 +773,7 @@ Query::socialActionDescription( const QString& action, DescriptionMode mode ) co desc += " " + tr( "and" ) + " " + tr( "%n other(s)", "", loveCounter - 3 ) + ""; if ( mode == Short ) - desc = "" + tr( "%1 people" ).arg( loveCounter ) + ""; + desc = "" + tr( "%n people", "", loveCounter ) + ""; desc += " " + tr( "loved this track" ); //FIXME: more action descs required } diff --git a/src/libtomahawk/TomahawkSettings.cpp b/src/libtomahawk/TomahawkSettings.cpp index 0aa059583..ad3f9e855 100644 --- a/src/libtomahawk/TomahawkSettings.cpp +++ b/src/libtomahawk/TomahawkSettings.cpp @@ -372,7 +372,7 @@ TomahawkSettings::doUpgrade( int oldVersion, int newVersion ) } else if ( pluginName == "sipzeroconf" ) { - setValue( QString( "accounts/%1/accountfriendlyname" ).arg( accountKey ), "Local Network" ); + setValue( QString( "accounts/%1/accountfriendlyname" ).arg( accountKey ), tr( "Local Network" ) ); } beginGroup( "accounts/" + accountKey ); diff --git a/src/libtomahawk/accounts/lastfm/LastFmConfig.cpp b/src/libtomahawk/accounts/lastfm/LastFmConfig.cpp index 9d985f156..1351df07e 100644 --- a/src/libtomahawk/accounts/lastfm/LastFmConfig.cpp +++ b/src/libtomahawk/accounts/lastfm/LastFmConfig.cpp @@ -191,6 +191,7 @@ LastFmConfig::onHistoryLoaded() { if ( m_page != total ) { + //: Text on a button that resumes import m_ui->importHistory->setText( tr( "History Incomplete. Resume" ) ); m_ui->importHistory->setEnabled( true ); } diff --git a/src/libtomahawk/utils/GuiHelpers.cpp b/src/libtomahawk/utils/GuiHelpers.cpp index a682f8b9c..2342c5344 100644 --- a/src/libtomahawk/utils/GuiHelpers.cpp +++ b/src/libtomahawk/utils/GuiHelpers.cpp @@ -99,7 +99,7 @@ createAccountFromFactory( Tomahawk::Accounts::AccountFactory* factory, QWidget* { #ifdef Q_WS_MAC // on osx a sheet needs to be non-modal - DelegateConfigWrapper* dialog = new DelegateConfigWrapper( account->configurationWidget(), account->aboutWidget(), QString("%1 Config" ).arg( account->accountFriendlyName() ), parent, Qt::Sheet ); + DelegateConfigWrapper* dialog = new DelegateConfigWrapper( account->configurationWidget(), account->aboutWidget(), QObject::tr( "%1 Config" ).arg( account->accountFriendlyName() ), parent, Qt::Sheet ); dialog->setProperty( "accountplugin", QVariant::fromValue< QObject* >( account ) ); UtilsObject* obj = new UtilsObject( dialog ); @@ -110,7 +110,7 @@ createAccountFromFactory( Tomahawk::Accounts::AccountFactory* factory, QWidget* dialog->show(); #else - DelegateConfigWrapper dialog( account->configurationWidget(), account->aboutWidget(), QString("%1 Config" ).arg( account->accountFriendlyName() ), parent ); + DelegateConfigWrapper dialog( account->configurationWidget(), account->aboutWidget(), QObject::tr( "%1 Config" ).arg( account->accountFriendlyName() ), parent ); QWeakPointer< DelegateConfigWrapper > watcher( &dialog ); if( account->configurationWidget()->metaObject()->indexOfSignal( "dataError(bool)" ) > -1 ) @@ -139,7 +139,7 @@ openAccountConfig( Tomahawk::Accounts::Account* account, QWidget* parent, bool s if( account->configurationWidget() ) { #ifndef Q_OS_MAC - DelegateConfigWrapper dialog( account->configurationWidget(), account->aboutWidget(), QString("%1 Configuration" ).arg( account->accountFriendlyName() ), parent ); + DelegateConfigWrapper dialog( account->configurationWidget(), account->aboutWidget(), QObject::tr("%1 Configuration" ).arg( account->accountFriendlyName() ), parent ); dialog.setShowDelete( showDelete ); QWeakPointer< DelegateConfigWrapper > watcher( &dialog ); int ret = dialog.exec(); @@ -154,7 +154,7 @@ openAccountConfig( Tomahawk::Accounts::Account* account, QWidget* parent, bool s } #else // on osx a sheet needs to be non-modal - DelegateConfigWrapper* dialog = new DelegateConfigWrapper( account->configurationWidget(), account->aboutWidget(), QString("%1 Configuration" ).arg( account->accountFriendlyName() ), parent, Qt::Sheet ); + DelegateConfigWrapper* dialog = new DelegateConfigWrapper( account->configurationWidget(), account->aboutWidget(), QObject::tr("%1 Configuration" ).arg( account->accountFriendlyName() ), parent, Qt::Sheet ); dialog->setShowDelete( showDelete ); dialog->setProperty( "accountplugin", QVariant::fromValue< QObject* >( account ) ); UtilsObject* obj = new UtilsObject( dialog );