Complete.Org: Mailing Lists: Archives: freeciv-dev: September 2003:
[Freeciv-Dev] Re: (PR#3376) print exact number of points is science dial
Home

[Freeciv-Dev] Re: (PR#3376) print exact number of points is science dial

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: ggracian@xxxxxxx
Subject: [Freeciv-Dev] Re: (PR#3376) print exact number of points is science dialog
From: "jjc@xxxxxxxxxxxxxxxxxx" <jjc@xxxxxxxxxxxxxxxxxx>
Date: Mon, 8 Sep 2003 14:44:29 -0700
Reply-to: rt@xxxxxxxxxxxxxx

On Mon, Sep 08, 2003 at 11:54:36AM -0700, Jason Short wrote:
> jjc@xxxxxxxxxxxxxxxxxx wrote:
> 
> > This patch adds a display of the number of tech points per turn in 
> > the gtk and gtk2 science dialogs.  Now science dialog says things like:
> > Research speed: 20 turns/advance (14 bulbs/turn)
> > This saves you from having to add up all the bulbs manually in the city
> > dialog. 
> 
> I'm no expert, but I'm pretty positive PL_ cannot be used in this way:
> 
> >      my_snprintf(text, sizeof(text),
> > +           PL_("Research speed: %d turn/advance (%d bulbs/turn)",
> > +               PL_("Research speed: %d turns/advance (%d bulb/turn)", 
> > +                   "Research speed: %d turns/advance (%d bulbs/turn)",
> > +                   bulbs_per_turn),
> > +               turns_to_advance),
> > +           turns_to_advance, bulbs_per_turn);
> 
> Remember that some languages don't do plurals the way English does: 
> there may be three or more forms corresponding to arbitrary different 
> patterns, not just "singular" (for 1) and "plural" (for more than 1).
Well, it works in English for all the possible combinations. (turn bulb is not 
possible since an advance always requires at least 4 bulbs.) It will 
expand via a macro defined in common/fcintl.h to:
ngettext(("turn bulbs"),ngettext(("turns bulb"),("turns 
bulbs"),bulbs_per_turn),turns_to_advance)
which makes sense to me. 
I certainly agree that it will not work with three or more forms for languages
that have such a beast, but I don't see how the original 
PL_("turn","turns",turns_to_advance) would work any better.


-- 
Josh Cogliati




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