On Tuesday 07 April 2009 00:23:46 Albert Astals Cid wrote: > A Dilluns, 6 d'abril de 2009, Albert Astals Cid va escriure: > > 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. > > Hmm people from IRC made me realize that maybe that Unit class is not used > for creating things like messages "2 meters" but for recognizing messages > entered by the user that are "2 meters". > > Sorry maybe i jumped to the conclusion too fast, what's it used for?
Problem is that currently it is used for both things like this: - All singular, plural, symbol and synonyms are used for matching user entered string. - Result string is constructed using singular and plural - singular is also used for filling combobox choices (unit converter applet) Petri
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ Plasma-devel mailing list Plasma-devel@kde.org https://mail.kde.org/mailman/listinfo/plasma-devel