Development > Coding
gettext in ufopedia
(1/1)
Hoehrer:
Currently gettext for the ufopedia is implemented again (as good as i could do it), but the text isn't showing.
--- Code: ---= cl_ufopedia.c ===============
...
menuText[TEXT_UFOPEDIA]=_(t->description);
...
===============================
--- End code ---
"t-> description" stores e.g "assault_txt", so it should be replaced with this text from en_GB.po (or de.po):
--- Code: ---#~ msgid "assault_txt"
#~ msgstr ""
#~ "The AR-80 is the standard weapon of the GDF forces. Using improved ammo "
#~ "and a revolutionary\n"
#~ "design, this rifle can do more damage as any comparable assault rifle. "
#~ "The AR-80s rear loaded\n"
#~ "clip allows the weapon to fire with greater accuracy as the bullet has to "
#~ "move down an extended\n"
#~ "muzzle before exiting the weapon. The Assault Rifle can also be repaired "
#~ "much easier due to the\n"
#~ "fact that it is built in modules. For example, the firing mechanism can "
#~ "be field repaired simply\n"
#~ "by removing the out of commission back end and inserting a new one. The "
#~ "entire process takes\n"
#~ "only minutes."
--- End code ---
What do i need to look at to get it working again?
Bug tracker:
http://sourceforge.net/tracker/index.php?func=detail&aid=1459715&group_id=157793&atid=805242
Werner
Mattn:
the i18n stuff works for me
Hoehrer:
--- Quote from: "Mattn" ---the i18n stuff works for me
--- End quote ---
It works for me as well ... except for the ufopedia texts (e.g _("_assault_txt") in code -> "assault_txt" in po)
It now displays only the "assault_txt" (msgid) stuff instead of the defined msgstr. I dunno why, everything seems to be defined correctly.
Werner
Mattn:
as i said- for me it works - maybe you have to make a local "make lang" in src/linux to update the mo files in base/i18n
Hoehrer:
Thanks, "make lang" did the job.
Werner
Navigation
[0] Message Index
Go to full version