mirror of
https://git.suyu.dev/suyu/suyu
synced 2024-12-24 18:32:49 -06:00
Merge pull request #1367 from lioncash/plural
game_list: Handle plurals within setFilterResult() better
This commit is contained in:
commit
cf97d00eb6
1 changed files with 1 additions and 9 deletions
|
@ -89,15 +89,7 @@ bool GameList::SearchField::KeyReleaseEater::eventFilter(QObject* obj, QEvent* e
|
||||||
}
|
}
|
||||||
|
|
||||||
void GameList::SearchField::setFilterResult(int visible, int total) {
|
void GameList::SearchField::setFilterResult(int visible, int total) {
|
||||||
QString result_of_text = tr("of");
|
label_filter_result->setText(tr("%1 of %n result(s)", "", total).arg(visible));
|
||||||
QString result_text;
|
|
||||||
if (total == 1) {
|
|
||||||
result_text = tr("result");
|
|
||||||
} else {
|
|
||||||
result_text = tr("results");
|
|
||||||
}
|
|
||||||
label_filter_result->setText(
|
|
||||||
QString("%1 %2 %3 %4").arg(visible).arg(result_of_text).arg(total).arg(result_text));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void GameList::SearchField::clear() {
|
void GameList::SearchField::clear() {
|
||||||
|
|
Loading…
Reference in a new issue