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:
parent
1f27c358b8
commit
1f92d97c1d
1 changed files with 10 additions and 2 deletions
12
src/help.cpp
12
src/help.cpp
|
@ -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, §ion_cfg, race_section, level+1);
|
||||
|
|
Loading…
Add table
Reference in a new issue