summary refs log tree commit diff
path: root/src/WelcomePage.cc
diff options
context:
space:
mode:
authorKonstantinos Sideris <sideris.konstantin@gmail.com>2017-05-29 19:09:12 +0300
committerKonstantinos Sideris <sideris.konstantin@gmail.com>2017-05-29 19:09:12 +0300
commit384fe7067ec6628ff4e09bc8f75cc3a4a69a1d29 (patch)
treee46628366e86607d067d5a58c38c5825aa6a8678 /src/WelcomePage.cc
parentUpdate tests (diff)
downloadnheko-384fe7067ec6628ff4e09bc8f75cc3a4a69a1d29.tar.xz
Set up translations
Diffstat (limited to 'src/WelcomePage.cc')
-rw-r--r--src/WelcomePage.cc31
1 files changed, 14 insertions, 17 deletions
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", - "<html>" - "<head/>" - "<body>" - " <p align=\"center\" style=\"margin: 0; line-height: 2pt\">" - " <span style=\" font-size:18px; color:#515151;\"> " - " Welcome to nheko! The desktop client for the Matrix protocol." - " </span>" - " </p>\n" - " <p align=\"center\" style=\"margin: 1pt; line-height: 2pt;\">" - " <span style=\" font-size:18px; color:#515151;\">Enjoy your stay!</span>" - " </p>" - "</body>" - "</html>", - 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("<p align=\"center\" style=\"margin: 0; line-height: 2pt\">" + " <span style=\" font-size:18px; color:#515151;\"> %1 </span>" + "</p>" + "<p align=\"center\" style=\"margin: 1pt; line-height: 2pt;\">" + " <span style=\" font-size:18px; color:#515151;\"> %2 </span>" + "</p>") + .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);