-change the word 'campaign' to 'add-on'...

...when it refers to downloading/uploading new content
This commit is contained in:
Patrick Parker 2006-06-10 00:16:12 +00:00
parent 559b75e9c8
commit f76bf6f88c
2 changed files with 19 additions and 19 deletions

View file

@ -163,7 +163,7 @@ void campaign_server::run()
} else if(const config* req = data.child("request_campaign")) {
config* const campaign = campaigns().find_child("campaign","name",(*req)["name"]);
if(campaign == NULL) {
network::send_data(construct_error("Campaign not found."),sock);
network::send_data(construct_error("Add-on not found."),sock);
} else {
config cfg;
scoped_istream stream = istream_file((*campaign)["filename"]);
@ -175,18 +175,18 @@ void campaign_server::run()
}
} else if(data.child("request_terms") != NULL) {
network::send_data(construct_message("All campaigns uploaded to this server must be licensed under the terms of the GNU General Public License (GPL). By uploading content to this server, you certify that you have the right to place the content under the conditions of the GPL, and choose to do so."),sock);
network::send_data(construct_message("All add-ons uploaded to this server must be licensed under the terms of the GNU General Public License (GPL). By uploading content to this server, you certify that you have the right to place the content under the conditions of the GPL, and choose to do so."),sock);
} else if(config* upload = data.child("upload")) {
config* data = upload->child("data");
config* campaign = campaigns().find_child("campaign","name",(*upload)["name"]);
if(data == NULL) {
network::send_data(construct_error("No campaign data was supplied."),sock);
network::send_data(construct_error("No add-on data was supplied."),sock);
} else if(campaign != NULL && (*campaign)["passphrase"] != (*upload)["passphrase"]) {
network::send_data(construct_error("The campaign already exists, and your passphrase was incorrect."),sock);
network::send_data(construct_error("The add-on already exists, and your passphrase was incorrect."),sock);
} else if(campaign_name_legal((*upload)["name"]) == false) {
network::send_data(construct_error("The name of the campaign is invalid"),sock);
network::send_data(construct_error("The name of the add-on is invalid"),sock);
} else if(check_names_legal(*data) == false) {
network::send_data(construct_error("The campaign contains an illegal file or directory name."),sock);
network::send_data(construct_error("The add-on contains an illegal file or directory name."),sock);
} else {
if(campaign == NULL) {
campaign = &campaigns().add_child("campaign");
@ -226,12 +226,12 @@ void campaign_server::run()
scoped_ostream cfgfile = ostream_file(file_);
write(*cfgfile, cfg_);
network::send_data(construct_message("Campaign accepted."),sock);
network::send_data(construct_message("Add-on accepted."),sock);
}
} else if(const config* erase = data.child("delete")) {
config* const campaign = campaigns().find_child("campaign","name",(*erase)["name"]);
if(campaign == NULL) {
network::send_data(construct_error("The campaign does not exist."),sock);
network::send_data(construct_error("The add-on does not exist."),sock);
continue;
}
@ -249,11 +249,11 @@ void campaign_server::run()
campaigns().remove_child("campaign",index);
scoped_ostream cfgfile = ostream_file(file_);
write(*cfgfile, cfg_);
network::send_data(construct_message("Campaign deleted."),sock);
network::send_data(construct_message("Add-on deleted."),sock);
} else if(const config* cpass = data.child("change_passphrase")) {
config* campaign = campaigns().find_child("campaign","name",(*cpass)["name"]);
if(campaign == NULL) {
network::send_data(construct_error("No campaign with that name exists."),sock);
network::send_data(construct_error("No add-on with that name exists."),sock);
} else if((*campaign)["passphrase"] != (*cpass)["passphrase"]) {
network::send_data(construct_error("Your old passphrase was incorrect."),sock);
} else if((const t_string)(*cpass)["new_passphrase"] == "") {

View file

@ -868,7 +868,7 @@ void game_controller::download_campaigns()
cfg.add_child("request_campaign_list");
network::send_data(cfg,sock);
network::connection res = gui::network_receive_dialog(disp(),_("Asking for campaign list"),cfg,sock);
network::connection res = gui::network_receive_dialog(disp(),_("Asking for list of add-ons"),cfg,sock);
if(!res) {
return;
}
@ -952,22 +952,22 @@ void game_controller::download_campaigns()
options.push_back(heading.str());
for(std::vector<std::string>::const_iterator j = publish_options.begin(); j != publish_options.end(); ++j) {
options.push_back(sep + _("Publish campaign: ") + *j);
options.push_back(sep + _("Publish add-on: ") + *j);
}
for(std::vector<std::string>::const_iterator d = delete_options.begin(); d != delete_options.end(); ++d) {
options.push_back(sep + _("Delete campaign: ") + *d);
options.push_back(sep + _("Delete add-on: ") + *d);
}
if(campaigns.empty() && publish_options.empty()) {
gui::show_error_message(disp(), _("There are no campaigns available for download from this server."));
gui::show_error_message(disp(), _("There are no add-ons available for download from this server."));
return;
}
gui::menu::basic_sorter sorter;
sorter.set_alpha_sort(1).set_alpha_sort(2).set_alpha_sort(3).set_numeric_sort(4).set_position_sort(5,sizes);
const int index = gui::show_dialog2(disp(),NULL,_("Get Campaign"),_("Choose the campaign to download."),gui::OK_CANCEL,&options,
const int index = gui::show_dialog2(disp(),NULL,_("Get Add-ons"),_("Choose the add-on to download."),gui::OK_CANCEL,&options,
NULL, "", NULL, 256, NULL, NULL, -1, -1, NULL, NULL, "", &sorter);
if(index < 0) {
return;
@ -987,7 +987,7 @@ void game_controller::download_campaigns()
request.add_child("request_campaign")["name"] = campaigns[index];
network::send_data(request,sock);
res = gui::network_receive_dialog(disp(),_("Downloading campaign..."),cfg,sock);
res = gui::network_receive_dialog(disp(),_("Downloading add-on..."),cfg,sock);
if(!res) {
return;
}
@ -998,7 +998,7 @@ void game_controller::download_campaigns()
}
if(!check_names_legal(cfg)) {
gui::show_error_message(disp(), "The campaign has an invalid file or directory name and can not be installed.");
gui::show_error_message(disp(), "The add-on has an invalid file or directory name and can not be installed.");
return;
}
@ -1026,7 +1026,7 @@ void game_controller::download_campaigns()
clear_binary_paths_cache();
gui::show_dialog(disp(),NULL,_("Campaign Installed"),_("The campaign has been installed."),gui::OK_ONLY);
gui::show_dialog(disp(),NULL,_("Add-on Installed"),_("The add-on has been installed."),gui::OK_ONLY);
} catch(config::error&) {
gui::show_error_message(disp(), _("Network communication error."));
} catch(network::error&) {
@ -1081,7 +1081,7 @@ void game_controller::upload_campaign(const std::string& campaign, network::conn
std::cerr << "uploading campaign...\n";
network::send_data(data,sock);
sock = gui::network_send_dialog(disp(),_("Sending campaign"),data,sock);
sock = gui::network_send_dialog(disp(),_("Sending add-on"),data,sock);
if(!sock) {
gui::show_error_message(disp(), _("Connection timed out"));
} else if(data.child("error")) {