mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-03-18 17:40:59 +00:00
Use 'exception' and 'remove user' phrases.
This commit is contained in:
parent
22f1ffc72b
commit
c552db04d7
@ -143,10 +143,10 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
"lng_error_admin_limit_channel" = "Sorry, you've reached the maximum number of admins for this channel.";
|
||||
"lng_sure_add_admin_invite" = "This user is not a member of this group. Add them to the group and promote them to admin?";
|
||||
"lng_sure_add_admin_invite_channel" = "This user is not a subscriber of this channel. Add them to the channel and promote them to admin?";
|
||||
"lng_sure_add_admin_unban" = "This user is currently restricted or banned. Are you sure you want to unban and promote them?";
|
||||
"lng_sure_add_admin_unremove" = "This user is currently restricted or removed. Are you sure you want to 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_remove_user_group" = "Remove {user} from the group?";
|
||||
"lng_sure_remove_user_channel" = "Remove {user} from 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";
|
||||
|
||||
@ -663,9 +663,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
"lng_profile_create_public_link" = "Create public link";
|
||||
"lng_profile_edit_public_link" = "Edit public link";
|
||||
"lng_profile_search_members" = "Search members";
|
||||
"lng_profile_manage_admins" = "Manage administrators";
|
||||
"lng_profile_manage_blocklist" = "Manage banned users";
|
||||
"lng_profile_manage_restrictedlist" = "Manage restricted users";
|
||||
"lng_profile_common_groups#one" = "{count} group in common";
|
||||
"lng_profile_common_groups#other" = "{count} groups in common";
|
||||
"lng_profile_participants_section" = "Members";
|
||||
@ -788,8 +785,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
"lng_manage_peer_recent_actions" = "Recent Actions";
|
||||
"lng_manage_peer_members" = "Members";
|
||||
"lng_manage_peer_administrators" = "Administrators";
|
||||
"lng_manage_peer_banned_users" = "Banned users";
|
||||
"lng_manage_peer_restricted_users" = "Restricted users";
|
||||
"lng_manage_peer_exceptions" = "Exceptions";
|
||||
"lng_manage_peer_removed_users" = "Removed users";
|
||||
"lng_manage_peer_permissions" = "Permissions";
|
||||
@ -814,8 +809,8 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
|
||||
"lng_channel_add_members" = "Add members";
|
||||
"lng_channel_add_users" = "Add users";
|
||||
"lng_channel_add_banned" = "Ban user";
|
||||
"lng_channel_add_restricted" = "Restrict user";
|
||||
"lng_channel_add_removed" = "Remove user";
|
||||
"lng_channel_add_exception" = "Add exception";
|
||||
"lng_channel_admins" = "Administrators";
|
||||
"lng_channel_add_admin" = "Add Administrator";
|
||||
"lng_channel_admin_status_creator" = "Creator";
|
||||
@ -823,8 +818,8 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
"lng_channel_admin_status_not_admin" = "Not administrator";
|
||||
"lng_channel_banned_status_restricted_by" = "Restricted by {user}";
|
||||
|
||||
"lng_group_blocked_list_about" = "Banned users are removed from the group and can only come back if invited by an admin.\nInvite links don't work for them.";
|
||||
"lng_channel_blocked_list_about" = "Banned users are removed from the channel.\nInvite links don't work for them.";
|
||||
"lng_channel_removed_list_about" = "Users removed from the channel by admins cannot rejoin it via invite links.";
|
||||
"lng_group_removed_list_about" = "Users removed from the group by admins cannot rejoin it via invite links.";
|
||||
|
||||
"lng_chat_all_members_admins" = "All Members Are Admins";
|
||||
"lng_chat_about_all_admins" = "Group members can add new members, edit name and photo of the group.";
|
||||
@ -1521,8 +1516,8 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
"lng_restricted_send_inline_all" = "Posting inline content isn't allowed in this group.";
|
||||
"lng_restricted_send_polls_all" = "Posting polls isn't allowed in this group.";
|
||||
|
||||
"lng_restricted_list_title" = "Restricted users";
|
||||
"lng_banned_list_title" = "Banned users";
|
||||
"lng_exceptions_list_title" = "Exceptions";
|
||||
"lng_removed_list_title" = "Removed users";
|
||||
|
||||
"lng_admin_log_title_all" = "All actions";
|
||||
"lng_admin_log_title_selected" = "Selected actions";
|
||||
|
@ -283,9 +283,9 @@ void AddSpecialBoxController::prepare() {
|
||||
case Role::Admins:
|
||||
return langFactory(lng_channel_add_admin);
|
||||
case Role::Restricted:
|
||||
return langFactory(lng_channel_add_restricted);
|
||||
return langFactory(lng_channel_add_exception);
|
||||
case Role::Kicked:
|
||||
return langFactory(lng_channel_add_banned);
|
||||
return langFactory(lng_channel_add_removed);
|
||||
}
|
||||
Unexpected("Role in AddSpecialBoxController::prepare()");
|
||||
}();
|
||||
@ -476,7 +476,7 @@ void AddSpecialBoxController::showAdmin(
|
||||
if (!sure) {
|
||||
_editBox = Ui::show(
|
||||
Box<ConfirmBox>(
|
||||
lang(lng_sure_add_admin_unban),
|
||||
lang(lng_sure_add_admin_unremove),
|
||||
showAdminSure),
|
||||
LayerOption::KeepOther);
|
||||
return;
|
||||
@ -499,7 +499,7 @@ void AddSpecialBoxController::showAdmin(
|
||||
if (!sure) {
|
||||
_editBox = Ui::show(
|
||||
Box<ConfirmBox>(
|
||||
lang(lng_sure_add_admin_unban),
|
||||
lang(lng_sure_add_admin_unremove),
|
||||
showAdminSure),
|
||||
LayerOption::KeepOther);
|
||||
return;
|
||||
@ -709,8 +709,8 @@ void AddSpecialBoxController::kickUser(
|
||||
// Finally kick him.
|
||||
if (!sure) {
|
||||
const auto text = ((_peer->isChat() || _peer->isMegagroup())
|
||||
? lng_sure_ban_user_group
|
||||
: lng_sure_ban_user_channel)(lt_user, App::peerName(user));
|
||||
? lng_sure_remove_user_group
|
||||
: lng_sure_remove_user_channel)(lt_user, App::peerName(user));
|
||||
_editBox = Ui::show(
|
||||
Box<ConfirmBox>(text, kickUserSure),
|
||||
LayerOption::KeepOther);
|
||||
|
@ -807,9 +807,9 @@ void ParticipantsBoxController::Start(
|
||||
case Role::Admins:
|
||||
return langFactory(lng_channel_add_admin);
|
||||
case Role::Restricted:
|
||||
return langFactory(lng_channel_add_restricted);
|
||||
return langFactory(lng_channel_add_exception);
|
||||
case Role::Kicked:
|
||||
return langFactory(lng_channel_add_banned);
|
||||
return langFactory(lng_channel_add_removed);
|
||||
}
|
||||
Unexpected("Role value in ParticipantsBoxController::Start()");
|
||||
}();
|
||||
@ -980,10 +980,8 @@ void ParticipantsBoxController::restoreState(
|
||||
loadMoreRows();
|
||||
}
|
||||
PeerListController::restoreState(std::move(state));
|
||||
if (delegate()->peerListFullRowsCount() > 0) {
|
||||
setNonEmptyDescription();
|
||||
} else if (_allLoaded) {
|
||||
setDescriptionText(lang(lng_blocked_list_not_found));
|
||||
if (delegate()->peerListFullRowsCount() > 0 || _allLoaded) {
|
||||
refreshDescription();
|
||||
}
|
||||
if (_onlineSorter) {
|
||||
_onlineSorter->sort();
|
||||
@ -1003,8 +1001,8 @@ void ParticipantsBoxController::prepare() {
|
||||
case Role::Admins: return lng_channel_admins;
|
||||
case Role::Profile:
|
||||
case Role::Members: return lng_profile_participants_section;
|
||||
case Role::Restricted: return lng_restricted_list_title;
|
||||
case Role::Kicked: return lng_banned_list_title;
|
||||
case Role::Restricted: return lng_exceptions_list_title;
|
||||
case Role::Kicked: return lng_removed_list_title;
|
||||
}
|
||||
Unexpected("Role in ParticipantsBoxController::prepare()");
|
||||
}();
|
||||
@ -1153,11 +1151,7 @@ void ParticipantsBoxController::chatListReady() {
|
||||
return;
|
||||
}
|
||||
_allLoaded = true;
|
||||
if (delegate()->peerListFullRowsCount() > 0) {
|
||||
setNonEmptyDescription();
|
||||
} else {
|
||||
setDescriptionText(lang(lng_blocked_list_not_found));
|
||||
}
|
||||
refreshDescription();
|
||||
}
|
||||
|
||||
void ParticipantsBoxController::rebuildRowTypes() {
|
||||
@ -1243,15 +1237,12 @@ void ParticipantsBoxController::loadMoreRows() {
|
||||
}
|
||||
});
|
||||
|
||||
if (delegate()->peerListFullRowsCount() > 0) {
|
||||
if (_onlineSorter) {
|
||||
_onlineSorter->sort();
|
||||
}
|
||||
if (firstLoad) {
|
||||
setNonEmptyDescription();
|
||||
}
|
||||
} else if (_allLoaded) {
|
||||
setDescriptionText(lang(lng_blocked_list_not_found));
|
||||
if (_allLoaded
|
||||
|| (firstLoad && delegate()->peerListFullRowsCount() > 0)) {
|
||||
refreshDescription();
|
||||
}
|
||||
if (_onlineSorter) {
|
||||
_onlineSorter->sort();
|
||||
}
|
||||
delegate()->peerListRefreshRows();
|
||||
}).fail([this](const RPCError &error) {
|
||||
@ -1259,12 +1250,14 @@ void ParticipantsBoxController::loadMoreRows() {
|
||||
}).send();
|
||||
}
|
||||
|
||||
void ParticipantsBoxController::setNonEmptyDescription() {
|
||||
void ParticipantsBoxController::refreshDescription() {
|
||||
setDescriptionText((_role == Role::Kicked)
|
||||
? lang((_peer->isChat() || _peer->isMegagroup())
|
||||
? lng_group_blocked_list_about
|
||||
: lng_channel_blocked_list_about)
|
||||
: QString());
|
||||
? lng_group_removed_list_about
|
||||
: lng_channel_removed_list_about)
|
||||
: (delegate()->peerListFullRowsCount() > 0)
|
||||
? QString()
|
||||
: lang(lng_blocked_list_not_found));
|
||||
}
|
||||
|
||||
bool ParticipantsBoxController::feedMegagroupLastParticipants() {
|
||||
|
@ -200,7 +200,7 @@ private:
|
||||
void addNewItem();
|
||||
void addNewParticipants();
|
||||
|
||||
void setNonEmptyDescription();
|
||||
void refreshDescription();
|
||||
void setupListChangeViewers();
|
||||
void showAdmin(not_null<UserData*> user);
|
||||
void editAdminDone(
|
||||
|
Loading…
Reference in New Issue
Block a user