Fix bug #9021, Game Lobby Color Translation Error.
More generally, reload [game_config] when switching language, so any translatable string defined there is reloaded in the new language. Also reset server list when reloading [game_config] because it builded up.
This commit is contained in:
parent
84485dcbbc
commit
edd024007c
2 changed files with 4 additions and 0 deletions
|
@ -1677,6 +1677,9 @@ void game_controller::refresh_game_cfg(bool reset_translations)
|
|||
read_game_cfg(defines_map_, game_config_, use_caching_);
|
||||
} else {
|
||||
game_config_.reset_translation();
|
||||
// we may have translatable strings in [game_config]
|
||||
// e.g. team color names are defined there
|
||||
game_config::load_config(game_config_.child("game_config"));
|
||||
}
|
||||
|
||||
const config* const units = game_config_.child("units");
|
||||
|
|
|
@ -182,6 +182,7 @@ namespace game_config
|
|||
defense_color_scale.push_back(0x00FFFF00);
|
||||
}
|
||||
|
||||
server_list.clear();
|
||||
const std::vector<config *> &servers = v.get_children("server");
|
||||
std::vector<config *>::const_iterator server;
|
||||
for(server = servers.begin(); server != servers.end(); ++server) {
|
||||
|
|
Loading…
Add table
Reference in a new issue