Slightly improved phrases to admin log for channels.

This commit is contained in:
23rd 2025-05-07 22:35:30 +03:00
parent ec61ac29ea
commit bcd899c641
2 changed files with 18 additions and 4 deletions

View file

@ -5264,10 +5264,13 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
"lng_admin_log_filter_all_actions" = "All actions"; "lng_admin_log_filter_all_actions" = "All actions";
"lng_admin_log_filter_actions_type_subtitle" = "Filter actions by type"; "lng_admin_log_filter_actions_type_subtitle" = "Filter actions by type";
"lng_admin_log_filter_actions_member_section" = "Members And Admins"; "lng_admin_log_filter_actions_member_section" = "Members And Admins";
"lng_admin_log_filter_actions_subscriber_section" = "Subscribers And Admins";
"lng_admin_log_filter_restrictions" = "New restrictions"; "lng_admin_log_filter_restrictions" = "New restrictions";
"lng_admin_log_filter_admins_new" = "Admin rights"; "lng_admin_log_filter_admins_new" = "Admin rights";
"lng_admin_log_filter_members_new" = "New members"; "lng_admin_log_filter_members_new" = "New members";
"lng_admin_log_filter_subscribers_new" = "New subscribers";
"lng_admin_log_filter_actions_settings_section" = "Group Settings"; "lng_admin_log_filter_actions_settings_section" = "Group Settings";
"lng_admin_log_filter_actions_channel_settings_section" = "Channel Settings";
"lng_admin_log_filter_info_group" = "Group info"; "lng_admin_log_filter_info_group" = "Group info";
"lng_admin_log_filter_info_channel" = "Channel info"; "lng_admin_log_filter_info_channel" = "Channel info";
"lng_admin_log_filter_actions_messages_section" = "Messages"; "lng_admin_log_filter_actions_messages_section" = "Messages";
@ -5278,6 +5281,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
"lng_admin_log_filter_voice_chats_channel" = "Live stream"; "lng_admin_log_filter_voice_chats_channel" = "Live stream";
"lng_admin_log_filter_invite_links" = "Invite links"; "lng_admin_log_filter_invite_links" = "Invite links";
"lng_admin_log_filter_members_removed" = "Members leaving"; "lng_admin_log_filter_members_removed" = "Members leaving";
"lng_admin_log_filter_subscribers_removed" = "Subscribers leaving";
"lng_admin_log_filter_topics" = "Topics"; "lng_admin_log_filter_topics" = "Topics";
"lng_admin_log_filter_sub_extend" = "Subscription Renewals"; "lng_admin_log_filter_sub_extend" = "Subscription Renewals";
"lng_admin_log_filter_all_admins" = "All users and admins"; "lng_admin_log_filter_all_admins" = "All users and admins";

View file

@ -25,12 +25,18 @@ EditFlagsDescriptor<FilterValue::Flags> FilterValueLabels(bool isChannel) {
| Flag::Unkick; | Flag::Unkick;
const auto membersNew = Flag::Join | Flag::Invite; const auto membersNew = Flag::Join | Flag::Invite;
const auto membersRemoved = Flag::Leave; const auto membersRemoved = Flag::Leave;
auto membersNewText = (isChannel
? tr::lng_admin_log_filter_subscribers_new
: tr::lng_admin_log_filter_members_new)(tr::now);
auto membersRemovedText = (isChannel
? tr::lng_admin_log_filter_subscribers_removed
: tr::lng_admin_log_filter_members_removed)(tr::now);
auto members = std::vector<Label>{ auto members = std::vector<Label>{
{ adminRights, tr::lng_admin_log_filter_admins_new(tr::now) }, { adminRights, tr::lng_admin_log_filter_admins_new(tr::now) },
{ restrictions, tr::lng_admin_log_filter_restrictions(tr::now) }, { restrictions, tr::lng_admin_log_filter_restrictions(tr::now) },
{ membersNew, tr::lng_admin_log_filter_members_new(tr::now) }, { membersNew, std::move(membersNewText) },
{ membersRemoved, tr::lng_admin_log_filter_members_removed(tr::now) }, { membersRemoved, std::move(membersRemovedText) },
}; };
const auto info = Flag::Info | Flag::Settings; const auto info = Flag::Info | Flag::Settings;
@ -76,11 +82,15 @@ EditFlagsDescriptor<FilterValue::Flags> FilterValueLabels(bool isChannel) {
} }
return { .labels = { return { .labels = {
{ {
tr::lng_admin_log_filter_actions_member_section(), !isChannel
? tr::lng_admin_log_filter_actions_member_section()
: tr::lng_admin_log_filter_actions_subscriber_section(),
std::move(members), std::move(members),
}, },
{ {
tr::lng_admin_log_filter_actions_settings_section(), !isChannel
? tr::lng_admin_log_filter_actions_settings_section()
: tr::lng_admin_log_filter_actions_channel_settings_section(),
std::move(settings), std::move(settings),
}, },
{ {