Unified general phrases for duration.

This commit is contained in:
23rd
2022-03-31 19:45:11 +03:00
committed by John Preston
parent fb750b69e3
commit d9541b6a6e
17 changed files with 61 additions and 153 deletions
@@ -113,16 +113,10 @@ QString SelfDestructionBox::DaysLabel(int days) {
return !days
? QString()
: (days > 364)
? tr::lng_self_destruct_years(tr::now, lt_count, days / 365)
? tr::lng_years(tr::now, lt_count, days / 365)
: (days > 25)
? tr::lng_self_destruct_months(
tr::now,
lt_count,
qMax(days / 30, 1))
: tr::lng_self_destruct_weeks(
tr::now,
lt_count,
qMax(days / 7, 1));
? tr::lng_months(tr::now, lt_count, std::max(days / 30, 1))
: tr::lng_weeks(tr::now, lt_count, std::max(days / 7, 1));
}
void SelfDestructionBox::prepare() {