2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 14:38:15 +00:00

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

View File

@@ -18,6 +18,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "ui/text/text_utilities.h"
#include "ui/toast/toast.h"
#include "ui/toasts/common_toasts.h"
#include "ui/text/format_values.h"
#include "styles/style_chat.h"
#include "styles/style_menu_icons.h"
@@ -37,11 +38,7 @@ void ShowAutoDeleteToast(
const auto duration = (period == 5)
? u"5 seconds"_q
: (period < 2 * 86400)
? tr::lng_ttl_about_duration1(tr::now)
: (period < 8 * 86400)
? tr::lng_ttl_about_duration2(tr::now)
: tr::lng_ttl_about_duration3(tr::now);
: Ui::FormatTTL(period);
const auto text = peer->isBroadcast()
? tr::lng_ttl_about_tooltip_channel(tr::now, lt_duration, duration)
: tr::lng_ttl_about_tooltip(tr::now, lt_duration, duration);