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 05:20:03 -0800
Reply-to: rt@xxxxxxxxxxxxxx

On Tue, Dec 17, 2002 at 03:54:57AM -0800, Guest via RT wrote:
> 
> [rfalke - Tue Dec 17 09:28:21 2002]: 
>  
> > 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 ;) 
>  
> Do you really want me to go through the whole code and show you every 
> message that needs plural forms for unit types? ;) 

I expect something in the range 5-10.

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx
 "Life is too short for reboots."




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