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

List:       kde-commits
Subject:    Re: playground/utils/dolphin/src
From:       David Faure <faure () kde ! org>
Date:       2007-02-11 23:08:20
Message-ID: 200702120008.21616.faure () kde ! org
[Download RAW message or body]

On Sunday 11 February 2007, Peter Penz wrote:
> SVN commit 632674 by ppenz:
> 
> fixed internationalization issue for languages with more complex plural forms \
> (thanks to David for the hint) 

Actually, there's even better:    
 QString summary =
        KIO::itemsSummaryString(m_lFileCount + m_lDirCount,
                                m_lFileCount,
                                m_lDirCount,
                                m_lDirSize,
                                true);

Which does:
KIO_EXPORT QString KIO::itemsSummaryString(uint items, uint files, uint dirs, \
KIO::filesize_t size, bool showSize) {
    QString text = items == 0 ? i18n( "No Items" ) : i18np( "One Item", "%n Items", \
items );  text += " - ";
    text += files == 0 ? i18n( "No Files" ) : i18np( "One File", "%n Files", files );
    if ( showSize && files > 0 )
    {
        text += ' ';
        text += i18n("(%1 Total)", KIO::convertSize( size ) );
    }
    text += " - ";
    text += dirs == 0 ? i18n( "No Folders" ) : i18np("One Folder", "%n Folders", \
dirs);  return text;
}

-- 
David Faure, faure@kde.org, sponsored by Trolltech to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).


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

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