Author: shadowmaster
Date: Fri Jul  4 23:51:32 2008
New Revision: 27730

URL: http://svn.gna.org/viewcvs/wesnoth?rev=27730&view=rev
Log:
* Added foundations for translatable alignment labels (STILL NOT USED by
* the user interface)

Modified:
    trunk/src/unit_types.cpp
    trunk/src/unit_types.hpp

Modified: trunk/src/unit_types.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/unit_types.cpp?rev=27730&r1=27729&r2=27730&view=diff
==============================================================================
--- trunk/src/unit_types.cpp (original)
+++ trunk/src/unit_types.cpp Fri Jul  4 23:51:32 2008
@@ -865,10 +865,12 @@
 
 
 
-const char* unit_type::alignment_description(unit_type::ALIGNMENT align)
+const char* unit_type::alignment_description(unit_type::ALIGNMENT align, 
unit_race::GENDER gender)
 {
        static const char* aligns[] = { N_("lawful"), N_("neutral"), 
N_("chaotic") };
-       return (gettext(aligns[align]));
+       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]));
 }
 
 const char* unit_type::alignment_id(unit_type::ALIGNMENT align)

Modified: trunk/src/unit_types.hpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/unit_types.hpp?rev=27730&r1=27729&r2=27730&view=diff
==============================================================================
--- trunk/src/unit_types.hpp (original)
+++ trunk/src/unit_types.hpp Fri Jul  4 23:51:32 2008
@@ -218,7 +218,7 @@
        enum ALIGNMENT { LAWFUL, NEUTRAL, CHAOTIC };
 
        ALIGNMENT alignment() const { return alignment_; }
-       static const char* alignment_description(ALIGNMENT align);
+       static const char* alignment_description(ALIGNMENT align, 
unit_race::GENDER gender = unit_race::MALE);
        static const char* alignment_id(ALIGNMENT align);
 
        fixed_t alpha() const { return alpha_; }


_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits

Reply via email to