From 384fe7067ec6628ff4e09bc8f75cc3a4a69a1d29 Mon Sep 17 00:00:00 2001 From: Konstantinos Sideris Date: Mon, 29 May 2017 19:09:12 +0300 Subject: Set up translations --- src/WelcomePage.cc | 31 ++++++++++++++----------------- 1 file changed, 14 insertions(+), 17 deletions(-) (limited to 'src/WelcomePage.cc') diff --git a/src/WelcomePage.cc b/src/WelcomePage.cc index d6668e7b..b88c4db1 100644 --- a/src/WelcomePage.cc +++ b/src/WelcomePage.cc @@ -34,21 +34,18 @@ WelcomePage::WelcomePage(QWidget *parent) intro_banner_->setAlignment(Qt::AlignCenter); intro_text_ = new QLabel(this); - intro_text_->setText(QApplication::translate("WelcomePage", - "" - "" - "" - "

" - " " - " Welcome to nheko! The desktop client for the Matrix protocol." - " " - "

\n" - "

" - " Enjoy your stay!" - "

" - "" - "", - Q_NULLPTR)); + + QString heading(tr("Welcome to nheko! The desktop client for the Matrix protocol.")); + QString main(tr("Enjoy your stay!")); + + intro_text_->setText(QString("

" + " %1 " + "

" + "

" + " %2 " + "

") + .arg(heading) + .arg(main)); top_layout_->addStretch(1); top_layout_->addWidget(intro_banner_); @@ -60,7 +57,7 @@ WelcomePage::WelcomePage(QWidget *parent) button_layout_->setSpacing(0); button_layout_->setContentsMargins(0, 20, 0, 80); - register_button_ = new RaisedButton("REGISTER", this); + register_button_ = new RaisedButton(tr("REGISTER"), this); register_button_->setBackgroundColor(QColor("#333333")); register_button_->setForegroundColor(QColor("white")); register_button_->setMinimumSize(240, 60); @@ -68,7 +65,7 @@ WelcomePage::WelcomePage(QWidget *parent) register_button_->setFontSize(14); register_button_->setCornerRadius(3); - login_button_ = new RaisedButton("LOGIN", this); + login_button_ = new RaisedButton(tr("LOGIN"), this); login_button_->setBackgroundColor(QColor("#333333")); login_button_->setForegroundColor(QColor("white")); login_button_->setMinimumSize(240, 60); -- cgit 1.5.1