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

List:       kde-commits
Subject:    Re: branches/KDE/3.5/kdepim/kaddressbook
From:       Luká¨_Tinkl <lukas () kde ! org>
Date:       2005-08-08 9:18:43
Message-ID: 200508081118.44072.lukas () kde ! org
[Download RAW message or body]

Dne po 8. srpna 2005 6:36 Tobias Koenig napsal(a):
> On Sun, Aug 07, 2005 at 02:19:30PM +0200, Luk?? Tinkl wrote:
> > Dne so 6. srpna 2005 23:34 Tobias Koenig napsal(a):
>
> Hi Lukas,
>
> > >  QString PwDeleteCommand::name() const
> > >  {
> > > -  return i18n( "Delete" );
> > > +  return i18n( "Delete Contact", "Delete Contacts", mUIDList.count()
> > > );
> >
> > This is misusage of the plural-form feature; the string must contain the
> > %n character
>
> Hmm, but I don't need the %n here... Why doesn't it work?
>
> Does I really have to write such ugly code like
>
> if ( mUIDList.count() == 1 )
>   return i18n( "Delete Contact" );
> else
>   return i18n( "Delete Contacts" );

Either that, or use 
i18n("Delete Contact", "Delete %n contacts", mUIDList.count());

> I thought i18n would be smart enough for such a case...

It isn't that smart, it needs the %n placeholder in this case

-- 
LukᨠTinkl <lukas@kde.org>
KDE developer


The Killer Ducks are coming!!!

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

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