[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Plurar and Singular



On Sun, Jan 11, 2004 at 08:55:57PM +0100, Nikolai Prokoschenko wrote:
> On Sun, Jan 11, 2004 at 10:08:46AM -0600, Steve Langasek wrote:
> 
> > > Have I understood you right, that debian-installer is not able to support
> > > ngettext, or is it usable, but not practical?
> > I assumed that it would be too complex to try to use ngettext from
> > debconf-based shell scripts, because I don't think there's any
> > supporting code for this.  But maybe support from the shell isn't needed
> > -- I'm not sure if Joey's comments are addressed at this particular
> > msgid, or at something else?
> 
> Exactly my problem: it seems that at least the templates are not ready for
> plural forms (while they have not been needed recently) and so it makes no
> sense to introduce anything on my side.

Right.
Steve told that removing PACKAGE_COUNT is an option if it is not that
useful.  This is true, but maybe in this specific case you could rewrite
the translated text to something like:
  The Debian package management tool, apt, is now configured, and can
  install any package.  Current number of packages is ${PACKAGE_COUNT}.

[...]
> According to gettext manual, ngettext should be supported for shell
> scripts, so it should be a matter of replacing the functions where it is
> needed, wouldn't it?

No, because gettext is not called when displaying templates.  Packages
contain a collection of English messages and their translations into
various languages.  Debconf internally stores these messages in a hash
langcode => 'translated message', and prints each message according to
user's preferences.
Someone familiar with plural forms handling should have a look at this
problem, it seems to be very hard.  The "debconf protocol" section in
debconf-devel(7) describes how config scripts communicate with debconf.

Denis



Reply to: