[Freeciv-Dev] patch: moving unit helptext to rulesets (PR#129)
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
This patch demonstrates moving the helptext on units from helpdata.txt
to units.ruleset. This allows better customisation, and also i18n.
For i18n, I've just made one small change to the registry format,
so that backslash followed by genuine newline corresponds to no
newline in the string. To make things easier for helptext writers
and translaters, the helptext is now wrapped to the correct length
by code, using existing function wordwrap_string().
So, in the ruleset helptext may look like following:
helptext = _("\
This unit is invisible unless it is next to an enemy unit or city.\
It cannot make shore bombardments against enemy land units or cities.\
\n\n\
Submarines have a very high strategic value, but have a weak\
defence.\
")
And this generates following in po/freeciv.pot:
#: data/default/units.ruleset:1094
msgid ""
"This unit is invisible unless it is next to an enemy unit or city. It cannot "
"make shore bombardments against enemy land units or cities.\n"
"\n"
"Submarines have a very high strategic value, but have a weak defence."
msgstr ""
This patch only does units in the default ruleset, but corresponding
changes are straightforward for other units rulesets and for techs,
buildings, terrain, governments...
-- David
u_rs_help1a.diff.gz
Description: GNU Zip compressed data
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Freeciv-Dev] patch: moving unit helptext to rulesets (PR#129),
David Pfitzner <=
|
|