|
From: | Christian Mauduit |
Subject: | [Help-liquidwar6] Translating Liquid War |
Date: | Mon, 21 Sep 2009 17:32:00 +0200 (CEST) |
User-agent: | SquirrelMail/1.4.15 |
Hi, On Sat, August 22, 2009 4:28 pm, Karl Ove Hufthammer wrote: > Iâd like to translate Liquid War into Norwegian Nynorsk, FYI, I just updated the documentation today. Changes are not reflected online yet, it will probably wait until next official release. Until then, here's, as an attached document, the content of the "Translating" part of this updated documentation. Have a nice day, Christian. -- Christian Mauduit <address@hidden> - http://www.ufoot.org/ ___ __/\__ Liquid War 6 - http://www.gnu.org/software/liquidwar6/ / _")\~ \~/ "Les amis de la vérité sont ceux qui la cherchent et non _/ / /_ o_\ ceux qui se vantent de l'avoir trouvée" - Condorcet (__/ \/
Liquid War 6 uses GNU gettext for all
its messages. There's an online manual
about this tool. In practice, what you have to do as a translator is to
edit the po/xx.po
file with xx
being your language / country code.
For instance, to translate the game in French, one needs to edit po/fr.po
.
This is very important, you might already be aware of it if you are familiar
with gettext, but still it's worth mentionning : when a string contains special
characters such as %d
or %s
(in a general manner, anything with
a %
it's important that all translations contain exactly the same number
of %d
s and %s
s than the original.
For instance:
"foo has %d bars (%s)"
can be translated to:
"ziblug zdonc %d zuc - %s - tac"
The number, order and type of %
entries is preserved. To learn more
about these formats, use info printf
or man 3 printf
. In a
general manner, get informations about printf.
Additionnally, some strings are used by Scheme (Guile) code and not
by C code. Thus, they don't use the standard C/printf convention.
In these strings, what you must preserve and be aware of is the tilde
character ~
. Very often you'll see ~a
in a string. As
with the printf %
, you must preserve the number, order and type
of those. There is a complete
online reference
about this way of formatting strings.
Liquid War 6 has thousands and thousands of messages which could theorically be translated. In practise it's counter-productive to spend time to translate those, as the game is still evolving constantly, and as most of these messages are technical messages which inform about rare bugs and strange conditions. All sort of informations which, while valuable, are not intented for end-users and are more destinated to be reported in bug reports. To select only the interesting messages to translate, the current gettext configuration only uses a reduced set of files.
src/scriptpo.c
: the most important file. It contains the definitions used
by all the Guile code, this is where you'll find all the menu labels.
src/lib/sys/sys-log.c
: log messages and keywords.
src/lib/sys/sys-mem.c
: memory error messages, probably the most important ones.
src/lib/lw6-print.c
: contains some messages printed on the console.
As a side note, the file src/lib/hlp/hlp-reference.c
contains all the
entries for the various configuration options, anything that can be queried
by liquidwar6 --about=<keyword>
. This is several hundred messages. It
might be interesting to translate them some day, but it's obviously not a
priority today.
[Prev in Thread] | Current Thread | [Next in Thread] |