mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-31 14:45:14 +00:00
Unified general phrases for duration.
This commit is contained in:
@@ -53,8 +53,8 @@ void AutoLockBox::prepare() {
|
||||
}
|
||||
const auto minutes = (seconds % 3600);
|
||||
return (minutes
|
||||
? tr::lng_passcode_autolock_minutes
|
||||
: tr::lng_passcode_autolock_hours)(
|
||||
? tr::lng_minutes
|
||||
: tr::lng_hours)(
|
||||
tr::now,
|
||||
lt_count,
|
||||
minutes ? (seconds / 60) : (seconds / 3600));
|
||||
|
@@ -104,9 +104,9 @@ QString TimeLimitText(size_type limit) {
|
||||
const auto weeks = (days / 7);
|
||||
const auto months = (days / 29);
|
||||
return (months > 0)
|
||||
? tr::lng_local_storage_limit_months(tr::now, lt_count, months)
|
||||
? tr::lng_months(tr::now, lt_count, months)
|
||||
: (limit > 0)
|
||||
? tr::lng_local_storage_limit_weeks(tr::now, lt_count, weeks)
|
||||
? tr::lng_weeks(tr::now, lt_count, weeks)
|
||||
: tr::lng_local_storage_limit_never(tr::now);
|
||||
}
|
||||
|
||||
|
@@ -131,13 +131,10 @@ void StartPendingReset(
|
||||
const auto hours = (left / kHour);
|
||||
const auto minutes = (left / kMinute);
|
||||
const auto duration = days
|
||||
? tr::lng_group_call_duration_days(tr::now, lt_count, days)
|
||||
? tr::lng_days(tr::now, lt_count, days)
|
||||
: hours
|
||||
? tr::lng_group_call_duration_hours(tr::now, lt_count, hours)
|
||||
: tr::lng_group_call_duration_minutes(
|
||||
tr::now,
|
||||
lt_count,
|
||||
minutes);
|
||||
? tr::lng_hours(tr::now, lt_count, hours)
|
||||
: tr::lng_minutes(tr::now, lt_count, minutes);
|
||||
if (const auto strong = weak.data()) {
|
||||
strong->getDelegate()->show(Ui::MakeInformBox(
|
||||
tr::lng_cloud_password_reset_later(
|
||||
|
@@ -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() {
|
||||
|
Reference in New Issue
Block a user