KDE/kdevelop/languages/cpp

Nick Shaforostoff shafff at ukr.net
Tue Apr 14 12:03:51 UTC 2009


On Tuesday 14 of April 2009 12:34:41 Frederik Schwarzer wrote:
> On Tuesday 14 April 2009 00:07:57 you wrote:
> > On Mon, Apr 13, 2009 at 3:43 AM, Frederik Schwarzer
> > <schwarzerf at gmail.com> wrote:
> > > SVN commit 952999 by schwarzer:
> > >
> > > typo
> > >
> > >
> > >  M  +1 -1      quickopen.cpp
> > >
> > >
> > > --- trunk/KDE/kdevelop/languages/cpp/quickopen.cpp #952998:952999
> > > @@ -241,7 +241,7 @@
> > >         }
> > >       }
> > >     }else{
> > > -      return i18n( "In %1th include-path", m_item.pathNumber );
> > > +      return i18n( "In %1th include path", m_item.pathNumber );
> > 
> > I think this needs a plural of some sort... If I understand it
> > correctly (based soley on this context) this is going to produce
> > things like:
> > "In 1th include path"
> > "In 2th include path"
> > 
> > Not sure if i18n has support for this though...
> 
> Hi,
> 
> right, some sort of plural handling would be nice here if the thing works like you
> said. However, I do not know if this can be done with the i18n plural stuff.
> In general i18np expends to two cases in english (1 and more than 1). This is
> not enough for 1st, 2nd, 3rd ...
I believe i18np has nothing to do with -th form. at least in Russian and Ukrainian
the suffix (actually called 'ending') will be the same for any number.

so instead I suggest making a switch(m_item.pathNumber%10) and using several i18nc() - 
return i18nс("%1 % 10 = 1", "In %1st include-path", m_item.pathNumber );
return i18nс("%1 % 10 = 2", "In %1nd include-path", m_item.pathNumber );
return i18nс("%1 % 10 = 3", "In %1rd include-path", m_item.pathNumber );
return i18nс("%1 % 10 >= 4", "In %1th include-path", m_item.pathNumber );

 




More information about the KDevelop-devel mailing list