diff --git a/Telegram/Resources/langs/lang.strings b/Telegram/Resources/langs/lang.strings index 15eaaf4d4..695bc67ff 100644 --- a/Telegram/Resources/langs/lang.strings +++ b/Telegram/Resources/langs/lang.strings @@ -267,7 +267,8 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL "lng_proxy_unsupported" = "Your Telegram Desktop version doesn't support this proxy type or the proxy link is invalid. Please update Telegram Desktop to the latest version."; "lng_edit_deleted" = "This message was deleted"; -"lng_edit_too_long" = "Your message text is too long"; +"lng_edit_limit_reached#one" = "You've reached the message text limit. Please make the text shorter by {count} character."; +"lng_edit_limit_reached#other" = "You've reached the message text limit. Please make the text shorter by {count} characters."; "lng_edit_message" = "Edit message"; "lng_edit_message_text" = "New message text..."; "lng_deleted" = "Deleted Account"; diff --git a/Telegram/SourceFiles/history/history_widget.cpp b/Telegram/SourceFiles/history/history_widget.cpp index 60ff6fa59..4659897af 100644 --- a/Telegram/SourceFiles/history/history_widget.cpp +++ b/Telegram/SourceFiles/history/history_widget.cpp @@ -3655,7 +3655,9 @@ void HistoryWidget::saveEditMsg() { Box(item, suggestModerateActions)); return; } else if (!left.text.isEmpty()) { - controller()->show(Ui::MakeInformBox(tr::lng_edit_too_long())); + const auto remove = left.text.size(); + controller()->show(Ui::MakeInformBox( + tr::lng_edit_limit_reached(tr::now, lt_count, remove))); return; } diff --git a/Telegram/SourceFiles/history/view/history_view_replies_section.cpp b/Telegram/SourceFiles/history/view/history_view_replies_section.cpp index 36bb555d2..4907fa920 100644 --- a/Telegram/SourceFiles/history/view/history_view_replies_section.cpp +++ b/Telegram/SourceFiles/history/view/history_view_replies_section.cpp @@ -1065,7 +1065,9 @@ void RepliesWidget::edit( } return; } else if (!left.text.isEmpty()) { - controller()->show(Ui::MakeInformBox(tr::lng_edit_too_long())); + const auto remove = left.text.size(); + controller()->show(Ui::MakeInformBox( + tr::lng_edit_limit_reached(tr::now, lt_count, remove))); return; } diff --git a/Telegram/SourceFiles/history/view/history_view_scheduled_section.cpp b/Telegram/SourceFiles/history/view/history_view_scheduled_section.cpp index e1695052f..9d49bd862 100644 --- a/Telegram/SourceFiles/history/view/history_view_scheduled_section.cpp +++ b/Telegram/SourceFiles/history/view/history_view_scheduled_section.cpp @@ -677,7 +677,9 @@ void ScheduledWidget::edit( } return; } else if (!left.text.isEmpty()) { - controller()->show(Ui::MakeInformBox(tr::lng_edit_too_long())); + const auto remove = left.text.size(); + controller()->show(Ui::MakeInformBox( + tr::lng_edit_limit_reached(tr::now, lt_count, remove))); return; }