diff --git a/approot/messages.xml b/approot/messages.xml
index 9d2fe7bf..a8fdd8e5 100644
--- a/approot/messages.xml
+++ b/approot/messages.xml
@@ -14,7 +14,6 @@
Password
Confirm password
Passwords don't match
-Play Queue
Are you sure?
@@ -54,6 +53,9 @@
Value
Various artists
+
+Play Queue
+
Account
Audio
diff --git a/approot/playqueue.xml b/approot/playqueue.xml
index 8e8ff74d..496a2468 100644
--- a/approot/playqueue.xml
+++ b/approot/playqueue.xml
@@ -2,37 +2,38 @@
-
+
-
+
-
+
-
+
${entries}
${show-more}
-
+
-
+
-
- ${pos} ${name} ${}${release-name}${} ${}${artist-name}${} ${play-btn} ${del-btn}
+
+ ${play-btn} ${del-btn}
+ ${name} ${}${release-name}${} ${}${artist-name}${}
diff --git a/src/ui/LmsApplication.cpp b/src/ui/LmsApplication.cpp
index 19115578..812d0828 100644
--- a/src/ui/LmsApplication.cpp
+++ b/src/ui/LmsApplication.cpp
@@ -265,7 +265,7 @@ LmsApplication::handleAuthEvent(void)
menuItem->setSelectable(false);
}
{
- auto menuItem = menu->insertItem(3, Wt::WString::tr("Lms.playqueue"));
+ auto menuItem = menu->insertItem(3, Wt::WString::tr("Lms.PlayQueue.playqueue"));
menuItem->setLink(Wt::WLink(Wt::WLink::InternalPath, "/playqueue"));
menuItem->setSelectable(false);
}
diff --git a/src/ui/PlayQueueView.cpp b/src/ui/PlayQueueView.cpp
index db265b9a..754e2c67 100644
--- a/src/ui/PlayQueueView.cpp
+++ b/src/ui/PlayQueueView.cpp
@@ -33,22 +33,22 @@ static const std::string currentPlayQueueName = "__current__playqueue__";
PlayQueue::PlayQueue(Wt::WContainerWidget* parent)
: Wt::WContainerWidget(parent)
{
- auto container = new Wt::WTemplate(Wt::WString::tr("template-playqueue"), this);
+ auto container = new Wt::WTemplate(Wt::WString::tr("Lms.PlayQueue.template"), this);
container->addFunction("tr", &Wt::WTemplate::Functions::tr);
- auto saveBtn = new Wt::WText(Wt::WString::tr("btn-playqueue-save-btn"), Wt::XHTMLText);
+ auto saveBtn = new Wt::WText(Wt::WString::tr("Lms.PlayQueue.save-to-playlist"), Wt::XHTMLText);
container->bindWidget("save-btn", saveBtn);
- auto loadBtn = new Wt::WText(Wt::WString::tr("btn-playqueue-load-btn"), Wt::XHTMLText);
+ auto loadBtn = new Wt::WText(Wt::WString::tr("Lms.PlayQueue.load-from-playlist"), Wt::XHTMLText);
container->bindWidget("load-btn", loadBtn);
- auto clearBtn = new Wt::WText(Wt::WString::tr("btn-playqueue-clear-btn"), Wt::XHTMLText);
+ auto clearBtn = new Wt::WText(Wt::WString::tr("Lms.PlayQueue.clear"), Wt::XHTMLText);
container->bindWidget("clear-btn", clearBtn);
_entriesContainer = new Wt::WContainerWidget();
container->bindWidget("entries", _entriesContainer);
- _showMore = new Wt::WTemplate(Wt::WString::tr("template-show-more"));
+ _showMore = new Wt::WTemplate(Wt::WString::tr("Lms.Explore.show-more"));
_showMore->addFunction("tr", &Wt::WTemplate::Functions::tr);
_showMore->setHidden(true);
container->bindWidget("show-more", _showMore);
@@ -123,16 +123,15 @@ PlayQueue::addSome()
auto tracks = playlist->getTracks(_entriesContainer->count(), 50, moreResults);
for (auto track : tracks)
{
- Wt::WTemplate* entry = new Wt::WTemplate(Wt::WString::tr("template-playqueue-entry"), _entriesContainer);
+ Wt::WTemplate* entry = new Wt::WTemplate(Wt::WString::tr("Lms.PlayQueue.template.entry"), _entriesContainer);
- entry->bindString("pos", std::to_string(_entriesContainer->count()));
entry->bindString("name", Wt::WString::fromUTF8(track->getName()), Wt::PlainText);
auto artist = track->getArtist();
if (artist)
{
entry->setCondition("if-has-artist", true);
- Wt::WAnchor *artistAnchor = new Wt::WAnchor(Wt::WLink(Wt::WLink::InternalPath, "/artist/" + std::to_string(track->getArtist().id())));
+ Wt::WAnchor *artistAnchor = LmsApplication::createArtistAnchor(track->getArtist().id());
Wt::WText *artistText = new Wt::WText(artistAnchor);
artistText->setText(Wt::WString::fromUTF8(artist->getName(), Wt::PlainText));
entry->bindWidget("artist-name", artistAnchor);
@@ -141,17 +140,17 @@ PlayQueue::addSome()
if (release)
{
entry->setCondition("if-has-release", true);
- Wt::WAnchor *releaseAnchor = new Wt::WAnchor(Wt::WLink(Wt::WLink::InternalPath, "/release/" + std::to_string(track->getRelease().id())));
+ Wt::WAnchor *releaseAnchor = LmsApplication::createReleaseAnchor(track->getRelease().id());
Wt::WText *releaseText = new Wt::WText(releaseAnchor);
releaseText->setText(Wt::WString::fromUTF8(release->getName(), Wt::PlainText));
entry->bindWidget("release-name", releaseAnchor);
}
- auto playBtn = new Wt::WText(Wt::WString::tr("btn-playqueue-entry-play-btn"), Wt::XHTMLText);
+ auto playBtn = new Wt::WText(Wt::WString::tr("Lms.PlayQueue.play"), Wt::XHTMLText);
entry->bindWidget("play-btn", playBtn);
// TODO
- auto addBtn = new Wt::WText(Wt::WString::tr("btn-playqueue-entry-del-btn"), Wt::XHTMLText);
+ auto addBtn = new Wt::WText(Wt::WString::tr("Lms.PlayQueue.delete"), Wt::XHTMLText);
entry->bindWidget("del-btn", addBtn);
// TODO
}