[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-i18n-doc
Subject:    Re: RFC: Out with %n in KDE4
From:       Chusslove Illich <caslav.ilic () gmx ! net>
Date:       2006-07-15 12:32:53
Message-ID: 200607151432.56929.caslav.ilic () gmx ! net
[Download RAW message or body]


> [: Nicolas Goutte :]
> No please. %1 is Qt and not standard Gettext for plurals
>
> So again this would be a KDE-ism (and not even a Qt-ism) and therefore
> you would again need a translation tools that knows about KDE. [...]

Actually, in standard Gettext there is no concept of placeholder for 
plurals. Using pure Gettext calls, one has to specify plural-deciding 
argument separately from placeholder arguments, eg:

printf(gettextn("%d file in %s.\n", "%d files in %s.\n", nfiles),
       nfiles, dirpath);

(note nfiles repeated twice, once to choose plural form, then to substitute 
the placeholder).

Gettext however knows about several forms of placeholders, in order to do 
matching checks. Among them there is also qt-format, which will be set for 
messages with %number if xgettext is run with option -qt.

So, by having only %numbers in messages, we would gain extra support from 
Gettext.

> My idea was more to replace it with %i (or %d) as %n is really a nasty
> placeholder in a printf context.
>
> However you cannot remove it completely, as the translators have to tell
> somehow: "here I want the number".

It will always be that %1 is the plural-deciding argument.

Even if not so, I can't think of an example when it was not clear which 
placeholder is the plural number. And even even, if something like that 
would happen, it would be lost in the sea of other ambiguous meanings that 
translators anyway face.

-- 
Chusslove Illich (Часлав Илић)
Serbian KDE translation team

[Attachment #3 (application/pgp-signature)]

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic