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/RegisterPage.cc | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'src/RegisterPage.cc') diff --git a/src/RegisterPage.cc b/src/RegisterPage.cc index d5c60918..33df0b62 100644 --- a/src/RegisterPage.cc +++ b/src/RegisterPage.cc @@ -69,27 +69,27 @@ RegisterPage::RegisterPage(QSharedPointer client, QWidget *parent) username_input_ = new TextField(); username_input_->setTextColor("#333333"); - username_input_->setLabel("Username"); + username_input_->setLabel(tr("Username")); username_input_->setInkColor("#555459"); username_input_->setBackgroundColor("#f9f9f9"); password_input_ = new TextField(); password_input_->setTextColor("#333333"); - password_input_->setLabel("Password"); + password_input_->setLabel(tr("Password")); password_input_->setInkColor("#555459"); password_input_->setBackgroundColor("#f9f9f9"); password_input_->setEchoMode(QLineEdit::Password); password_confirmation_ = new TextField(); password_confirmation_->setTextColor("#333333"); - password_confirmation_->setLabel("Password confirmation"); + password_confirmation_->setLabel(tr("Password confirmation")); password_confirmation_->setInkColor("#555459"); password_confirmation_->setBackgroundColor("#f9f9f9"); password_confirmation_->setEchoMode(QLineEdit::Password); server_input_ = new TextField(); server_input_->setTextColor("#333333"); - server_input_->setLabel("Home Server"); + server_input_->setLabel(tr("Home Server")); server_input_->setInkColor("#555459"); server_input_->setBackgroundColor("#f9f9f9"); @@ -105,7 +105,7 @@ RegisterPage::RegisterPage(QSharedPointer client, QWidget *parent) error_label_ = new QLabel(this); error_label_->setStyleSheet("margin-bottom: 10px; color: #E22826; font-size: 11pt;"); - 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(350, 65); @@ -156,13 +156,13 @@ void RegisterPage::onRegisterButtonClicked() error_label_->setText(""); if (!username_input_->hasAcceptableInput()) { - registerError("Invalid username"); + registerError(tr("Invalid username")); } else if (!password_input_->hasAcceptableInput()) { - registerError("Password is not long enough (min 8 chars)"); + registerError(tr("Password is not long enough (min 8 chars)")); } else if (password_input_->text() != password_confirmation_->text()) { - registerError("Passwords don't match"); + registerError(tr("Passwords don't match")); } else if (!server_input_->hasAcceptableInput()) { - registerError("Invalid server name"); + registerError(tr("Invalid server name")); } else { QString username = username_input_->text(); QString password = password_input_->text(); -- cgit 1.5.1