Skip to content

Commit 9af11ac

Browse files
author
isaac
committed
Merge commit '669137bde01dfc848ddad5beecefdea38112ede8'
2 parents f7f06d2 + 669137b commit 9af11ac

26 files changed

Lines changed: 336 additions & 262 deletions

File tree

‎Telegram/Telegram-iOS/en.lproj/Localizable.strings‎

Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5302,6 +5302,16 @@ Sorry for the inconvenience.";
53025302
"PeerInfo.AddToContacts" = "Add to Contacts";
53035303

53045304
"PeerInfo.BioExpand" = "more";
5305+
"PeerInfo.HiddenCommunityStatus" = "Hidden • %@";
5306+
"PeerInfo.Community.RemoveBot" = "Remove Bot from Community";
5307+
"PeerInfo.Community.AddBot" = "Add Bot to a Community";
5308+
"PeerInfo.Community.BotInfo" = "Make your bot part of a community with multiple related chats";
5309+
"PeerInfo.Community.RemoveChannel" = "Remove Channel from Community";
5310+
"PeerInfo.Community.AddChannel" = "Add Channel to a Community";
5311+
"PeerInfo.Community.ChannelInfo" = "Make your channel part of a community with multiple related chats";
5312+
"PeerInfo.Community.RemoveGroup" = "Remove Group from Community";
5313+
"PeerInfo.Community.AddGroup" = "Add Group to a Community";
5314+
"PeerInfo.Community.GroupInfo" = "Make your group part of a community with multiple related chats";
53055315

53065316
"External.OpenIn" = "Open in %@";
53075317

@@ -16346,6 +16356,7 @@ Error: %8$@";
1634616356

1634716357
"MediaPicker.SetNewGroupPhoto" = "Set new group photo";
1634816358
"MediaPicker.SetNewChannelPhoto" = "Set new channel photo";
16359+
"MediaPicker.SetNewCommunityPhoto" = "Set new community photo";
1634916360

1635016361
"Attachment.Link" = "Link";
1635116362

@@ -16414,6 +16425,98 @@ Error: %8$@";
1641416425
"Community.RemoveChat.Text" = "This chat will be removed from the community.";
1641516426
"Community.RemoveChat.Remove" = "Remove";
1641616427

