use the "name" key of [race] as title of race sub-sections in help

unit type without race (no race key or no related [race]) uses now the 
translatable _("race^Miscellaneous"), as suggested by Soliton

Any other suggestion must be done faster than our translators.
This commit is contained in:
Ali El Gariani 2007-09-05 06:12:39 +00:00
parent 1f27c358b8
commit 1f92d97c1d

View file

@ -1494,8 +1494,16 @@ void generate_races_sections(const config *help_cfg, section &sec, int level)
config section_cfg;
section_cfg["id"] = "race_" + *it;
//FIXME: Need to choose a "No race" expression and translate it
section_cfg["title"] = it->empty() ? "" : gettext(it->c_str());
std::string title;
const race_map::const_iterator race_it = game_info->races.find(*it);
if (race_it != game_info->races.end()) {
title = race_it->second.name();
} else {
title = _ ("race^Miscellaneous");
}
section_cfg["title"] = title;
section_cfg["generator"] = "units:" + *it;
parse_config_internal(help_cfg, &section_cfg, race_section, level+1);