[freeciv-i18n] Re: po sources
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
On Fri, 2002-08-23 at 04:01, Egbert Hinzen wrote:
> Maybe I'm wrong, but I think this phrases
> #: client/gui-mui/citydlg.c:2196
> #, c-format
> msgid "%s citizens%s"
> #: client/gui-mui/citydlg.c:2200
> #, c-format
> msgid "%s - %s citizens%s"
> should be changed to plural forms in their sources.
I'm not sure of what you mean with this, but I've checked the code, and
all seems correct to me.
There are similar strings for all the guis, if you look inside the
freeciv.pot file, you'll find something like:
#: client/gui-gtk-2.0/citydlg.c:1579 client/gui-gtk/citydlg.c:1595
msgid "%s - %s citizens"
This entry will realize a string like this:
Berlin - 10.000 citizens
The first %s is a city name, the second is the number of thousands of
BUT, if there is any need for some language, to have specified different
plural forms for different number of thousands (unlikely, but possible)
then we indeed need a patch, as suggest by Egbert.
The gui-mui entries, have a %s at the end of the string, and that is
used to apply a string like "- happy", "- celebrating" or "- DISORDER",
all of them properly included in a _() macro.
If possible, however, I think that substituting the gui-mui string, with
two strings like other guis, will help to have less freeciv.pot entries
and thus less work for translation teams. (And less room for errors!)
the relevant code is this:
settextf(pdialog->title_text, _("%s citizens%s"),
settextf(pdialog->title_text, _("%s - %s citizens%s"),
you can easily see the settextf call, and the _("%s citizens%s") string
The second %s string supplied to this function, is already translated,
thus having something like _("%s citizens")"%s" if at all possible, will
do the job. I imagine that this can be wrong (If viewed from a
compilation point of view) but reaching a similar goal, is indeed a
precious aid from a translation point of view.
I hope that some kind guy with knowledge greater than mine can propose a
correct way of coding this.
> Egbert Hinzen
> ... PGP Public Keys at www.hinzen-koeln.de