16428+
"Community.View.Title" = "Community";
16429+
"Community.View.SectionJoined" = "CHATS YOU ARE IN";
16430+
"Community.View.SectionVisible" = "CHATS YOU CAN VIEW";
16431+
"Community.View.SectionRequestable" = "CHATS YOU CAN REQUEST TO JOIN";
16432+
"Community.View.SectionHidden" = "HIDDEN CHATS";
16433+
"Community.View.PendingRequests" = "Pending Requests";
16434+
"Community.View.PendingRequestHeader" = "PENDING REQUEST";
16435+
"Community.View.ShowAsOneChat" = "Show as One Chat";
16436+
"Community.View.ShowAsOneChatInfo" = "Group all community chats into one item in the chat list.";
16437+
"Community.View.AddChatButton" = "Add a Chat to Community";
16438+
"Community.View.PendingRequestApprovedToast" = "You've added the group to the community.";
16439+
"Community.View.PendingRequestDeclinedToast" = "You declined adding the group to the community.";
16440+
"Community.View.ChatsLimitReached" = "Sorry, this community has reached the maximum number of chats.";
16441+
"Community.Request.UnknownRequester" = "Someone";
16442+
"Community.Request.RequesterSuggestsGroup" = "%@ suggests this group:";
16443+
"Community.Request.PrivateStatus" = "visible only to its members";
16444+
"Community.Request.Decline" = "Decline";
16445+
"Community.Request.Add" = "Add";
16446+
"Community.Request.Title" = "Pending Requests";
16447+
"Community.Request.EmptyTitle" = "No Pending Requests";
16448+
"Community.Request.EmptyText" = "There are no more chats suggested for this community.";
16449+
"Community.Request.AddAll" = "Add All";
16450+
"Community.Request.AddAllChats" = "Add All Chats";
16451+
"Community.Request.AddAllConfirmation" = "Do you want to add %@ chats to the community?";
16452+
"Community.Request.DeclineAll" = "Decline All";
16453+
"Community.Request.DeclineAllConfirmation" = "Do you want to decline all %@ requests to join the community?";
16454+
"Community.Request.ApprovalInfo" = "Chats require admin approval before they're added to the community. [Change Settings >](settings)";
16455+
"Community.Request.SectionTitle_1" = "%@ CHAT SUGGESTED FOR THIS COMMUNITY";
16456+
"Community.Request.SectionTitle_any" = "%@ CHATS SUGGESTED FOR THIS COMMUNITY";
16457+
"Community.Request.ApprovedToast" = "You've added the group to the community.";
16458+
"Community.Request.DeclinedToast" = "You declined adding the group to the community.";
16459+
16460+
"Community.Edit.DeleteCommunity" = "Delete Community";
16461+
"Community.Edit.DeleteConfirmationText" = "Are you sure you want to delete this community?";
16462+
"Community.Edit.AddChat" = "Add Chat to Community";
16463+
"Community.Edit.CommunityNamePlaceholder" = "Community Name";
16464+
"Community.Edit.WhoCanAddChats" = "WHO CAN ADD CHATS";
16465+
"Community.Edit.PermissionAllMembers" = "All Members";
16466+
"Community.Edit.PermissionAllMembersInfo" = "Allow members to add their groups and channels to the community.";
16467+
"Community.Edit.PermissionOnlyAdmins" = "Only Admins";
16468+
"Community.Edit.PermissionOnlyAdminsInfo" = "Chats suggested by community members require admin approval.";
16469+
"Community.Edit.Administrators" = "Administrators";
16470+
"Community.Edit.PendingRequests" = "Pending Requests";
16471+
"Community.Edit.RemovedUsers" = "Removed Users";
16472+
"Community.Edit.ChatsLimitReached" = "Sorry, this community has reached the maximum number of chats.";
16473+
"Community.Edit.ChatsHeader_1" = "%@ CHAT";
16474+
"Community.Edit.ChatsHeader_any" = "%@ CHATS";
16475+
16476+
"Community.EditAdmin.PermissionChangeInfo" = "Edit Community Info";
16477+
"Community.EditAdmin.PermissionManageLinkedPeers" = "Edit Chat List";
16478+
"Community.EditAdmin.PermissionBanUsers" = "Ban Members";
16479+
"Community.EditAdmin.PermissionAddAdmins" = "Add Community Admins";
16480+
16481+
"Community.Admins.Title" = "Admins";
16482+
"Community.Admins.SectionTitle" = "COMMUNITY ADMINS";
16483+
"Community.Admins.AddAdmin" = "Add Admin";
16484+
"Community.Admins.Info" = "You can add admins to help you manage your community.";
16485+
16486+
"Community.Blacklist.Title" = "Removed Users";
16487+
"Community.Blacklist.RemoveUser" = "Remove User";
16488+
"Community.Blacklist.Info" = "Users removed from the community by admins cannot rejoin it via invite links.";
16489+
"Community.Blacklist.UsersSectionTitle" = "REMOVED USERS";
16490+
16491+
"Community.AdminActions.Footer_1" = "The user will be removed from [%@ chat >](community)";
16492+
"Community.AdminActions.Footer_any" = "The user will be removed from [%@ chats >](community)";
16493+
"Community.AdminActions.BanFromCommunity" = "Ban from the Community";
16494+
"Community.AdminActions.WarningTitle" = "Warning";
16495+
"Community.AdminActions.WarningChatCount_1" = "%@ chat";
16496+
"Community.AdminActions.WarningChatCount_any" = "%@ chats";
16497+
"Community.AdminActions.WarningText" = "Banning **%@** will also remove **%@** they created from the community.";
16498+
16499+
"Community.List.Title" = "Community";
16500+
"Community.List.SubtitleGroup" = "Make your group a part of community with multiple related chats.";
16501+
"Community.List.SubtitleChannel" = "Make your channel a part of community with multiple related chats.";
16502+
"Community.List.SubtitleBot" = "Make your bot a part of community with multiple related chats.";
16503+
"Community.List.CreateCommunity" = "Create Community";
16504+
"Community.List.ChatCount_1" = "%@ chat";
16505+
"Community.List.ChatCount_any" = "%@ chats";
16506+
"Community.List.AddToExistingHeader" = "ADD TO AN EXISTING COMMUNITY";
16507+
16508+
"Community.Add.Title" = "Add Chat";
16509+
"Community.Add.VisibilityHeader" = "CHAT VISIBILITY";
16510+
"Community.Add.VisibilityInfo" = "You won't be able to change this later.";
16511+
"Community.Add.VisibilityVisible" = "Visible";
16512+
"Community.Add.VisibilityVisibleInfo" = "Anyone in the community will be able to see this chat.";
16513+
"Community.Add.VisibilityHidden" = "Hidden";
16514+
"Community.Add.VisibilityHiddenInfo" = "Only invited members and community admins will see this chat.";
16515+
"Community.Add.ActionAddToCommunity" = "Add to Community";
16516+
16517+
"Community.PrivateChat.Info" = "This group is invite-only.\nOnly its members can view it.";
16518+
"Community.PrivateChat.MessageOwner" = "Message Group Owner";
16519+
1641716520
"Privacy.GroupsAndChannels.InviteToCommunityError" = "Sorry, you cannot add %@ to the community because of %@'s privacy settings.";
1641816521

