Add translations support (#82)

* Add translations support
* Update .gitignore
This commit is contained in:
Jonas Kvinge
2019-02-22 20:24:38 +01:00
committed by GitHub
parent 034b032cfa
commit 954e0e8a59
29 changed files with 401 additions and 103 deletions

View File

@@ -232,9 +232,9 @@ void ContextView::NoSong() {
"font-weight: Regular;"
);
ui_->label_stop_top->setText("No song playing");
ui_->label_stop_top->setText(tr("No song playing"));
QString html = QString(
QString html = tr(
"%1 songs<br />\n"
"%2 artists<br />\n"
"%3 albums<br />\n"
@@ -404,7 +404,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(QString("<b>Albums by %1</b>").arg( song.artist().toHtmlEscaped()));
ui_->label_play_albums->setText(tr("<b>Albums by %1</b>").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);