More human category when items haven't been rated yet

svn path=/trunk/KDE/kdebase/apps/; revision=678853
This commit is contained in:
Rafael Fernández López 2007-06-22 12:16:44 +00:00
parent 4062c4cf2d
commit 3b0b987093

View file

@ -168,7 +168,10 @@ QString DolphinItemCategorizer::categoryForItem(const QModelIndex& index,
if (item != 0) {
const Nepomuk::Resource resource(item->url().url(), Nepomuk::NFO::File());
const quint32 rating = resource.rating();
retString = i18np("1 star", "%1 stars", rating);
if (!rating)
retString = i18n("Not yet rated");
else
retString = i18np("1 star", "%1 stars", rating);
}
break;
}