Complete.Org: Mailing Lists: Archives: freeciv-dev: January 2002:
[Freeciv-Dev] Re: Plural forms support
Home

[Freeciv-Dev] Re: Plural forms support

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: mateusz stefek <matusik_s@xxxxx>
Cc: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: Plural forms support
From: Raimar Falke <hawk@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Sat, 5 Jan 2002 17:33:05 +0100
Reply-to: rf13@xxxxxxxxxxxxxxxxxxxxxx

On Thu, Dec 27, 2001 at 03:55:19PM +0100, mateusz stefek wrote:
> Hi,
> 
> I wrote a patch which helps handling plural forms in translations.
> 
> The attached patch is only declaration of macro:
> 
> #define PL_(String1,String2,n) ngettext(String1,String2,n)
> 
> Wchich should be used like:
> 
> PL_("change in: %d turn", "change in: %d turns", count_change_turns)
>     ^^^^^^^^^^^^^^^^^^^^^  ^^^^^^^^^^^^^^^^^^^^  ^^^^^^^^^^^^^^^^^
>     untranslated singular  untranslated plural    counter
> 
> when making freeciv.pot xgettext uses argument: --keyword=PL_
> Only singular form from PL_ is put into freeciv.pot and it's ok.
> 
> You have to run autoconf and ./configure before compiling new code.
> 
> The macro PL_() is currently never used.
> If you think PL_() system is good I'll go through the source and replace 
> every:
> n > 1 ? _("plural") : _("singular")
> with
> PL_("plural", "singular", n)

I never have though about this before. Sound ok. About how many
possible instance of PL_ are we speaking about? And why is only the
singular form put into the pot file?

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx
 "Microsoft DNS service terminates abnormally when it recieves a response
  to a DNS query that was never made.
  Fix Information: Run your DNS service on a different platform."
    -- MS service information on bugtraq


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