mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-03-20 07:49:42 +01:00
* Fixed a few more translations. Could fix TWK-591.
This commit is contained in:
parent
97e69f9dcc
commit
e4ad727a6f
src
@ -114,6 +114,22 @@ ContextWidget::~ContextWidget()
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
ContextWidget::changeEvent( QEvent* e )
|
||||
{
|
||||
QWidget::changeEvent( e );
|
||||
switch ( e->type() )
|
||||
{
|
||||
case QEvent::LanguageChange:
|
||||
ui->retranslateUi( this );
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
ContextWidget::layoutViews( bool animate )
|
||||
{
|
||||
|
@ -63,6 +63,7 @@ private slots:
|
||||
protected:
|
||||
void paintEvent( QPaintEvent* e );
|
||||
void resizeEvent( QResizeEvent* e );
|
||||
void changeEvent( QEvent* e );
|
||||
|
||||
private:
|
||||
void fadeOut( bool animate );
|
||||
|
@ -404,22 +404,22 @@ LastFmPlugin::notInCacheSlot( QHash<QString, QString> criteria, Tomahawk::InfoSy
|
||||
InfoStringHash c;
|
||||
c[ "type" ] = "tracks";
|
||||
c[ "id" ] = "chart.getTopTracks";
|
||||
c[ "label" ] = "Top Tracks";
|
||||
c[ "label" ] = tr( "Top Tracks" );
|
||||
track_charts.append( c );
|
||||
c[ "id" ] = "chart.getLovedTracks";
|
||||
c[ "label" ] = "Loved Tracks";
|
||||
c[ "label" ] = tr( "Loved Tracks" );
|
||||
track_charts.append( c );
|
||||
c[ "id" ] = "chart.getHypedTracks";
|
||||
c[ "label" ] = "Hyped Tracks";
|
||||
c[ "label" ] = tr( "Hyped Tracks" );
|
||||
track_charts.append( c );
|
||||
|
||||
QList< InfoStringHash > artist_charts;
|
||||
c[ "type" ] = "artists";
|
||||
c[ "id" ] = "chart.getTopArtists";
|
||||
c[ "label" ] = "Top Artists";
|
||||
c[ "label" ] = tr( "Top Artists" );
|
||||
artist_charts.append( c );
|
||||
c[ "id" ] = "chart.getHypedArtists";
|
||||
c[ "label" ] = "Hyped Artists";
|
||||
c[ "label" ] = tr( "Hyped Artists" );
|
||||
artist_charts.append( c );
|
||||
|
||||
|
||||
|
@ -736,29 +736,29 @@ Tomahawk::EchonestControl::calculateSummary()
|
||||
if( selectedType() == "Artist" ) {
|
||||
// magic char is used by EchonestGenerator to split the prefix from the artist name
|
||||
if( static_cast< Echonest::DynamicPlaylist::ArtistTypeEnum >( m_matchData.toInt() ) == Echonest::DynamicPlaylist::ArtistType )
|
||||
summary = QString( "only by ~%1" ).arg( m_data.second.toString() );
|
||||
summary = tr( "only by ~%1" ).arg( m_data.second.toString() );
|
||||
else if( static_cast< Echonest::DynamicPlaylist::ArtistTypeEnum >( m_matchData.toInt() ) == Echonest::DynamicPlaylist::ArtistRadioType )
|
||||
summary = QString( "similar to ~%1" ).arg( m_data.second.toString() );
|
||||
summary = tr( "similar to ~%1" ).arg( m_data.second.toString() );
|
||||
} else if( selectedType() == "Artist Description" ) {
|
||||
summary = QString( "with genre ~%1" ).arg( m_data.second.toString() );
|
||||
summary = tr( "with genre ~%1" ).arg( m_data.second.toString() );
|
||||
} else if( selectedType() == "User Radio" ) {
|
||||
QComboBox* b = qobject_cast< QComboBox* >( m_input.data() );
|
||||
if ( b )
|
||||
{
|
||||
if ( b->currentText().isEmpty() || b->itemData( b->currentIndex() ).isNull() )
|
||||
summary = "from no one";
|
||||
summary = tr( "from no one" );
|
||||
else
|
||||
{
|
||||
QString subSum;
|
||||
if ( b->currentText() == "My Collection" )
|
||||
if ( b->currentText() == tr( "My Collection" ) )
|
||||
subSum = "my";
|
||||
else
|
||||
subSum = b->currentText();
|
||||
summary = QString( "from %1 radio" ).arg( subSum );
|
||||
summary = tr( "from %1 radio" ).arg( subSum );
|
||||
}
|
||||
}
|
||||
else
|
||||
summary = "from no one";
|
||||
summary = tr( "from no one" );
|
||||
} else if( selectedType() == "Artist Description" || selectedType() == "Song" ) {
|
||||
summary = QString( "similar to ~%1" ).arg( m_data.second.toString() );
|
||||
} else if( selectedType() == "Variety" || selectedType() == "Danceability" || selectedType() == "Artist Hotttnesss" ||
|
||||
@ -777,25 +777,25 @@ Tomahawk::EchonestControl::calculateSummary()
|
||||
modifier = "high";
|
||||
else if( 0.8 <= sliderVal && sliderVal <= 1 )
|
||||
modifier = "very high";
|
||||
summary = QString( "with %1 %2" ).arg( modifier ).arg( selectedType().toLower() );
|
||||
summary = tr( "with %1 %2" ).arg( modifier ).arg( selectedType().toLower() );
|
||||
} else if( selectedType() == "Tempo" ) {
|
||||
summary = QString( "about %1 BPM" ).arg( m_data.second.toString() );
|
||||
summary = tr( "about %1 BPM" ).arg( m_data.second.toString() );
|
||||
} else if( selectedType() == "Duration" ) {
|
||||
summary = QString( "about %1 minutes long" ).arg( m_data.second.toInt() / 60 );
|
||||
summary = tr( "about %n minute(s) long", "", m_data.second.toInt() / 60 );
|
||||
} else if( selectedType() == "Loudness" ) {
|
||||
summary = QString( "about %1 dB" ).arg( m_data.second.toString() );
|
||||
summary = tr( "about %1 dB" ).arg( m_data.second.toString() );
|
||||
} else if( selectedType() == "Latitude" || selectedType() == "Longitude" ) {
|
||||
summary = QString( "at around %1%2 %3" ).arg( m_data.second.toString() ).arg( QString( QChar( 0x00B0 ) ) ).arg( selectedType().toLower() );
|
||||
summary = tr( "at around %1%2 %3" ).arg( m_data.second.toString() ).arg( QString( QChar( 0x00B0 ) ) ).arg( selectedType().toLower() );
|
||||
} else if( selectedType() == "Key" ) {
|
||||
Q_ASSERT( !m_input.isNull() );
|
||||
Q_ASSERT( qobject_cast< QComboBox* >( m_input.data() ) );
|
||||
QString keyName = qobject_cast< QComboBox* >( m_input.data() )->currentText().toLower();
|
||||
summary = QString( "in %1" ).arg( keyName );
|
||||
summary = tr( "in %1" ).arg( keyName );
|
||||
} else if( selectedType() == "Mode" ) {
|
||||
Q_ASSERT( !m_input.isNull() );
|
||||
Q_ASSERT( qobject_cast< QComboBox* >( m_input.data() ) );
|
||||
QString modeName = qobject_cast< QComboBox* >( m_input.data() )->currentText().toLower();
|
||||
summary = QString( "in a %1 key" ).arg( modeName );
|
||||
summary = tr( "in a %1 key" ).arg( modeName );
|
||||
} else if( selectedType() == "Sorting" ) {
|
||||
Q_ASSERT( !m_input.isNull() );
|
||||
Q_ASSERT( qobject_cast< QComboBox* >( m_input.data() ) );
|
||||
@ -805,17 +805,17 @@ Tomahawk::EchonestControl::calculateSummary()
|
||||
Q_ASSERT( qobject_cast< QComboBox* >( m_match.data() ) );
|
||||
QString ascdesc = qobject_cast< QComboBox* >( m_match.data() )->currentText().toLower();
|
||||
|
||||
summary = QString( "sorted in %1 %2 order" ).arg( ascdesc ).arg( sortType );
|
||||
summary = tr( "sorted in %1 %2 order" ).arg( ascdesc ).arg( sortType );
|
||||
} else if( selectedType() == "Mood" ) {
|
||||
Q_ASSERT( !m_input.isNull() );
|
||||
Q_ASSERT( qobject_cast< QComboBox* >( m_input.data() ) );
|
||||
QString text = qobject_cast< QComboBox* >( m_input.data() )->currentText().toLower();
|
||||
summary = QString( "with a %1 mood" ).arg( text );
|
||||
summary = tr( "with a %1 mood" ).arg( text );
|
||||
} else if( selectedType() == "Style" ) {
|
||||
Q_ASSERT( !m_input.isNull() );
|
||||
Q_ASSERT( qobject_cast< QComboBox* >( m_input.data() ) );
|
||||
QString text = qobject_cast< QComboBox* >( m_input.data() )->currentText().toLower();
|
||||
summary = QString( "in a %1 style" ).arg( text );
|
||||
summary = tr( "in a %1 style" ).arg( text );
|
||||
}
|
||||
m_summary = summary;
|
||||
}
|
||||
|
@ -60,12 +60,29 @@ QueueView::~QueueView()
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
QueueView::changeEvent( QEvent* e )
|
||||
{
|
||||
QWidget::changeEvent( e );
|
||||
switch ( e->type() )
|
||||
{
|
||||
case QEvent::LanguageChange:
|
||||
ui->retranslateUi( this );
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
PlaylistView*
|
||||
QueueView::queue() const
|
||||
{
|
||||
return ui->queue;
|
||||
}
|
||||
|
||||
|
||||
bool
|
||||
QueueView::eventFilter( QObject* obj, QEvent* ev )
|
||||
{
|
||||
@ -94,6 +111,7 @@ QueueView::eventFilter( QObject* obj, QEvent* ev )
|
||||
return QObject::eventFilter( obj, ev );
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
QueueView::hide()
|
||||
{
|
||||
|
@ -54,6 +54,9 @@ public slots:
|
||||
virtual void show();
|
||||
virtual void hide();
|
||||
|
||||
protected:
|
||||
void changeEvent( QEvent* e );
|
||||
|
||||
private:
|
||||
Ui::QueueView* ui;
|
||||
QTimer* m_dragTimer;
|
||||
|
@ -486,7 +486,7 @@ TomahawkApp::initLocalCollection()
|
||||
{
|
||||
connect( SourceList::instance(), SIGNAL( ready() ), SLOT( initServent() ) );
|
||||
|
||||
source_ptr src( new Source( 0, "My Collection" ) );
|
||||
source_ptr src( new Source( 0, tr( "My Collection" ) ) );
|
||||
collection_ptr coll( new LocalCollection( src ) );
|
||||
|
||||
src->addCollection( coll );
|
||||
|
Loading…
x
Reference in New Issue
Block a user