Author: shadowmaster
Date: Fri Jul 18 20:04:05 2008
New Revision: 28072
URL: http://svn.gna.org/viewcvs/wesnoth?rev=28072&view=rev
Log:
* Revert revision 28025 since it causes translation inconsistencies when the
locale is changed during the same session of Wesnoth.
* Apply the proper fix to the original bug: replace the gettext() call with
sgettext().
Modified:
trunk/src/unit_types.cpp
Modified: trunk/src/unit_types.cpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/unit_types.cpp?rev=28072&r1=28071&r2=28072&view=diff
==============================================================================
--- trunk/src/unit_types.cpp (original)
+++ trunk/src/unit_types.cpp Fri Jul 18 20:04:05 2008
@@ -873,16 +873,15 @@
return experience_needed_;
}
+
+
const char* unit_type::alignment_description(unit_type::ALIGNMENT align,
unit_race::GENDER gender)
{
- static const t_string aligns[] =
- { _("lawful"), _("neutral"), _("chaotic") };
- static const t_string aligns_female[] =
- { _("female^lawful"), _("female^neutral"), _("female^chaotic")
};
-
- return gender == unit_race::MALE
- ? aligns[align].c_str()
- : aligns_female[align].c_str();
+ 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 (sgettext(tlist[align]));
}
const char* unit_type::alignment_id(unit_type::ALIGNMENT align)
_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits