Translate damage types in the unit_preview_pane tooltip. (#2296)

Use translations from the "wesnoth" domain because the damage type
strings ("pierce", etc.) aren't available in the "wesnoth-lib"
domain.
This commit is contained in:
jostephd 2017-12-17 04:28:20 +00:00 committed by Celtic Minstrel
parent a8663601ef
commit f76420ba2a

View File

@ -125,7 +125,7 @@ static inline std::string get_hp_tooltip(const utils::string_map& res, const std
bool att_def_diff = false;
for(const utils::string_map::value_type &resist : res) {
std::ostringstream line;
line << translation::gettext(resist.first.c_str()) << ": ";
line << translation::dgettext("wesnoth", resist.first.c_str()) << ": ";
// Some units have different resistances when attacking or defending.
const int res_att = 100 - get(resist.first, true);