From 6ef33f69b6175f142f38745a9713df623f340c69 Mon Sep 17 00:00:00 2001 From: emeric Date: Sun, 4 Mar 2018 22:46:56 +0100 Subject: [PATCH] Better home template --- approot/messages.xml | 3 +++ src/ui/HomeView.cpp | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/approot/messages.xml b/approot/messages.xml index 14e4bc54..a0c99722 100644 --- a/approot/messages.xml +++ b/approot/messages.xml @@ -2,6 +2,9 @@ + +

Welcome!

+ Various artists Artists Albums diff --git a/src/ui/HomeView.cpp b/src/ui/HomeView.cpp index 730f981e..e97d8b33 100644 --- a/src/ui/HomeView.cpp +++ b/src/ui/HomeView.cpp @@ -31,7 +31,9 @@ namespace UserInterface { Home::Home(Wt::WContainerWidget *parent) : Wt::WContainerWidget(parent) { - addWidget(new Wt::WTemplate(Wt::WString::tr("template-home"))); + auto t = new Wt::WTemplate(Wt::WString::tr("template-home"), this); + t->addFunction("tr", &Wt::WTemplate::Functions::tr); + } } // namespace UserInterface