[Xfce-i18n] Planned fixes against the PO files

Daichi Kawahata daichi.k at aioros.ocn.ne.jp
Wed Aug 10 15:24:52 CEST 2005

On Wed, 10 Aug 2005 09:37:47 +0200
Jasper Huijsmans wrote:

> Daichi Kawahata schreef:
> ...
> > ...One thing which can be a major impact on Xfce i18n might
> > plural issue (in other words, adopting ngettext() in the
> > program). I'm not sure it'll happen but if you'll find such
> > problem on having translation to your language (especially
> > Slavic languages), feel free to raise a question.
> Would you care to explain to us how this works? I'm sure we're
> happy to make the lives of our translators a bit easier.

This function allows plural forms on displaying string, which
are required in certain languages, probably the following actual
may work (from gedit in Russian),

  #: ../gedit/dialogs/gedit-dialog-replace.c:1149
  #, c-format
  msgid "Found and replaced %d occurrence."
  msgid_plural "Found and replaced %d occurrences."
  msgstr[0] "Найдено и заменено %d вхождение."
  msgstr[1] "Найдено и заменено %d вхождения."
  msgstr[2] "Найдено и заменено %d вхождений."

As the above, there're languages which have multiple plural forms
against the single form, therefore even prepared English strings
(single/plural), they won't guarantee proper word form in those
languages. ngettext() would resolve such problem.

To adopt this function in Xfce,

  * Modifying libxfce4util

    libxfce4util/i18n.[ch] would be the place, in which

      #define P_(single, plural, num) \
      ngettext_((single), (plural), (num))
      #define ngettext(single, plural, num) ((num) == \
      1 ? (single) : (plural))

    or the like might be added.

  * Modifying xfce4-dev-tools

    Some line requires at m4macros/xdt-i18n.m4

  * Modifying actual places

    For example, in thunar/thunar-list-model.c at 1960,

      text = g_strdup_printf (_("%d items"), store->nrows);

    will be

      text = g_strdup_printf (P_("%d item", "%d items",
                                 store->nrows), store->nrows);

are required.

PS. I wish KOI8-R works for both of you (subscribers) and
Mr. mailman.


More information about the Xfce-i18n mailing list