numbered arguments and more strings
This commit is contained in:
parent
77a536e2a9
commit
230b1a7622
@ -214,7 +214,7 @@ void Courtroom::character_loading_finished()
|
|||||||
int total_loading_size = ao_app->char_list_size * 2 + ao_app->evidence_list_size + ao_app->music_list_size;
|
int total_loading_size = ao_app->char_list_size * 2 + ao_app->evidence_list_size + ao_app->music_list_size;
|
||||||
int loading_value = int(((ao_app->loaded_chars + ao_app->generated_chars + ao_app->loaded_music + ao_app->loaded_evidence) / static_cast<double>(total_loading_size)) * 100);
|
int loading_value = int(((ao_app->loaded_chars + ao_app->generated_chars + ao_app->loaded_music + ao_app->loaded_evidence) / static_cast<double>(total_loading_size)) * 100);
|
||||||
ao_app->w_lobby->set_loading_value(loading_value);
|
ao_app->w_lobby->set_loading_value(loading_value);
|
||||||
ao_app->w_lobby->set_loading_text(tr("Generating chars:\n") + QString::number(ao_app->generated_chars) + "/" + QString::number(ao_app->char_list_size));
|
ao_app->w_lobby->set_loading_text(tr("Generating chars:\n%1/%2").arg(QString::number(ao_app->generated_chars)).arg(QString::number(ao_app->char_list_size)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -245,7 +245,7 @@ Courtroom::Courtroom(AOApplication *p_ao_app) : QMainWindow()
|
|||||||
ui_pair_list = new QListWidget(this);
|
ui_pair_list = new QListWidget(this);
|
||||||
ui_pair_offset_spinbox = new QSpinBox(this);
|
ui_pair_offset_spinbox = new QSpinBox(this);
|
||||||
ui_pair_offset_spinbox->setRange(-100,100);
|
ui_pair_offset_spinbox->setRange(-100,100);
|
||||||
ui_pair_offset_spinbox->setSuffix("% offset");
|
ui_pair_offset_spinbox->setSuffix(tr("% offset"));
|
||||||
ui_pair_button = new AOButton(this, ao_app);
|
ui_pair_button = new AOButton(this, ao_app);
|
||||||
|
|
||||||
ui_evidence_button = new AOButton(this, ao_app);
|
ui_evidence_button = new AOButton(this, ao_app);
|
||||||
@ -2821,7 +2821,7 @@ void Courtroom::on_ooc_return_pressed()
|
|||||||
|
|
||||||
if (command.size() < 2)
|
if (command.size() < 2)
|
||||||
{
|
{
|
||||||
append_server_chatmessage("CLIENT", tr("You need to give a filename to load (extension not needed)! Make sure that it is in the `base/cases/` folder, and that it is a correctly formatted ini.\nCases you can load: ") + caseslist.join(", "), "1");
|
append_server_chatmessage("CLIENT", tr("You need to give a filename to load (extension not needed)! Make sure that it is in the `base/cases/` folder, and that it is a correctly formatted ini.\nCases you can load: %1").arg(caseslist.join(", ")), "1");
|
||||||
ui_ooc_chat_message->clear();
|
ui_ooc_chat_message->clear();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -2842,13 +2842,13 @@ void Courtroom::on_ooc_return_pressed()
|
|||||||
QString casestatus = casefile.value("status", "").value<QString>();
|
QString casestatus = casefile.value("status", "").value<QString>();
|
||||||
|
|
||||||
if (!caseauth.isEmpty())
|
if (!caseauth.isEmpty())
|
||||||
append_server_chatmessage("CLIENT", tr("Case made by ") + caseauth + ".", "1");
|
append_server_chatmessage("CLIENT", tr("Case made by %1.").arg(caseauth), "1");
|
||||||
if (!casedoc.isEmpty())
|
if (!casedoc.isEmpty())
|
||||||
ao_app->send_server_packet(new AOPacket("CT#" + ui_ooc_chat_name->text() + "#/doc " + casedoc + "#%"));
|
ao_app->send_server_packet(new AOPacket("CT#" + ui_ooc_chat_name->text() + "#/doc " + casedoc + "#%"));
|
||||||
if (!casestatus.isEmpty())
|
if (!casestatus.isEmpty())
|
||||||
ao_app->send_server_packet(new AOPacket("CT#" + ui_ooc_chat_name->text() + "#/status " + casestatus + "#%"));
|
ao_app->send_server_packet(new AOPacket("CT#" + ui_ooc_chat_name->text() + "#/status " + casestatus + "#%"));
|
||||||
if (!cmdoc.isEmpty())
|
if (!cmdoc.isEmpty())
|
||||||
append_server_chatmessage("CLIENT", tr("Navigate to ") + cmdoc + tr(" for the CM doc."), "1");
|
append_server_chatmessage("CLIENT", tr("Navigate to %1 for the CM doc.").arg(cmdoc), "1");
|
||||||
|
|
||||||
for (int i = local_evidence_list.size() - 1; i >= 0; i--) {
|
for (int i = local_evidence_list.size() - 1; i >= 0; i--) {
|
||||||
ao_app->send_server_packet(new AOPacket("DE#" + QString::number(i) + "#%"));
|
ao_app->send_server_packet(new AOPacket("DE#" + QString::number(i) + "#%"));
|
||||||
@ -2867,7 +2867,7 @@ void Courtroom::on_ooc_return_pressed()
|
|||||||
ao_app->send_server_packet(new AOPacket("PE", f_contents));
|
ao_app->send_server_packet(new AOPacket("PE", f_contents));
|
||||||
}
|
}
|
||||||
|
|
||||||
append_server_chatmessage("CLIENT", tr("Your case \"") + command[1] + tr("\" was loaded!"), "1");
|
append_server_chatmessage("CLIENT", tr("Your case \"%1\" was loaded!").arg(command[1]), "1");
|
||||||
ui_ooc_chat_message->clear();
|
ui_ooc_chat_message->clear();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -9,7 +9,7 @@ Lobby::Lobby(AOApplication *p_ao_app) : QMainWindow()
|
|||||||
{
|
{
|
||||||
ao_app = p_ao_app;
|
ao_app = p_ao_app;
|
||||||
|
|
||||||
this->setWindowTitle("Attorney Online 2");
|
this->setWindowTitle(tr("Attorney Online 2"));
|
||||||
this->setWindowIcon(QIcon(":/logo.png"));
|
this->setWindowIcon(QIcon(":/logo.png"));
|
||||||
|
|
||||||
ui_background = new AOImage(this, ao_app);
|
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 = new AOTextArea(this);
|
||||||
ui_chatbox->setOpenExternalLinks(true);
|
ui_chatbox->setOpenExternalLinks(true);
|
||||||
ui_chatname = new QLineEdit(this);
|
ui_chatname = new QLineEdit(this);
|
||||||
ui_chatname->setPlaceholderText("Name");
|
ui_chatname->setPlaceholderText(tr("Name"));
|
||||||
ui_chatname->setText(ao_app->get_ooc_name());
|
ui_chatname->setText(ao_app->get_ooc_name());
|
||||||
ui_chatmessage = new QLineEdit(this);
|
ui_chatmessage = new QLineEdit(this);
|
||||||
ui_loading_background = new AOImage(this, ao_app);
|
ui_loading_background = new AOImage(this, ao_app);
|
||||||
@ -101,7 +101,7 @@ void Lobby::set_widgets()
|
|||||||
ui_connect->set_image("connect.png");
|
ui_connect->set_image("connect.png");
|
||||||
|
|
||||||
set_size_and_pos(ui_version, "version");
|
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");
|
set_size_and_pos(ui_about, "about");
|
||||||
ui_about->set_image("about.png");
|
ui_about->set_image("about.png");
|
||||||
@ -111,7 +111,7 @@ void Lobby::set_widgets()
|
|||||||
"font: bold;");
|
"font: bold;");
|
||||||
|
|
||||||
set_size_and_pos(ui_player_count, "player_count");
|
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;"
|
ui_player_count->setStyleSheet("font: bold;"
|
||||||
"color: white;"
|
"color: white;"
|
||||||
"qproperty-alignment: AlignCenter;");
|
"qproperty-alignment: AlignCenter;");
|
||||||
|
Loading…
Reference in New Issue
Block a user