Unit Recall: marked some sorting options as translatable

This matches Unit List.

(cherry-picked from commit 60950a797f)
This commit is contained in:
Charles Dang 2018-07-09 14:48:03 +11:00
parent 9b79bb52af
commit e437f99c91

View file

@ -222,14 +222,14 @@ void unit_recall::pre_show(window& window)
filter_options_.push_back(filter_text);
}
list.register_sorting_option(0, [this](const int i) { return recall_list_[i]->type_name().str(); });
list.register_sorting_option(1, [this](const int i) { return recall_list_[i]->name().str(); });
list.register_translatable_sorting_option(0, [this](const int i) { return recall_list_[i]->type_name().str(); });
list.register_translatable_sorting_option(1, [this](const int i) { return recall_list_[i]->name().str(); });
list.register_sorting_option(2, [this](const int i) {
const unit& u = *recall_list_[i];
return std::make_tuple(-u.level(), u.experience_to_advance());
});
list.register_sorting_option(3, [this](const int i) { return recall_list_[i]->experience(); });
list.register_sorting_option(4, [this](const int i) {
list.register_translatable_sorting_option(4, [this](const int i) {
return !recall_list_[i]->trait_names().empty() ? recall_list_[i]->trait_names().front().str() : "";
});