Complete.Org: Mailing Lists: Archives: freeciv-dev: December 2001:
[Freeciv-Dev] Plural forms support
Home

[Freeciv-Dev] Plural forms support

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Plural forms support
From: "mateusz stefek" <matusik_s@xxxxx>
Date: Thu, 27 Dec 2001 15:55:19 +0100

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)
---
mateusz
u

Attachment: pluralforms.diff
Description: Binary data


[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] Plural forms support, mateusz stefek <=