fixed internationalization problems
This commit is contained in:
parent
cc83a55d3c
commit
d8517c5a6b
7 changed files with 23 additions and 13 deletions
|
@ -128,7 +128,7 @@ Defeat:
|
|||
[/message]
|
||||
[message]
|
||||
description=Delfador
|
||||
id=10_4b
|
||||
id=msg10_4b
|
||||
message="We must be wary... they say a wizard lives in these mountains, and he does not take kindly to visitors. It is he who causes the mists, to cause travellers to become lost, and then his creatures devour them."
|
||||
[/message]
|
||||
[message]
|
||||
|
@ -189,7 +189,7 @@ Defeat:
|
|||
[/message]
|
||||
[message]
|
||||
description=Kalenz
|
||||
id=msg=10_10
|
||||
id=msg10_10
|
||||
message="If this is true, Konrad, perhaps we should take another route and go around the mountain, rather then to try and defeat these new foes."
|
||||
[/message]
|
||||
[message]
|
||||
|
|
|
@ -180,7 +180,14 @@ observer="Observer"
|
|||
|
||||
host_game="Host Multiplayer Game"
|
||||
join_game="Join Game"
|
||||
load_game="Load Game"
|
||||
create_new_game="Create Game"
|
||||
name_of_game="Name of game"
|
||||
map_to_play="Map to play"
|
||||
village_gold="Village Gold"
|
||||
|
||||
login="Login"
|
||||
must_login="You must log in to this server"
|
||||
|
||||
quit_message="Do you really want to quit?"
|
||||
|
||||
|
|
|
@ -37,10 +37,13 @@ void advance_unit(const game_data& info,
|
|||
|
||||
const std::vector<std::string>& options = u->second.type().advances_to();
|
||||
|
||||
std::vector<std::string> lang_options;
|
||||
|
||||
std::vector<unit> sample_units;
|
||||
for(std::vector<std::string>::const_iterator op = options.begin();
|
||||
op != options.end(); ++op) {
|
||||
sample_units.push_back(::get_advanced_unit(info,units,loc,*op));
|
||||
lang_options.push_back(sample_units.back().type().language_name());
|
||||
}
|
||||
|
||||
int res = 0;
|
||||
|
@ -53,7 +56,7 @@ void advance_unit(const game_data& info,
|
|||
|
||||
res = gui::show_dialog(gui,NULL,string_table["advance_unit_heading"],
|
||||
string_table["advance_unit_message"],
|
||||
gui::OK_ONLY, &options, &sample_units);
|
||||
gui::OK_ONLY, &lang_options, &sample_units);
|
||||
}
|
||||
|
||||
//when the unit advances, it fades to white, and then switches to the
|
||||
|
|
|
@ -281,17 +281,17 @@ int play_multiplayer(display& disp, game_data& units_data, config cfg,
|
|||
|
||||
//Title
|
||||
font::draw_text(&disp,disp.screen_area(),24,font::NORMAL_COLOUR,
|
||||
"Create Game",-1,(disp.y()-height)/2+5);
|
||||
string_table["create_new_game"],-1,(disp.y()-height)/2+5);
|
||||
|
||||
//Name Entry
|
||||
font::draw_text(&disp,disp.screen_area(),12,font::GOOD_COLOUR,
|
||||
"Name of game:",(disp.x()-width)/2+10,(disp.y()-height)/2+38);
|
||||
string_table["name_of_game"] + ":",(disp.x()-width)/2+10,(disp.y()-height)/2+38);
|
||||
gui::textbox name_entry(disp,width-20,string_table["game_prefix"] + preferences::login() + string_table["game_postfix"]);
|
||||
name_entry.set_location((disp.x()-width)/2+10,(disp.y()-height)/2+55);
|
||||
|
||||
//Maps
|
||||
font::draw_text(&disp,disp.screen_area(),12,font::GOOD_COLOUR,
|
||||
"Map to play:",(disp.x()-width)/2+(int)(width*0.4),
|
||||
string_table["map_to_play"] + ":",(disp.x()-width)/2+(int)(width*0.4),
|
||||
(disp.y()-height)/2+83);
|
||||
std::vector<std::string> options;
|
||||
std::vector<config*>& levels = cfg.children["multiplayer"];
|
||||
|
@ -307,7 +307,7 @@ int play_multiplayer(display& disp, game_data& units_data, config cfg,
|
|||
options.push_back((**i)["name"]);
|
||||
}
|
||||
|
||||
options.push_back("Load game...");
|
||||
options.push_back(string_table["load_game"] + "...");
|
||||
gui::menu maps_menu(disp,options);
|
||||
maps_menu.set_loc((disp.x()-width)/2+(int)(width*0.4),(disp.y()-height)/2+100);
|
||||
|
||||
|
@ -814,9 +814,9 @@ int play_multiplayer(display& disp, game_data& units_data, config cfg,
|
|||
rect.w = ((disp.x()-width)/2+width)-((disp.x()-width)/2+int(width*0.4)+maps_menu.width()+19)-10;
|
||||
rect.h = 12;
|
||||
SDL_BlitSurface(village_bg, NULL, disp.video().getSurface(), &rect);
|
||||
sprintf(buf,"Village Gold: %d", cur_villagegold);
|
||||
sprintf(buf,": %d", cur_villagegold);
|
||||
font::draw_text(&disp,disp.screen_area(),12,font::GOOD_COLOUR,
|
||||
buf,rect.x,rect.y);
|
||||
string_table["village_gold"] + buf,rect.x,rect.y);
|
||||
update_rect(rect);
|
||||
}
|
||||
|
||||
|
|
|
@ -195,8 +195,8 @@ void play_multiplayer_client(display& disp, game_data& units_data, config& cfg,
|
|||
|
||||
std::string login = preferences::login();
|
||||
const int res = gui::show_dialog(disp,NULL,"",
|
||||
"You must log in to this server",gui::OK_CANCEL,
|
||||
NULL,NULL,"Login: ",&login);
|
||||
string_table["must_login"],gui::OK_CANCEL,
|
||||
NULL,NULL,string_table["login"] + ": ",&login);
|
||||
if(res != 0 || login.empty()) {
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -962,7 +962,7 @@ void turn_info::unit_description()
|
|||
void turn_info::save_game()
|
||||
{
|
||||
std::stringstream stream;
|
||||
stream << state_of_game_.scenario << " " << string_table["turn"]
|
||||
stream << translate_string(state_of_game_.scenario) << " " << string_table["turn"]
|
||||
<< " " << status_.turn();
|
||||
std::string label = stream.str();
|
||||
|
||||
|
|
|
@ -465,7 +465,7 @@ int show_dialog(display& disp, SDL_Surface* image,
|
|||
//set the position of any tick boxes. they go right below the menu, slammed against
|
||||
//the right side of the dialog
|
||||
if(options != NULL) {
|
||||
int options_y = text_widget_y + (use_textbox ? text_widget.height() : 0) + menu_.height();
|
||||
int options_y = text_widget_y + (use_textbox ? text_widget.height() : 0) + menu_.height() + button_height_padding;
|
||||
for(size_t i = 0; i != check_buttons.size(); ++i) {
|
||||
check_buttons[i].set_x(xloc + total_width - padding_width - check_buttons[i].width());
|
||||
check_buttons[i].set_y(options_y);
|
||||
|
|
Loading…
Add table
Reference in a new issue