[poedit-users] plural functions other than ngettext()

Ruben Arslan <[email protected]> Mon, 9 Jun 2008 20:26:46 +0200
Newsgroups gmane.editors.poedit.user
Message-ID <[email protected]>
Hi again!

> On Wed, 2008-05-14 at 19:01 +0200, Ruben Arslan wrote:
> > Vaclav said:
> > > xgettext must be told that a keyword is plural, so you must either
> > > specify keywordspec as per xgettext documentation in place of the
> > > keyword in poedit's configuration dialog or wait for a fixed  
> version
> > > of poedit. If __ngettext uses same arguments as C ngettext()
> > > function, then it should be enough to use "__ngettext:1,2"  
> instead of
> > > "__ngettext" as the keyword (see xgettext documentation for
> > > explanation of what this means).
> >
> > I'm not familiar with command line apps at all and I was only  
> able to
> > grasp the gettext concept with PoEdit's help, so I wanted to humbly
> > ask you to implement this feature
>
> There is no feature to implement -- you just have to add your
> (nonstandard, AFAIK) _n() function to keywords list in Catalogs ->
> Settings -> Keywords, using the correct plural-form syntax.

Just in case anybody wonders: The correct plural-form syntax in my  
case is: _n:1,2
I didn't find it in the docs before because I thought it wasn't  
possible to do in PoEdit.
Thanks, Vaclav!
And yes _n() is a non-standard short hand for
function _n($msgid1,$msgid2,$n) {
	return sprintf(ngettext($msgid1,$msgid2,$n),$n); // saves the $n), 
$n) redundancy
}

regards, ruben

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php

_______________________________________________
Poedit-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/poedit-users