X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/525fdd8afc1468dc72e6a150cf75dee4c330bdcd..70e938b23ef3238bc69ad01ac85cd9262229ea82:/src/dolphinmodel.cpp diff --git a/src/dolphinmodel.cpp b/src/dolphinmodel.cpp index e74df4d3f..434a475f5 100644 --- a/src/dolphinmodel.cpp +++ b/src/dolphinmodel.cpp @@ -47,6 +47,8 @@ #include #include +static const char *others = I18N_NOOP2("@title:group Name", "Uncategorized"); + DolphinModel::DolphinModel(QObject *parent) : KDirModel(parent) { @@ -89,7 +91,7 @@ QVariant DolphinModel::data(const QModelIndex &index, int role) const if (name.size() > 1 && name.at(1).isLetter()) { retString = name.at(1).toUpper(); } else { - retString = i18nc("@title:group Name", "Others"); + retString = i18nc("@title:group Name", others); } } else { retString = name.at(0).toUpper(); @@ -103,14 +105,14 @@ QVariant DolphinModel::data(const QModelIndex &index, int role) const if (currA->isLetter()) { validCategory = true; } else if (currA->isDigit()) { - return i18nc("@title:group", "Others"); + return i18nc("@title:group Name", others); } else { ++currA; } } if (!validCategory) { - retString = validCategory ? *currA : i18nc("@title:group Name", "Others"); + retString = validCategory ? *currA : i18nc("@title:group Name", others); } else { retString = *currA; } @@ -241,6 +243,10 @@ QVariant DolphinModel::data(const QModelIndex &index, int role) const switch (index.column()) { case KDirModel::Name: { retVariant = data(index, KCategorizedSortFilterProxyModel::CategoryDisplayRole); + + if (retVariant == i18nc("@title:group Name", others)) + retVariant = QString(); + break; }