1641916522
"Notification.CommunityAddedGroup" = "%1$@ added this group to %2$@ community";
@@ -16431,3 +16534,8 @@ Error: %8$@";
1643116534

1643216535
"Premium.RichText" = "Formatting Tools";
1643316536
"Premium.RichTextInfo" = "Add headers, tables, lists, AI and inline media to messages.";
16537+
16538+
"ChatList.Remove" = "Remove";
16539+
16540+
"Premium.Limits.Messages" = "Messages";
16541+
"Premium.Limits.MessagesInfo" = "Express yourself with longer messages";

‎submodules/ChatListUI/Sources/Node/ChatListItem.swift‎

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2704,6 +2704,7 @@ public class ChatListItemNode: ItemListRevealOptionsItemNode {
27042704
case todo
27052705
case game
27062706
case voiceMessage
2707+
case audio
27072708
}
27082709
var messageTypeIcon: MessageTypeIcon?
27092710
var ignoreForwardedIcon = false
@@ -3028,6 +3029,8 @@ public class ChatListItemNode: ItemListRevealOptionsItemNode {
30283029
if let file = media as? TelegramMediaFile {
30293030
if file.isVoice {
30303031
messageTypeIcon = .voiceMessage
3032+
} else if file.isMusic {
3033+
messageTypeIcon = .audio
30313034
}
30323035
} else if let _ = media as? TelegramMediaPoll {
30333036
messageTypeIcon = .poll
@@ -3243,6 +3246,9 @@ public class ChatListItemNode: ItemListRevealOptionsItemNode {
32433246
case .voiceMessage:
32443247
currentMessageTypeIcon = PresentationResourcesChatList.voiceMessageIcon(item.presentationData.theme)
32453248
currentMessageTypeIconOffset.y = -1.0
3249+
case .audio:
3250+
currentMessageTypeIcon = PresentationResourcesChatList.audioIcon(item.presentationData.theme)
3251+
currentMessageTypeIconOffset.y = -1.0
32463252
default:
32473253
break
32483254
}
@@ -3983,8 +3989,7 @@ public class ChatListItemNode: ItemListRevealOptionsItemNode {
39833989
if actions.contains(.delete) {
39843990
peerRevealOptions.append(ItemListRevealOption(key: RevealOptionKey.delete.rawValue, title: item.presentationData.strings.Common_Delete, icon: deleteIcon, color: item.presentationData.theme.list.itemDisclosureActions.destructive.fillColor, iconColor: item.presentationData.theme.list.itemDisclosureActions.destructive.foregroundColor, textColor: item.presentationData.theme.chatList.dateTextColor))
39853991
} else if actions.contains(.remove) {
3986-
//TODO:localize
3987-
peerRevealOptions.append(ItemListRevealOption(key: RevealOptionKey.delete.rawValue, title: "Remove", icon: deleteIcon, color: item.presentationData.theme.list.itemDisclosureActions.destructive.fillColor, iconColor: item.presentationData.theme.list.itemDisclosureActions.destructive.foregroundColor, textColor: item.presentationData.theme.chatList.dateTextColor))
3992+
peerRevealOptions.append(ItemListRevealOption(key: RevealOptionKey.delete.rawValue, title: item.presentationData.strings.ChatList_Remove, icon: deleteIcon, color: item.presentationData.theme.list.itemDisclosureActions.destructive.fillColor, iconColor: item.presentationData.theme.list.itemDisclosureActions.destructive.foregroundColor, textColor: item.presentationData.theme.chatList.dateTextColor))
39883993
}
39893994
}
39903995
} else {

‎submodules/MediaPickerUI/Sources/MediaPickerScreen.swift‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2086,8 +2086,7 @@ public final class MediaPickerScreenImpl: ViewController, MediaPickerScreen, Att
20862086
case .channel:
20872087
self.titleView.subtitle = presentationData.strings.MediaPicker_SetNewChannelPhoto
20882088
case .community:
2089-
//TODO:localize
2090-
self.titleView.subtitle = "Set new community photo"
2089+
self.titleView.subtitle = presentationData.strings.MediaPicker_SetNewCommunityPhoto
20912090
}
20922091
self.titleView.isEnabled = true
20932092
case .story:

‎submodules/PeerInfoUI/Sources/ChannelAdminController.swift‎

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -630,19 +630,15 @@ private func stringForRight(strings: PresentationStrings, right: TelegramChatAdm
630630
}
631631
}
632632

