Complete.Org: Mailing Lists: Archives: freeciv-i18n: August 2002:
[freeciv-i18n] Re: po sources
Home

[freeciv-i18n] Re: po sources

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Egbert Hinzen <egbert@xxxxxxxxxxxxxxx>
Cc: Freeciv translators <freeciv-i18n@xxxxxxxxxxx>
Subject: [freeciv-i18n] Re: po sources
From: Davide Pagnin <nightmare@xxxxxxxxxx>
Date: 28 Aug 2002 10:06:04 +0200

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
#: client/gui-xaw/citydlg.c:1867
#, c-format
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
citizens.

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:

  if (pdialog->name_transparentstring)
  {
    set(pdialog->name_transparentstring,MUIA_TransparentString_Contents,
pdialog->pcity->name);
    settextf(pdialog->title_text, _("%s citizens%s"),
            
population_to_text(city_population(pdialog->pcity)),state?state:"");
  } else
  {
    settextf(pdialog->title_text, _("%s - %s citizens%s"),
             pdialog->pcity->name,
            
population_to_text(city_population(pdialog->pcity)),state?state:"");
  }

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
> 

        Ciao, Davide



[Prev in Thread] Current Thread [Next in Thread]