Complete.Org: Mailing Lists: Archives: freeciv-dev: December 2002:
[Freeciv-Dev] Re: (PR#2565) Plural form needed for unit types
Home

[Freeciv-Dev] Re: (PR#2565) Plural form needed for unit types

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv@xxxxxxx
Cc: freeciv@xxxxxxx, freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#2565) Plural form needed for unit types
From: "Raimar Falke via RT" <rt@xxxxxxxxxxxxxx>
Date: Tue, 17 Dec 2002 01:28:21 -0800
Reply-to: rt@xxxxxxxxxxxxxx

On Mon, Dec 16, 2002 at 03:25:43PM -0800, Guest via RT wrote:
> 
> [rfalke - Mon Dec 16 19:20:25 2002]:  
> > [guest - Fri Dec 13 14:27:46 2002]:  
> > > Plural forms are needed for unit types. The message in   
> > > "unithand.c",    
> > > "void handle_upgrade_unittype_request(struct player *, struct    
> > > packet_unittype_info *)":    
> > >     
> > >   "Game: %d %s upgraded to %s for %d gold."    
> > >     
> > > needs plural forms (at least in some translations).   
> >   
> > I don't know at once how this can be solved. I suggest a rewording  
> > to avoid it.  
>   
> Something like the following code should be used instead:  
> --- unithand.c.orig   2002-12-16 20:59:06.000000000 +0100  
> +++ unithand.c        2002-12-16 22:44:30.000000000 +0100  
> @@ -179,7 +179,20 @@  
>    conn_list_do_unbuffer(&pplayer->connections);  
>    if (upgraded > 0) {  
> -    notify_player(pplayer, _("Game: %d %s upgraded to %s for %d  
> gold."),   
> -               upgraded, unit_types[packet->type].name,   
> -               unit_types[to_unit].name, cost * upgraded);  
> +    notify_player  
> +      (pplayer,  
> +       PL_  
> +       ("Game: %d %s upgraded to %s for %d gold.",  
> +        "Game: %d %s upgraded to %s for %d gold.",  
> +        upgraded),   
> +       upgraded,  
> +       PL_  
> +       (unit_types[packet->type].name,  
> +        unit_types[packet->type].name/*_plural*/,  
> +        upgraded),  
> +       PL_  
> +       (unit_types[to_unit].name,  
> +        unit_types[to_unit].name/*_plural*/,  
> +        upgraded),  
> +       cost * upgraded);  
>      send_player_info(pplayer, pplayer);  
>    } else {  
>   
>   
> This lets me translate it as follws: 
> #: server/unithand.c:184  
> #, c-format  
> msgid "Game: %d %s upgraded to %s for %d gold."  
> msgid_plural "Game: %d %s upgraded to %s for %d gold."  
> msgstr[0] "Spel: %d %s ersatt med %s för %d guld."  
> msgstr[1] "Spel: %d %s ersatta med %s för %d guld."  
>   
> Now the swedish output is correct for unittypes where the plural form  
> is the same as the singular form.  
>   
> When name_plural is added to the struct in unittype.h (and the 
> rulesets), the "_plural" in the code above should be uncommented. 
> ("name" may already be translated, but that should maybe be changed 
> when implementing plural forms for unittypes in the rulesets.) 
>  
> If you decide to change this function you may want to apply the "clean 
> up handle_upgrade_unittype_request" patch (ticket #2566) at the same 
> time because it modifies the same code. 

So you are suggesting that we add plural forms for unit types to
correct one not so common message?! You may be able to expect my
answer ;)

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx
 "At the beginning of the week, we sealed ten BSD programmers
  into a computer room with a single distribution of BSD Unix.
  Upon opening the room after seven days, we found all ten programmers 
  dead, clutching each other's throats, and thirteen new flavors of BSD."




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