633-
private func stringForCommunityRight(_ right: TelegramChatAdminRightsFlags) -> String {
633+
private func stringForCommunityRight(strings: PresentationStrings, right: TelegramChatAdminRightsFlags) -> String {
634634
if right.contains(.canChangeInfo) {
635-
//TODO:localize
636-
return "Edit Community Info"
635+
return strings.Community_EditAdmin_PermissionChangeInfo
637636
} else if right.contains(.canManageLinkedPeers) {
638-
//TODO:localize
639-
return "Edit Group List"
637+
return strings.Community_EditAdmin_PermissionManageLinkedPeers
640638
} else if right.contains(.canBanUsers) {
641-
//TODO:localize
642-
return "Ban Members"
639+
return strings.Community_EditAdmin_PermissionBanUsers
643640
} else if right.contains(.canAddAdmins) {
644-
//TODO:localize
645-
return "Add Community Admins"
641+
return strings.Community_EditAdmin_PermissionAddAdmins
646642
} else {
647643
return ""
648644
}
@@ -1147,15 +1143,15 @@ private func channelAdminControllerEntries(presentationData: PresentationData, s
11471143
for right in rightsOrder {
11481144
if accountUserRightsFlags.contains(right) {
11491145
let enabled = !state.updating && admin.id != accountPeerId
1150-
entries.append(.rightItem(presentationData.theme, index, stringForCommunityRight(right), .direct(right), currentRightsFlags, currentRightsFlags.contains(right), enabled, [], false))
1146+
entries.append(.rightItem(presentationData.theme, index, stringForCommunityRight(strings: presentationData.strings, right: right), .direct(right), currentRightsFlags, currentRightsFlags.contains(right), enabled, [], false))
11511147
index += 1
11521148
}
11531149
}
11541150
} else if let initialParticipant = initialParticipant, case let .member(_, _, maybeAdminInfo, _, _, _) = initialParticipant, let adminInfo = maybeAdminInfo {
11551151
var index = 0
11561152
for right in rightsOrder {
11571153
if maskRightsFlags.contains(right) {
1158-
entries.append(.rightItem(presentationData.theme, index, stringForCommunityRight(right), .direct(right), adminInfo.rights.rights, adminInfo.rights.rights.contains(right), false, [], false))
1154+
entries.append(.rightItem(presentationData.theme, index, stringForCommunityRight(strings: presentationData.strings, right: right), .direct(right), adminInfo.rights.rights, adminInfo.rights.rights.contains(right), false, [], false))
11591155
index += 1
11601156
}
11611157
}
@@ -2088,10 +2084,8 @@ public func channelAdminController(context: AccountContext, updatedPresentationD
20882084
}
20892085

20902086
if case .community = channelPeer {
2091-
//TODO:localize
2092-
title = "Add Admin"
2093-
//TODO:localize
2094-
footerButtonTitle = "Add Admin"
2087+
title = presentationData.strings.Channel_Management_AddAdmin
2088+
footerButtonTitle = presentationData.strings.Channel_Management_AddAdmin
20952089
} else if case let .user(admin) = adminPeer, admin.botInfo != nil && invite {
20962090
title = presentationData.strings.Bot_AddToChat_Add_Title
20972091
footerItem = ChannelParticipantFooterItem(theme: presentationData.theme, title: state.adminRights ? presentationData.strings.Bot_AddToChat_Add_AddAsAdmin : presentationData.strings.Bot_AddToChat_Add_AddAsMember, displayProgress: state.updating, action: {

‎submodules/PeerInfoUI/Sources/ChannelAdminsController.swift‎

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -430,11 +430,10 @@ private func channelAdminsControllerEntries(presentationData: PresentationData,
430430
var entries: [ChannelAdminsEntry] = []
431431
if case let .community(peer) = peer {
432432
if let participants {
433-
//TODO:localize
434-
entries.append(.adminsHeader(presentationData.theme, "COMMUNITY ADMINS"))
433+
entries.append(.adminsHeader(presentationData.theme, presentationData.strings.Community_Admins_SectionTitle))
435434

436435
if peer.hasPermission(.addAdmins) {
437-
entries.append(.addAdmin(presentationData.theme, presentationData.strings.Channel_Management_AddModerator, state.editing))
436+
entries.append(.addAdmin(presentationData.theme, presentationData.strings.Community_Admins_AddAdmin, state.editing))
438437
}
439438

440439
var existingParticipantIds = Set<EnginePeer.Id>()
@@ -494,8 +493,7 @@ private func channelAdminsControllerEntries(presentationData: PresentationData,
494493
}
495494

496495
if peer.hasPermission(.addAdmins) {
497-
//TODO:localize
498-
let info = "You can add admins to help you manage your community."
496+
let info = presentationData.strings.Community_Admins_Info
499497
entries.append(.adminsInfo(presentationData.theme, info))
500498
}
501499
}
@@ -846,8 +844,7 @@ public func channelAdminsController(
846844
.start(next: { peerView, accountPeer in
847845
updateState { current in
848846
if case .community = peerView.peer {
849-
//TODO:localize
850-
let title = "Add Admin"
847+
let title = context.sharedContext.currentPresentationData.with { $0 }.strings.Community_Admins_AddAdmin
851848
let controller = context.sharedContext.makePeerSelectionController(PeerSelectionControllerParams(
852849
context: context,
853850
updatedPresentationData: updatedPresentationData,
@@ -1150,8 +1147,7 @@ public func channelAdminsController(
11501147

11511148
let title: String
11521149
if isCommunity {
1153-
//TODO:localize
1154-
title = "Admins"
1150+
title = presentationData.strings.Community_Admins_Title
11551151
} else {
11561152
title = isGroup ? presentationData.strings.ChatAdmins_Title : presentationData.strings.Channel_Management_Title
11571153
}

0 commit comments

Comments
 (0)