aboutsummaryrefslogtreecommitdiff
path: root/src/lobby.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/lobby.cpp')
-rw-r--r--src/lobby.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/lobby.cpp b/src/lobby.cpp
index 4a96e567..c95fd49c 100644
--- a/src/lobby.cpp
+++ b/src/lobby.cpp
@@ -9,7 +9,7 @@ Lobby::Lobby(AOApplication *p_ao_app) : QMainWindow()
{
ao_app = p_ao_app;
- this->setWindowTitle("Attorney Online 2");
+ this->setWindowTitle(tr("Attorney Online 2"));
this->setWindowIcon(QIcon(":/logo.png"));
ui_background = new AOImage(this, ao_app);
@@ -26,7 +26,7 @@ Lobby::Lobby(AOApplication *p_ao_app) : QMainWindow()
ui_chatbox = new AOTextArea(this);
ui_chatbox->setOpenExternalLinks(true);
ui_chatname = new QLineEdit(this);
- ui_chatname->setPlaceholderText("Name");
+ ui_chatname->setPlaceholderText(tr("Name"));
ui_chatname->setText(ao_app->get_ooc_name());
ui_chatmessage = new QLineEdit(this);
ui_loading_background = new AOImage(this, ao_app);
@@ -71,9 +71,9 @@ void Lobby::set_widgets()
qDebug() << "W: did not find lobby width or height in " << filename;
// Most common symptom of bad config files and missing assets.
- call_notice("It doesn't look like your client is set up correctly.\n"
+ call_notice(tr("It doesn't look like your client is set up correctly.\n"
"Did you download all resources correctly from tiny.cc/getao, "
- "including the large 'base' folder?");
+ "including the large 'base' folder?"));
this->resize(517, 666);
}
@@ -101,7 +101,7 @@ void Lobby::set_widgets()
ui_connect->set_image("connect.png");
set_size_and_pos(ui_version, "version");
- ui_version->setText("Version: " + ao_app->get_version_string());
+ ui_version->setText(tr("Version: %1").arg(ao_app->get_version_string()));
set_size_and_pos(ui_about, "about");
ui_about->set_image("about.png");
@@ -111,7 +111,7 @@ void Lobby::set_widgets()
"font: bold;");
set_size_and_pos(ui_player_count, "player_count");
- ui_player_count->setText("Offline");
+ ui_player_count->setText(tr("Offline"));
ui_player_count->setStyleSheet("font: bold;"
"color: white;"
"qproperty-alignment: AlignCenter;");
@@ -144,11 +144,11 @@ void Lobby::set_widgets()
ui_loading_text->setFrameStyle(QFrame::NoFrame);
ui_loading_text->setStyleSheet("background-color: rgba(0, 0, 0, 0);"
"color: rgba(255, 128, 0, 255);");
- ui_loading_text->append("Loading");
+ ui_loading_text->append(tr("Loading"));
set_size_and_pos(ui_progress_bar, "progress_bar");
set_size_and_pos(ui_cancel, "cancel");
- ui_cancel->setText("Cancel");
+ ui_cancel->setText(tr("Cancel"));
ui_loading_background->hide();
@@ -313,7 +313,7 @@ void Lobby::on_server_list_clicked(QModelIndex p_model)
ui_description->moveCursor(QTextCursor::Start);
ui_description->ensureCursorVisible();
- ui_player_count->setText("Offline");
+ ui_player_count->setText(tr("Offline"));
ui_connect->setEnabled(false);
@@ -373,7 +373,7 @@ void Lobby::append_error(QString f_message)
void Lobby::set_player_count(int players_online, int max_players)
{
- QString f_string = "Online: " + QString::number(players_online) + "/" + QString::number(max_players);
+ QString f_string = tr("Online: %1/%2").arg(QString::number(players_online)).arg(QString::number(max_players));
ui_player_count->setText(f_string);
}