Improve gift phrases usage.

This commit is contained in:
John Preston 2025-01-06 09:27:44 +04:00
parent c722c5c46f
commit 183dd40f39
2 changed files with 3 additions and 3 deletions

View file

@ -533,7 +533,7 @@ Fn<void(Painter&, const Ui::ChatPaintContext &)> UniqueGiftBg(
p.save();
p.translate(inner.topLeft());
const auto tag = tr::lng_gift_limited_of_one(tr::now);
const auto tag = tr::lng_gift_collectible_tag(tr::now);
const auto font = st::semiboldFont;
p.setFont(font);
p.setPen(Qt::NoPen);

View file

@ -690,9 +690,9 @@ void InnerWidget::setupDuration() {
};
const auto label = [=](int value) {
return (value < 12)
? (QString::number(value) + 'm')
? tr::lng_months_tiny(tr::now, lt_count, value)
: (value < 999)
? (QString::number(value / 12) + 'y')
? tr::lng_years_tiny(tr::now, lt_count, value)
: QString::fromUtf8("\xE2\x88\x9E"); // utf-8 infinity
};
_container->add(