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

List:       kde-i18n-doc
Subject:    Re: Weird sentence in kmail.po
From:       Albert Astals Cid <aacid () kde ! org>
Date:       2012-02-07 23:15:28
Message-ID: 2928722.Fc8tWJAFYo () xps
[Download RAW message or body]

El Dimecres, 8 de febrer de 2012, a les 00:11:05, Kevin Krammer va escriure:
> On Tuesday, 2012-02-07, Albert Astals Cid wrote:
> > El Dimarts, 7 de febrer de 2012, a les 23:14:01, Kevin Krammer va 
escriure:
> > > On Tuesday, 2012-02-07, Albert Astals Cid wrote:
> > > > const QString joinGoo = i18nc("used to concatenate list names",
> > > > ", "); i18np("List %1 is empty", "Lists %1 are empty",
> > > > listOfNames.count(), listOfNames.join(joinGoo));
> > > > 
> > > > Would do the trick, no?
> > > 
> > > No idea, that's why I am asking :)
> > > 
> > > My guess would have been that something like this would get %1
> > > replaced
> > > by listOfNames.count()
> > 
> > That's because it is what it exactly does :D
> :
> :)
> :
> > You want
> > 
> > const QString joinGoo = i18nc("used to concatenate list names", ", ");
> > i18np("List %2 is empty", "Lists %2 are empty", listOfNames.count(),
> > listOfNames.join(joinGoo));
> 
> Isn't that equivalent?

No.

> 
> I mean: doesn't the first argument always replace the lowest numbered
> placeholder independet of the placeholder's "value"?

No

> I vaguely remember that being the case for QString::arg(), 

Right

> but of course KLocalizedString could handle this differently.

It does ;-)

And i know because i wrote a program to be sure ;-)

Albert

> 
> With the QString::arg() behavior the best I could come up with would be:
> 
> const QString joinGoo = i18nc("used to concatenate list names", ", ");
> i18np("One Listi s empty: %2", "%1 lists are empty: %2",
> listOfNames.count(), listOfNames.join(joinGoo));
> 
> Cheers,
> Kevin
[prev in list] [next in list] [prev in thread] [next in thread] 

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