mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-01 03:40:16 +02:00
* Fixed a few more translations. Could fix TWK-591.
This commit is contained in:
@@ -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
|
void
|
||||||
ContextWidget::layoutViews( bool animate )
|
ContextWidget::layoutViews( bool animate )
|
||||||
{
|
{
|
||||||
|
@@ -63,6 +63,7 @@ private slots:
|
|||||||
protected:
|
protected:
|
||||||
void paintEvent( QPaintEvent* e );
|
void paintEvent( QPaintEvent* e );
|
||||||
void resizeEvent( QResizeEvent* e );
|
void resizeEvent( QResizeEvent* e );
|
||||||
|
void changeEvent( QEvent* e );
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void fadeOut( bool animate );
|
void fadeOut( bool animate );
|
||||||
|
@@ -404,22 +404,22 @@ LastFmPlugin::notInCacheSlot( QHash<QString, QString> criteria, Tomahawk::InfoSy
|
|||||||
InfoStringHash c;
|
InfoStringHash c;
|
||||||
c[ "type" ] = "tracks";
|
c[ "type" ] = "tracks";
|
||||||
c[ "id" ] = "chart.getTopTracks";
|
c[ "id" ] = "chart.getTopTracks";
|
||||||
c[ "label" ] = "Top Tracks";
|
c[ "label" ] = tr( "Top Tracks" );
|
||||||
track_charts.append( c );
|
track_charts.append( c );
|
||||||
c[ "id" ] = "chart.getLovedTracks";
|
c[ "id" ] = "chart.getLovedTracks";
|
||||||
c[ "label" ] = "Loved Tracks";
|
c[ "label" ] = tr( "Loved Tracks" );
|
||||||
track_charts.append( c );
|
track_charts.append( c );
|
||||||
c[ "id" ] = "chart.getHypedTracks";
|
c[ "id" ] = "chart.getHypedTracks";
|
||||||
c[ "label" ] = "Hyped Tracks";
|
c[ "label" ] = tr( "Hyped Tracks" );
|
||||||
track_charts.append( c );
|
track_charts.append( c );
|
||||||
|
|
||||||
QList< InfoStringHash > artist_charts;
|
QList< InfoStringHash > artist_charts;
|
||||||
c[ "type" ] = "artists";
|
c[ "type" ] = "artists";
|
||||||
c[ "id" ] = "chart.getTopArtists";
|
c[ "id" ] = "chart.getTopArtists";
|
||||||
c[ "label" ] = "Top Artists";
|
c[ "label" ] = tr( "Top Artists" );
|
||||||
artist_charts.append( c );
|
artist_charts.append( c );
|
||||||
c[ "id" ] = "chart.getHypedArtists";
|
c[ "id" ] = "chart.getHypedArtists";
|
||||||
c[ "label" ] = "Hyped Artists";
|
c[ "label" ] = tr( "Hyped Artists" );
|
||||||
artist_charts.append( c );
|
artist_charts.append( c );
|
||||||
|
|
||||||
|
|
||||||
|
@@ -736,29 +736,29 @@ Tomahawk::EchonestControl::calculateSummary()
|
|||||||
if( selectedType() == "Artist" ) {
|
if( selectedType() == "Artist" ) {
|
||||||
// magic char is used by EchonestGenerator to split the prefix from the artist name
|
// 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 )
|
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 )
|
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" ) {
|
} 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" ) {
|
} else if( selectedType() == "User Radio" ) {
|
||||||
QComboBox* b = qobject_cast< QComboBox* >( m_input.data() );
|
QComboBox* b = qobject_cast< QComboBox* >( m_input.data() );
|
||||||
if ( b )
|
if ( b )
|
||||||
{
|
{
|
||||||
if ( b->currentText().isEmpty() || b->itemData( b->currentIndex() ).isNull() )
|
if ( b->currentText().isEmpty() || b->itemData( b->currentIndex() ).isNull() )
|
||||||
summary = "from no one";
|
summary = tr( "from no one" );
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
QString subSum;
|
QString subSum;
|
||||||
if ( b->currentText() == "My Collection" )
|
if ( b->currentText() == tr( "My Collection" ) )
|
||||||
subSum = "my";
|
subSum = "my";
|
||||||
else
|
else
|
||||||
subSum = b->currentText();
|
subSum = b->currentText();
|
||||||
summary = QString( "from %1 radio" ).arg( subSum );
|
summary = tr( "from %1 radio" ).arg( subSum );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
summary = "from no one";
|
summary = tr( "from no one" );
|
||||||
} else if( selectedType() == "Artist Description" || selectedType() == "Song" ) {
|
} else if( selectedType() == "Artist Description" || selectedType() == "Song" ) {
|
||||||
summary = QString( "similar to ~%1" ).arg( m_data.second.toString() );
|
summary = QString( "similar to ~%1" ).arg( m_data.second.toString() );
|
||||||
} else if( selectedType() == "Variety" || selectedType() == "Danceability" || selectedType() == "Artist Hotttnesss" ||
|
} else if( selectedType() == "Variety" || selectedType() == "Danceability" || selectedType() == "Artist Hotttnesss" ||
|
||||||
@@ -777,25 +777,25 @@ Tomahawk::EchonestControl::calculateSummary()
|
|||||||
modifier = "high";
|
modifier = "high";
|
||||||
else if( 0.8 <= sliderVal && sliderVal <= 1 )
|
else if( 0.8 <= sliderVal && sliderVal <= 1 )
|
||||||
modifier = "very high";
|
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" ) {
|
} 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" ) {
|
} 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" ) {
|
} 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" ) {
|
} 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" ) {
|
} else if( selectedType() == "Key" ) {
|
||||||
Q_ASSERT( !m_input.isNull() );
|
Q_ASSERT( !m_input.isNull() );
|
||||||
Q_ASSERT( qobject_cast< QComboBox* >( m_input.data() ) );
|
Q_ASSERT( qobject_cast< QComboBox* >( m_input.data() ) );
|
||||||
QString keyName = qobject_cast< QComboBox* >( m_input.data() )->currentText().toLower();
|
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" ) {
|
} else if( selectedType() == "Mode" ) {
|
||||||
Q_ASSERT( !m_input.isNull() );
|
Q_ASSERT( !m_input.isNull() );
|
||||||
Q_ASSERT( qobject_cast< QComboBox* >( m_input.data() ) );
|
Q_ASSERT( qobject_cast< QComboBox* >( m_input.data() ) );
|
||||||
QString modeName = qobject_cast< QComboBox* >( m_input.data() )->currentText().toLower();
|
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" ) {
|
} else if( selectedType() == "Sorting" ) {
|
||||||
Q_ASSERT( !m_input.isNull() );
|
Q_ASSERT( !m_input.isNull() );
|
||||||
Q_ASSERT( qobject_cast< QComboBox* >( m_input.data() ) );
|
Q_ASSERT( qobject_cast< QComboBox* >( m_input.data() ) );
|
||||||
@@ -805,17 +805,17 @@ Tomahawk::EchonestControl::calculateSummary()
|
|||||||
Q_ASSERT( qobject_cast< QComboBox* >( m_match.data() ) );
|
Q_ASSERT( qobject_cast< QComboBox* >( m_match.data() ) );
|
||||||
QString ascdesc = qobject_cast< QComboBox* >( m_match.data() )->currentText().toLower();
|
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" ) {
|
} else if( selectedType() == "Mood" ) {
|
||||||
Q_ASSERT( !m_input.isNull() );
|
Q_ASSERT( !m_input.isNull() );
|
||||||
Q_ASSERT( qobject_cast< QComboBox* >( m_input.data() ) );
|
Q_ASSERT( qobject_cast< QComboBox* >( m_input.data() ) );
|
||||||
QString text = qobject_cast< QComboBox* >( m_input.data() )->currentText().toLower();
|
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" ) {
|
} else if( selectedType() == "Style" ) {
|
||||||
Q_ASSERT( !m_input.isNull() );
|
Q_ASSERT( !m_input.isNull() );
|
||||||
Q_ASSERT( qobject_cast< QComboBox* >( m_input.data() ) );
|
Q_ASSERT( qobject_cast< QComboBox* >( m_input.data() ) );
|
||||||
QString text = qobject_cast< QComboBox* >( m_input.data() )->currentText().toLower();
|
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;
|
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*
|
PlaylistView*
|
||||||
QueueView::queue() const
|
QueueView::queue() const
|
||||||
{
|
{
|
||||||
return ui->queue;
|
return ui->queue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool
|
bool
|
||||||
QueueView::eventFilter( QObject* obj, QEvent* ev )
|
QueueView::eventFilter( QObject* obj, QEvent* ev )
|
||||||
{
|
{
|
||||||
@@ -94,6 +111,7 @@ QueueView::eventFilter( QObject* obj, QEvent* ev )
|
|||||||
return QObject::eventFilter( obj, ev );
|
return QObject::eventFilter( obj, ev );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
QueueView::hide()
|
QueueView::hide()
|
||||||
{
|
{
|
||||||
|
@@ -54,6 +54,9 @@ public slots:
|
|||||||
virtual void show();
|
virtual void show();
|
||||||
virtual void hide();
|
virtual void hide();
|
||||||
|
|
||||||
|
protected:
|
||||||
|
void changeEvent( QEvent* e );
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Ui::QueueView* ui;
|
Ui::QueueView* ui;
|
||||||
QTimer* m_dragTimer;
|
QTimer* m_dragTimer;
|
||||||
|
@@ -486,7 +486,7 @@ TomahawkApp::initLocalCollection()
|
|||||||
{
|
{
|
||||||
connect( SourceList::instance(), SIGNAL( ready() ), SLOT( initServent() ) );
|
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 ) );
|
collection_ptr coll( new LocalCollection( src ) );
|
||||||
|
|
||||||
src->addCollection( coll );
|
src->addCollection( coll );
|
||||||
|
Reference in New Issue
Block a user