diff --git a/Telegram/Resources/langs/lang.strings b/Telegram/Resources/langs/lang.strings index 25d8914997..76fe0ac46f 100644 --- a/Telegram/Resources/langs/lang.strings +++ b/Telegram/Resources/langs/lang.strings @@ -145,6 +145,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL "lng_sure_add_admin_unban" = "This user is currently restricted or banned. Are you sure you want to unban and promote them?"; "lng_sure_ban_admin" = "This user is an admin. Are you sure you want to go ahead and restrict them?"; "lng_sure_ban_user_group" = "Ban {user} in the group?"; +"lng_sure_ban_user_channel" = "Ban {user} in the channel?"; "lng_sure_enable_socks" = "Are you sure you want to enable this proxy?\n\nServer: {server}\nPort: {port}\n\nYou can change your proxy server later in the Settings (Connection Type)."; "lng_sure_enable" = "Enable"; @@ -606,6 +607,9 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL "lng_mute_duration_hours#one" = "For {count} hour"; "lng_mute_duration_hours#other" = "For {count} hours"; +"lng_mute_duration_days#one" = "For {count} day"; +"lng_mute_duration_days#other" = "For {count} days"; +"lng_mute_duration_forever" = "Forever"; "lng_mute_box_tip" = "Choose for how long you would like to turn off notifications for the following chat"; "lng_preview_loading" = "Getting Link Info..."; diff --git a/Telegram/SourceFiles/boxes/mute_settings_box.cpp b/Telegram/SourceFiles/boxes/mute_settings_box.cpp index 8797d43ef8..1a8b0239e7 100644 --- a/Telegram/SourceFiles/boxes/mute_settings_box.cpp +++ b/Telegram/SourceFiles/boxes/mute_settings_box.cpp @@ -58,9 +58,9 @@ void MuteSettingsBox::prepare() { if (hours < 24) { return lng_mute_duration_hours(lt_count, hours); } else if (hours < kForeverHours) { - return lng_rights_chat_banned_day(lt_count, hours / 24); + return lng_mute_duration_days(lt_count, hours / 24); } else { - return lang(lng_rights_chat_banned_forever); + return lang(lng_mute_duration_forever); } }(); object_ptr option(this, group, hours, text); diff --git a/Telegram/SourceFiles/profile/profile_channel_controllers.cpp b/Telegram/SourceFiles/profile/profile_channel_controllers.cpp index 84f4f12ef9..9e7d54a0ff 100644 --- a/Telegram/SourceFiles/profile/profile_channel_controllers.cpp +++ b/Telegram/SourceFiles/profile/profile_channel_controllers.cpp @@ -1592,8 +1592,10 @@ void AddParticipantBoxController::kickUser(not_null user, bool sure) // Finally kick him. if (!sure) { - auto text = lng_sure_ban_user_group(lt_user, App::peerName(user)); - _editBox = Ui::show(Box(text, [weak, user] { + const auto text = (_channel->isMegagroup() + ? lng_sure_ban_user_group + : lng_sure_ban_user_channel)(lt_user, App::peerName(user)); + _editBox = Ui::show(Box(text, [=] { if (weak) { weak->kickUser(user, true); }