diff --git a/src/collection/collectionfilterwidget.cpp b/src/collection/collectionfilterwidget.cpp index 880294658..077edbe6e 100644 --- a/src/collection/collectionfilterwidget.cpp +++ b/src/collection/collectionfilterwidget.cpp @@ -61,9 +61,28 @@ CollectionFilterWidget::CollectionFilterWidget(QWidget *parent) ui_->setupUi(this); - // Add the available fields to the tooltip here instead of the ui file to prevent that they get translated by mistake. QString available_fields = Song::kFtsColumns.join(", ").replace(QRegExp("\\bfts"), ""); - ui_->filter->setToolTip(ui_->filter->toolTip().arg(available_fields)); + + ui_->filter->setToolTip( + "

" + + tr("Prefix a word with a field name to limit the search to that field, e.g.:") + + " " + + "" + + tr("artist") + + ":" + + "Strawbs" + + " " + + tr("searches the collection for all artists that contain the word") + + "Strawbs" + + "." + + "

" + + tr("Available fields") + + ": " + + "" + + available_fields + + "." + + "

" + ); connect(ui_->filter, SIGNAL(returnPressed()), SIGNAL(ReturnPressed())); connect(filter_delay_, SIGNAL(timeout()), SLOT(FilterDelayTimeout())); diff --git a/src/collection/collectionfilterwidget.ui b/src/collection/collectionfilterwidget.ui index d6b1f08d4..5567b82b7 100644 --- a/src/collection/collectionfilterwidget.ui +++ b/src/collection/collectionfilterwidget.ui @@ -11,7 +11,7 @@ - Form + Collection Filter @@ -31,9 +31,6 @@ - - <html><head/><body><p>Prefix a word with a field name to limit the search to that field, e.g. <span style=" font-weight:600;">artist:</span><span style=" font-style:italic;">Bode</span> searches the collection for all artists that contain the word Bode.</p><p><span style=" font-weight:600;">Available fields: </span><span style=" font-style:italic;">%1</span>.</p></body></html> - Enter search terms here diff --git a/src/context/contextview.cpp b/src/context/contextview.cpp index 968448fc5..f335c3497 100644 --- a/src/context/contextview.cpp +++ b/src/context/contextview.cpp @@ -246,15 +246,18 @@ void ContextView::NoSong() { ui_->label_stop_top->setText(tr("No song playing")); - QString html = tr( - "%1 songs
\n" - "%2 artists
\n" - "%3 albums
\n" - ) - .arg(collectionview_->TotalSongs()) - .arg(collectionview_->TotalArtists()) - .arg(collectionview_->TotalAlbums()) - ; + QString html; + if (collectionview_->TotalSongs() == 1) html += tr("%1 song").arg(collectionview_->TotalSongs()); + else html += tr("%1 songs").arg(collectionview_->TotalSongs()); + html += "
"; + + if (collectionview_->TotalArtists() == 1) html += tr("%1 artist").arg(collectionview_->TotalArtists()); + else html += tr("%1 artists").arg(collectionview_->TotalArtists()); + html += "
"; + + if (collectionview_->TotalAlbums() == 1) html += tr("%1 album").arg(collectionview_->TotalAlbums()); + else html += tr("%1 albums").arg(collectionview_->TotalAlbums()); + html += "
"; ui_->label_stop_summary->setStyleSheet( "font: 12pt;" @@ -416,7 +419,7 @@ void ContextView::SetSong(const Song &song) { if (albumlist.count() > 1) { ui_->label_play_albums->setVisible(true); ui_->label_play_albums->setMinimumSize(0, 20); - ui_->label_play_albums->setText(tr("Albums by %1").arg( song.artist().toHtmlEscaped())); + ui_->label_play_albums->setText("" + tr("Albums by %1").arg( song.artist().toHtmlEscaped()) + ""); ui_->label_play_albums->setStyleSheet("background-color: #3DADE8; color: rgb(255, 255, 255); font: 11pt;"); for (CollectionBackend::Album album : albumlist) { SongList songs = app_->collection_backend()->GetSongs(song.artist(), album.album_name, opt); diff --git a/src/dialogs/about.cpp b/src/dialogs/about.cpp index a6d0006b3..6b2b62cc6 100644 --- a/src/dialogs/about.cpp +++ b/src/dialogs/about.cpp @@ -108,26 +108,19 @@ QString About::MainHtml() const { QString ret; - ret = tr("

Version %1

").arg(QCoreApplication::applicationVersion()); + ret += "

"; + ret += tr("Version %1").arg(QCoreApplication::applicationVersion()); + ret += "

"; ret += "

"; - ret += tr("Strawberry is a music player and music collection organizer.
"); - ret += tr("It is a fork of Clementine released in 2018 aimed at music collectors, audio enthusiasts and audiophiles.
"); + ret += tr("Strawberry is a music player and music collection organizer."); + ret += "
"; + ret += tr("It is a fork of Clementine released in 2018 aimed at music collectors, audio enthusiasts and audiophiles."); + ret += "
"; ret += tr("The name is inspired by the band Strawbs. It's based on a heavily modified version of Clementine created in 2012-2013. It's written in C++ and Qt 5."); ret += "

"; ret += "

