Author: shadowmaster
Date: Tue Jul 8 22:33:42 2008
New Revision: 27852
URL: http://svn.gna.org/viewcvs/wesnoth?rev=27852&view=rev
Log:
* Fix bug #11956
Modified:
trunk/changelog
trunk/src/dialogs.cpp
trunk/src/generate_report.cpp
trunk/src/help.cpp
trunk/src/unit_types.cpp
Modified: trunk/changelog
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/changelog?rev=27852&r1=27851&r2=27852&view=diff
==============================================================================
--- trunk/changelog (original)
+++ trunk/changelog Tue Jul 8 22:33:42 2008
@@ -20,6 +20,8 @@
French, German, Greek, Italian, Lithuanian, Russian, Serbian
* languages in the language selection are now sorted on name instead of
code.
+ * unit alignment can be displayed in its gender-specific form in languages
+ which require/support it (bug #11956)
* WML engine:
* When examining stored units, now the attacks, max_hitpoints, max_moves,
and max_experience are the "real" values and can also be modified.
Modified: trunk/src/dialogs.cpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/dialogs.cpp?rev=27852&r1=27851&r2=27852&view=diff
==============================================================================
--- trunk/src/dialogs.cpp (original)
+++ trunk/src/dialogs.cpp Tue Jul 8 22:33:42 2008
@@ -926,7 +926,7 @@
det.name = u.name();
det.type_name = u.type_name();
det.level = u.level();
- det.alignment = unit_type::alignment_description(u.alignment());
+ det.alignment = unit_type::alignment_description(u.alignment(),
u.gender());
det.traits = u.traits_description();
//we filter to remove the tooltips (increment by 2)
@@ -987,7 +987,7 @@
det.name = "";
det.type_name = t->type_name();
det.level = t->level();
- det.alignment = unit_type::alignment_description(t->alignment());
+ det.alignment = unit_type::alignment_description(t->alignment(),
t->genders().front());
//FIXME: This probably must be move into a unit_type function
const std::vector<config*> traits = t->possible_traits();
Modified: trunk/src/generate_report.cpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/generate_report.cpp?rev=27852&r1=27851&r2=27852&view=diff
==============================================================================
--- trunk/src/generate_report.cpp (original)
+++ trunk/src/generate_report.cpp Tue Jul 8 22:33:42 2008
@@ -123,7 +123,7 @@
return res;
}
case UNIT_ALIGNMENT: {
- const std::string& align =
unit_type::alignment_description(u->second.alignment());
+ const std::string& align =
unit_type::alignment_description(u->second.alignment(), u->second.gender());
const std::string& align_id =
unit_type::alignment_id(u->second.alignment());
return report(align, "", string_table[align_id +
"_description"]);
}
Modified: trunk/src/help.cpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/help.cpp?rev=27852&r1=27851&r2=27852&view=diff
==============================================================================
--- trunk/src/help.cpp (original)
+++ trunk/src/help.cpp Tue Jul 8 22:33:42 2008
@@ -1321,7 +1321,7 @@
<< _("Cost: ") << type_.cost() << jump(30)
<< _("Alignment: ")
<< "<ref>dst='time_of_day' text='"
- << type_.alignment_description(type_.alignment())
+ << type_.alignment_description(type_.alignment(),
type_.genders().front())
<< "'</ref>"
<< jump(30);
if (type_.can_advance())
Modified: trunk/src/unit_types.cpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/unit_types.cpp?rev=27852&r1=27851&r2=27852&view=diff
==============================================================================
--- trunk/src/unit_types.cpp (original)
+++ trunk/src/unit_types.cpp Tue Jul 8 22:33:42 2008
@@ -871,6 +871,7 @@
static const char* aligns[] = { N_("lawful"), N_("neutral"),
N_("chaotic") };
static const char* aligns_female[] = { N_("female^lawful"),
N_("female^neutral"), N_("female^chaotic") };
const char** tlist = (gender == unit_race::MALE ? aligns :
aligns_female);
+
return (gettext(tlist[align]));
}
_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits