About libconversion

Albert Astals Cid aacid at kde.org
Mon Apr 6 21:56:17 CEST 2009


Hi, this is more than anything targetted at Petri Damstén but Marco suggesting 
mailing the list so here i am.

There's a bug handling i18n in libconversion in that you have

Unit(QObject* parent, const QString& singular, const QString& plural,
const QString& symbol, double multiplier,
const QStringList& synonyms = QStringList());

That's wrong as it assumes just singular and plural, but can't handle 
languages with more than two plurals like Gaelic that has 5.

You should be really using a KLocalizedString (probably through ki18ncp) and 
using KLocalizedString::subs on it to get the correct results for all 
languages and numbers of the unit.

Albert


More information about the Plasma-devel mailing list