"; - ret += tr("Strawberry is free software: you can redistribute it and/or modify
"); - ret += tr("it under the terms of the GNU General Public License as published by
"); - ret += tr("the Free Software Foundation, either version 3 of the License, or
"); - ret += tr("(at your option) any later version.
"); - ret += "
"; - ret += tr("Strawberry is distributed in the hope that it will be useful,
"); - ret += tr("but WITHOUT ANY WARRANTY; without even the implied warranty of
"); - ret += tr("MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
"); - ret += tr("GNU General Public License for more details.
"); - ret += "
"; - ret += tr("You should have received a copy of the GNU General Public License
"); - ret += tr("along with Strawberry. If not, see http://www.gnu.org/licenses/."); + ret += tr("Strawberry is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version."); ret += "

"; return ret; @@ -138,31 +131,46 @@ QString About::ContributorsHtml() const { QString ret; - ret += tr("

Strawberry authors"); + ret += "

"; + ret += ""; + ret += tr("Maintainer"); + ret += ""; for (const Person &person : strawberry_authors_) { ret += "
" + PersonToHtml(person); } ret += "

"; - ret += tr("

Strawberry contributors"); + ret += "

"; + ret += ""; + ret += tr("Contributors"); + ret += ""; for (const Person &person : strawberry_contributors_) { ret += "
" + PersonToHtml(person); } ret += "

"; - ret += tr("

Thanks to"); + ret += "

"; + ret += ""; + ret += tr("Thanks to"); + ret += ""; for (const Person &person : strawberry_thanks_) { ret += "
" + PersonToHtml(person); } ret += "

"; - ret += tr("

Clementine authors"); + ret += "

"; + ret += ""; + ret += tr("Clementine authors"); + ret += ""; for (const Person &person : clementine_authors_) { ret += "
" + PersonToHtml(person); } ret += "

"; - ret += tr("

Clementine contributors"); + ret += "

"; + ret += ""; + ret += tr("Clementine contributors"); + ret += ""; for (const Person &person : clementine_contributors_) { ret += "
" + PersonToHtml(person); } diff --git a/src/dialogs/about.ui b/src/dialogs/about.ui index c04c0ff0a..0ff7e0660 100644 --- a/src/dialogs/about.ui +++ b/src/dialogs/about.ui @@ -6,8 +6,8 @@ 0 0 - 600 - 700 + 500 + 600 @@ -139,6 +139,12 @@ QSizePolicy::Minimum + + + 0 + 0 + + diff --git a/src/scrobbler/listenbrainzscrobbler.cpp b/src/scrobbler/listenbrainzscrobbler.cpp index 57597837c..0f173d10d 100644 --- a/src/scrobbler/listenbrainzscrobbler.cpp +++ b/src/scrobbler/listenbrainzscrobbler.cpp @@ -149,7 +149,7 @@ void ListenBrainzScrobbler::Authenticate(const bool https) { bool result = QDesktopServices::openUrl(url); if (!result) { - QMessageBox messagebox(QMessageBox::Information, tr("ListenBrainz Authentication"), tr("Please open this URL in your browser:
%1").arg(url.toString()), QMessageBox::Ok); + QMessageBox messagebox(QMessageBox::Information, tr("ListenBrainz Authentication"), tr("Please open this URL in your browser") + QString(":
%1").arg(url.toString()), QMessageBox::Ok); messagebox.setTextFormat(Qt::RichText); messagebox.exec(); } diff --git a/src/scrobbler/scrobblingapi20.cpp b/src/scrobbler/scrobblingapi20.cpp index 131661978..282ecabda 100644 --- a/src/scrobbler/scrobblingapi20.cpp +++ b/src/scrobbler/scrobblingapi20.cpp @@ -156,7 +156,7 @@ void ScrobblingAPI20::Authenticate(const bool https) { if (openurl_result) { break; } - QMessageBox messagebox_error(QMessageBox::Warning, tr("%1 Scrobbler Authentication").arg(name_), tr("Could not open URL. Please open this URL in your browser:
%1").arg(url.toString()), QMessageBox::Ok); + QMessageBox messagebox_error(QMessageBox::Warning, tr("%1 Scrobbler Authentication").arg(name_), tr("Could not open URL. Please open this URL in your browser") + QString(":
%1").arg(url.toString()), QMessageBox::Ok); messagebox_error.setTextFormat(Qt::RichText); messagebox_error.exec(); } diff --git a/src/settings/scrobblersettingspage.cpp b/src/settings/scrobblersettingspage.cpp index a07edba42..9dad06799 100644 --- a/src/settings/scrobblersettingspage.cpp +++ b/src/settings/scrobblersettingspage.cpp @@ -71,6 +71,8 @@ ScrobblerSettingsPage::ScrobblerSettingsPage(SettingsDialog *parent) connect(ui_->widget_listenbrainz_login_state, SIGNAL(LogoutClicked()), SLOT(ListenBrainz_Logout())); ui_->widget_listenbrainz_login_state->AddCredentialGroup(ui_->widget_listenbrainz_login); + ui_->label_listenbrainz_token->setText("

" + tr("Enter your user token from") + " " + "https://listenbrainz.org/profile/

"); + resize(sizeHint()); } diff --git a/src/settings/scrobblersettingspage.ui b/src/settings/scrobblersettingspage.ui index 30c4002f4..3e869397f 100644 --- a/src/settings/scrobblersettingspage.ui +++ b/src/settings/scrobblersettingspage.ui @@ -6,8 +6,8 @@ 0 0 - 769 - 749 + 600 + 800 @@ -248,9 +248,9 @@
- + - <html><head/><body><p>Enter your user token found on: <a href="https://listenbrainz.org/profile/"><span style=" text-decoration: underline; color:#0000ff;">https://listenbrainz.org/profile/</span></a></p></body></html> +