mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-16 05:55:20 +00:00
Update localization
This commit is contained in:
parent
1f4297e0db
commit
3b719ede86
@ -12139,3 +12139,46 @@ Sorry for the inconvenience.";
|
||||
|
||||
"Channel.AdminLog.ShowMoreMessages_1" = "Show %@ More Message";
|
||||
"Channel.AdminLog.ShowMoreMessages_any" = "Show %@ More Messages";
|
||||
|
||||
"CreatePoll.OptionCountFooterFormat_1" = "You can add {count} more option.";
|
||||
"CreatePoll.OptionCountFooterFormat_any" = "You can add {count} more options.";
|
||||
|
||||
"Chat.AdminActionSheet.DeleteTitle_1" = "Delete 1 Message";
|
||||
"Chat.AdminActionSheet.DeleteTitle_any" = "Delete %d Messages";
|
||||
"Chat.AdminActionSheet.ReportSpam" = "Report Spam";
|
||||
"Chat.AdminActionSheet.DeleteAllSingle" = "Delete All from %@";
|
||||
"Chat.AdminActionSheet.DeleteAllMultiple" = "Delete All from Users";
|
||||
"Chat.AdminActionSheet.BanSingle" = "Ban %@";
|
||||
"Chat.AdminActionSheet.BanMultiple" = "Ban Users";
|
||||
"Chat.AdminActionSheet.RestrictSingle" = "Ban %@";
|
||||
"Chat.AdminActionSheet.RestrictMultiple" = "Ban Users";
|
||||
"Chat.AdminActionSheet.RestrictSectionHeader" = "ADDITIONAL ACTIONS";
|
||||
"Chat.AdminActionSheet.BanFooterSingle" = "Fully ban this user";
|
||||
"Chat.AdminActionSheet.RestrictFooterSingle" = "Partially restrict this user";
|
||||
"Chat.AdminActionSheet.BanFooterMultiple" = "Fully ban users";
|
||||
"Chat.AdminActionSheet.RestrictFooterMultiple" = "Partially restrict users";
|
||||
"Chat.AdminActionSheet.PermissionsSectionHeader" = "WHAT CAN THIS USER DO?";
|
||||
"Chat.AdminActionSheet.ActionButton" = "Proceed";
|
||||
|
||||
"Chat.AdminAction.ToastMessagesDeletedTitleSingle" = "Message Deleted";
|
||||
"Chat.AdminAction.ToastMessagesDeletedTitleMultiple" = "Messages Deleted";
|
||||
"Chat.AdminAction.ToastMessagesDeletedTextSingle" = "Message Deleted.";
|
||||
"Chat.AdminAction.ToastMessagesDeletedTextMultiple" = "Messages Deleted.";
|
||||
"Chat.AdminAction.ToastReportedSpamText_1" = "**1** user reported for spam.";
|
||||
"Chat.AdminAction.ToastReportedSpamText_any" = "**%d** users reported for spam.";
|
||||
"Chat.AdminAction.ToastBannedText_1" = "**1** user banned.";
|
||||
"Chat.AdminAction.ToastBannedText_any" = "**%d** users banned.";
|
||||
"Chat.AdminAction.ToastRestrictedText_1" = "**1** user restricted.";
|
||||
"Chat.AdminAction.ToastRestrictedText_any" = "**%d** users restricted.";
|
||||
|
||||
"Chat.MessageForwardInfo.StoryHeader" = "Forwarded story from";
|
||||
"Chat.MessageForwardInfo.ExpiredStoryHeader" = "Expired story from";
|
||||
"Chat.MessageForwardInfo.UnavailableStoryHeader" = "Expired story from";
|
||||
"Chat.MessageForwardInfo.MessageHeader" = "Forwarded from";
|
||||
|
||||
"Chat.NavigationNoTopics" = "You have no unread topics";
|
||||
|
||||
"Chat.NextSuggestedChannelSwipeProgress" = "Swipe up to go to the next channel";
|
||||
"Chat.NextSuggestedChannelSwipeAction" = "Release to go to the next channel";
|
||||
"Chat.NextUnreadTopicSwipeProgress" = "Swipe up to go to the next topic";
|
||||
"Chat.NextUnreadTopicSwipeAction" = "Release to go to the next topic";
|
||||
|
@ -688,14 +688,13 @@ final class ComposePollScreenComponent: Component {
|
||||
))))
|
||||
self.resetPollText = nil
|
||||
|
||||
//TODO:localize
|
||||
let pollTextSectionSize = self.pollTextSection.update(
|
||||
transition: transition,
|
||||
component: AnyComponent(ListSectionComponent(
|
||||
theme: environment.theme,
|
||||
header: AnyComponent(MultilineTextComponent(
|
||||
text: .plain(NSAttributedString(
|
||||
string: "QUESTION",
|
||||
string: environment.strings.CreatePoll_TextHeader,
|
||||
font: Font.regular(presentationData.listsFontSize.itemListBaseHeaderFontSize),
|
||||
textColor: environment.theme.list.freeTextColor
|
||||
)),
|
||||
@ -716,7 +715,7 @@ final class ComposePollScreenComponent: Component {
|
||||
transition.setFrame(view: pollTextSectionView, frame: pollTextSectionFrame)
|
||||
|
||||
if let itemView = pollTextSectionView.itemView(id: 0) as? ListComposePollOptionComponent.View {
|
||||
itemView.updateCustomPlaceholder(value: "Ask a Question", size: itemView.bounds.size, transition: .immediate)
|
||||
itemView.updateCustomPlaceholder(value: environment.strings.CreatePoll_TextPlaceholder, size: itemView.bounds.size, transition: .immediate)
|
||||
}
|
||||
}
|
||||
contentHeight += pollTextSectionSize.height
|
||||
@ -858,9 +857,9 @@ final class ComposePollScreenComponent: Component {
|
||||
for i in 0 ..< pollOptionsSectionReadyItems.count {
|
||||
let placeholder: String
|
||||
if i == pollOptionsSectionReadyItems.count - 1 {
|
||||
placeholder = "Add an Option"
|
||||
placeholder = environment.strings.CreatePoll_AddOption
|
||||
} else {
|
||||
placeholder = "Option"
|
||||
placeholder = environment.strings.CreatePoll_OptionPlaceholder
|
||||
}
|
||||
|
||||
if let itemView = pollOptionsSectionReadyItems[i].itemView.contents.view as? ListComposePollOptionComponent.View {
|
||||
@ -886,7 +885,7 @@ final class ComposePollScreenComponent: Component {
|
||||
transition: .immediate,
|
||||
component: AnyComponent(MultilineTextComponent(
|
||||
text: .plain(NSAttributedString(
|
||||
string: "POLL OPTIONS",
|
||||
string: environment.strings.CreatePoll_OptionsHeader,
|
||||
font: Font.regular(presentationData.listsFontSize.itemListBaseHeaderFontSize),
|
||||
textColor: environment.theme.list.freeTextColor
|
||||
)),
|
||||
@ -937,26 +936,36 @@ final class ComposePollScreenComponent: Component {
|
||||
if pollOptionsLimitReached {
|
||||
pollOptionsFooterTransition = pollOptionsFooterTransition.withAnimation(.none)
|
||||
pollOptionsComponent = AnyComponent(MultilineTextComponent(
|
||||
text: .plain(NSAttributedString(string: "You have added the maximum number of options.", font: Font.regular(presentationData.listsFontSize.itemListBaseHeaderFontSize), textColor: environment.theme.list.freeTextColor)),
|
||||
text: .plain(NSAttributedString(string: environment.strings.CreatePoll_AllOptionsAdded, font: Font.regular(presentationData.listsFontSize.itemListBaseHeaderFontSize), textColor: environment.theme.list.freeTextColor)),
|
||||
maximumNumberOfLines: 0
|
||||
))
|
||||
} else {
|
||||
let remainingCount = 10 - self.pollOptions.count
|
||||
let rawString = environment.strings.CreatePoll_OptionCountFooterFormat(Int32(remainingCount))
|
||||
|
||||
var pollOptionsFooterItems: [AnimatedTextComponent.Item] = []
|
||||
pollOptionsFooterItems.append(AnimatedTextComponent.Item(
|
||||
id: 0,
|
||||
isUnbreakable: true,
|
||||
content: .text("You can add ")
|
||||
))
|
||||
pollOptionsFooterItems.append(AnimatedTextComponent.Item(
|
||||
id: 1,
|
||||
isUnbreakable: true,
|
||||
content: .number(10 - self.pollOptions.count, minDigits: 1)
|
||||
))
|
||||
pollOptionsFooterItems.append(AnimatedTextComponent.Item(
|
||||
id: 2,
|
||||
isUnbreakable: true,
|
||||
content: .text(" more options.")
|
||||
))
|
||||
if let range = rawString.range(of: "{count}") {
|
||||
if range.lowerBound != rawString.startIndex {
|
||||
pollOptionsFooterItems.append(AnimatedTextComponent.Item(
|
||||
id: 0,
|
||||
isUnbreakable: true,
|
||||
content: .text(String(rawString[rawString.startIndex ..< range.lowerBound]))
|
||||
))
|
||||
}
|
||||
pollOptionsFooterItems.append(AnimatedTextComponent.Item(
|
||||
id: 1,
|
||||
isUnbreakable: true,
|
||||
content: .number(remainingCount, minDigits: 1)
|
||||
))
|
||||
if range.upperBound != rawString.endIndex {
|
||||
pollOptionsFooterItems.append(AnimatedTextComponent.Item(
|
||||
id: 2,
|
||||
isUnbreakable: true,
|
||||
content: .text(String(rawString[range.upperBound ..< rawString.endIndex]))
|
||||
))
|
||||
}
|
||||
}
|
||||
|
||||
pollOptionsComponent = AnyComponent(AnimatedTextComponent(
|
||||
font: Font.regular(presentationData.listsFontSize.itemListBaseHeaderFontSize),
|
||||
color: environment.theme.list.freeTextColor,
|
||||
@ -997,7 +1006,7 @@ final class ComposePollScreenComponent: Component {
|
||||
title: AnyComponent(VStack([
|
||||
AnyComponentWithIdentity(id: AnyHashable(0), component: AnyComponent(MultilineTextComponent(
|
||||
text: .plain(NSAttributedString(
|
||||
string: "Anonymous Voting",
|
||||
string: environment.strings.CreatePoll_Anonymous,
|
||||
font: Font.regular(presentationData.listsFontSize.baseDisplaySize),
|
||||
textColor: environment.theme.list.itemPrimaryTextColor
|
||||
)),
|
||||
@ -1018,7 +1027,7 @@ final class ComposePollScreenComponent: Component {
|
||||
title: AnyComponent(VStack([
|
||||
AnyComponentWithIdentity(id: AnyHashable(0), component: AnyComponent(MultilineTextComponent(
|
||||
text: .plain(NSAttributedString(
|
||||
string: "Multiple Answers",
|
||||
string: environment.strings.CreatePoll_MultipleChoice,
|
||||
font: Font.regular(presentationData.listsFontSize.baseDisplaySize),
|
||||
textColor: environment.theme.list.itemPrimaryTextColor
|
||||
)),
|
||||
@ -1042,7 +1051,7 @@ final class ComposePollScreenComponent: Component {
|
||||
title: AnyComponent(VStack([
|
||||
AnyComponentWithIdentity(id: AnyHashable(0), component: AnyComponent(MultilineTextComponent(
|
||||
text: .plain(NSAttributedString(
|
||||
string: "Quiz Mode",
|
||||
string: environment.strings.CreatePoll_Quiz,
|
||||
font: Font.regular(presentationData.listsFontSize.baseDisplaySize),
|
||||
textColor: environment.theme.list.itemPrimaryTextColor
|
||||
)),
|
||||
@ -1069,7 +1078,7 @@ final class ComposePollScreenComponent: Component {
|
||||
header: nil,
|
||||
footer: AnyComponent(MultilineTextComponent(
|
||||
text: .plain(NSAttributedString(
|
||||
string: "Polls in Quiz Mode have one correct answer. Users can't revoke their answers.",
|
||||
string: environment.strings.CreatePoll_QuizInfo,
|
||||
font: Font.regular(presentationData.listsFontSize.itemListBaseHeaderFontSize),
|
||||
textColor: environment.theme.list.freeTextColor
|
||||
)),
|
||||
@ -1098,7 +1107,7 @@ final class ComposePollScreenComponent: Component {
|
||||
theme: environment.theme,
|
||||
header: AnyComponent(MultilineTextComponent(
|
||||
text: .plain(NSAttributedString(
|
||||
string: "EXPLANATION",
|
||||
string: environment.strings.CreatePoll_ExplanationHeader,
|
||||
font: Font.regular(presentationData.listsFontSize.itemListBaseHeaderFontSize),
|
||||
textColor: environment.theme.list.freeTextColor
|
||||
)),
|
||||
@ -1106,7 +1115,7 @@ final class ComposePollScreenComponent: Component {
|
||||
)),
|
||||
footer: AnyComponent(MultilineTextComponent(
|
||||
text: .plain(NSAttributedString(
|
||||
string: "Users will see this comment after choosing a wrong answer, good for educational purposes.",
|
||||
string: environment.strings.CreatePoll_ExplanationInfo,
|
||||
font: Font.regular(presentationData.listsFontSize.itemListBaseHeaderFontSize),
|
||||
textColor: environment.theme.list.freeTextColor
|
||||
)),
|
||||
@ -1421,6 +1430,11 @@ final class ComposePollScreenComponent: Component {
|
||||
if sendButtonItem.isEnabled != isValid {
|
||||
sendButtonItem.isEnabled = isValid
|
||||
}
|
||||
|
||||
let controllerTitle = self.isQuiz ? presentationData.strings.CreatePoll_QuizTitle : presentationData.strings.CreatePoll_Title
|
||||
if controller.title != controllerTitle {
|
||||
controller.title = controllerTitle
|
||||
}
|
||||
}
|
||||
|
||||
if let currentEditingTag = self.currentEditingTag, previousEditingTag !== currentEditingTag, self.currentInputMode != .keyboard {
|
||||
@ -1514,12 +1528,13 @@ public class ComposePollScreen: ViewControllerComponentContainer, AttachmentCont
|
||||
completion: completion
|
||||
), navigationBarAppearance: .default, theme: .default)
|
||||
|
||||
//TODO:localize
|
||||
self.title = "New Poll"
|
||||
let presentationData = context.sharedContext.currentPresentationData.with { $0 }
|
||||
|
||||
self.navigationItem.setLeftBarButton(UIBarButtonItem(title: "Cancel", style: .plain, target: self, action: #selector(self.cancelPressed)), animated: false)
|
||||
self.title = isQuiz == true ? presentationData.strings.CreatePoll_QuizTitle : presentationData.strings.CreatePoll_Title
|
||||
|
||||
let sendButtonItem = UIBarButtonItem(title: "Send", style: .done, target: self, action: #selector(self.sendPressed))
|
||||
self.navigationItem.setLeftBarButton(UIBarButtonItem(title: presentationData.strings.Common_Cancel, style: .plain, target: self, action: #selector(self.cancelPressed)), animated: false)
|
||||
|
||||
let sendButtonItem = UIBarButtonItem(title: presentationData.strings.CreatePoll_Create, style: .done, target: self, action: #selector(self.sendPressed))
|
||||
self.sendButtonItem = sendButtonItem
|
||||
self.navigationItem.setRightBarButton(sendButtonItem, animated: false)
|
||||
sendButtonItem.isEnabled = false
|
||||
|
@ -651,16 +651,16 @@ private final class AdminUserActionsSheetComponent: Component {
|
||||
selectedPeers = self.optionReportSelectedPeers
|
||||
isExpanded = self.isOptionReportExpanded
|
||||
|
||||
title = "Report Spam"
|
||||
title = environment.strings.Chat_AdminActionSheet_ReportSpam
|
||||
case .deleteAll:
|
||||
sectionId = "delete-all"
|
||||
selectedPeers = self.optionDeleteAllSelectedPeers
|
||||
isExpanded = self.isOptionDeleteAllExpanded
|
||||
|
||||
if component.peers.count == 1 {
|
||||
title = "Delete All from \(EnginePeer(component.peers[0].peer).compactDisplayTitle)"
|
||||
title = environment.strings.Chat_AdminActionSheet_DeleteAllSingle(EnginePeer(component.peers[0].peer).compactDisplayTitle).string
|
||||
} else {
|
||||
title = "Delete All from Users"
|
||||
title = environment.strings.Chat_AdminActionSheet_DeleteAllMultiple
|
||||
}
|
||||
case .ban:
|
||||
sectionId = "ban"
|
||||
@ -670,11 +670,11 @@ private final class AdminUserActionsSheetComponent: Component {
|
||||
let banTitle: String
|
||||
let restrictTitle: String
|
||||
if component.peers.count == 1 {
|
||||
banTitle = "Ban \(EnginePeer(component.peers[0].peer).compactDisplayTitle)"
|
||||
restrictTitle = "Restrict \(EnginePeer(component.peers[0].peer).compactDisplayTitle)"
|
||||
banTitle = environment.strings.Chat_AdminActionSheet_BanSingle(EnginePeer(component.peers[0].peer).compactDisplayTitle).string
|
||||
restrictTitle = environment.strings.Chat_AdminActionSheet_RestrictSingle(EnginePeer(component.peers[0].peer).compactDisplayTitle).string
|
||||
} else {
|
||||
banTitle = "Ban Users"
|
||||
restrictTitle = "Restrict Users"
|
||||
banTitle = environment.strings.Chat_AdminActionSheet_BanMultiple
|
||||
restrictTitle = environment.strings.Chat_AdminActionSheet_RestrictMultiple
|
||||
}
|
||||
title = self.isConfigurationExpanded ? restrictTitle : banTitle
|
||||
}
|
||||
@ -870,13 +870,7 @@ private final class AdminUserActionsSheetComponent: Component {
|
||||
)))
|
||||
}
|
||||
|
||||
//TODO:localize
|
||||
let titleString: String
|
||||
if component.messageCount == 1 {
|
||||
titleString = "Delete 1 Message?"
|
||||
} else {
|
||||
titleString = "Delete \(component.messageCount) Messages?"
|
||||
}
|
||||
let titleString: String = environment.strings.Chat_AdminActionSheet_DeleteTitle(Int32(component.messageCount))
|
||||
let titleSize = self.title.update(
|
||||
transition: .immediate,
|
||||
component: AnyComponent(MultilineTextComponent(
|
||||
@ -928,7 +922,7 @@ private final class AdminUserActionsSheetComponent: Component {
|
||||
theme: environment.theme,
|
||||
header: AnyComponent(MultilineTextComponent(
|
||||
text: .plain(NSAttributedString(
|
||||
string: "ADDITIONAL ACTIONS",
|
||||
string: environment.strings.Chat_AdminActionSheet_RestrictSectionHeader,
|
||||
font: Font.regular(presentationData.listsFontSize.itemListBaseHeaderFontSize),
|
||||
textColor: environment.theme.list.freeTextColor
|
||||
)),
|
||||
@ -954,11 +948,11 @@ private final class AdminUserActionsSheetComponent: Component {
|
||||
let partiallyRestrictTitle: String
|
||||
let fullyBanTitle: String
|
||||
if component.peers.count == 1 {
|
||||
partiallyRestrictTitle = "Partially restrict this user"
|
||||
fullyBanTitle = "Fully ban this user"
|
||||
partiallyRestrictTitle = environment.strings.Chat_AdminActionSheet_RestrictFooterSingle
|
||||
fullyBanTitle = environment.strings.Chat_AdminActionSheet_BanFooterSingle
|
||||
} else {
|
||||
partiallyRestrictTitle = "Partially restrict users"
|
||||
fullyBanTitle = "Fully ban users"
|
||||
partiallyRestrictTitle = environment.strings.Chat_AdminActionSheet_RestrictFooterMultiple
|
||||
fullyBanTitle = environment.strings.Chat_AdminActionSheet_BanFooterMultiple
|
||||
}
|
||||
|
||||
let optionsFooterSize = self.optionsFooter.update(
|
||||
@ -1029,7 +1023,7 @@ private final class AdminUserActionsSheetComponent: Component {
|
||||
case .sendMessages:
|
||||
itemTitle = AnyComponent(MultilineTextComponent(
|
||||
text: .plain(NSAttributedString(
|
||||
string: "Send Messages",
|
||||
string: environment.strings.Channel_BanUser_PermissionSendMessages,
|
||||
font: Font.regular(presentationData.listsFontSize.baseDisplaySize),
|
||||
textColor: environment.theme.list.itemPrimaryTextColor
|
||||
)),
|
||||
@ -1041,7 +1035,7 @@ private final class AdminUserActionsSheetComponent: Component {
|
||||
itemTitle = AnyComponent(HStack([
|
||||
AnyComponentWithIdentity(id: 0, component: AnyComponent(MultilineTextComponent(
|
||||
text: .plain(NSAttributedString(
|
||||
string: "Send Media",
|
||||
string: environment.strings.Channel_BanUser_PermissionSendMedia,
|
||||
font: Font.regular(presentationData.listsFontSize.baseDisplaySize),
|
||||
textColor: environment.theme.list.itemPrimaryTextColor
|
||||
)),
|
||||
@ -1056,7 +1050,7 @@ private final class AdminUserActionsSheetComponent: Component {
|
||||
} else {
|
||||
itemTitle = AnyComponent(MultilineTextComponent(
|
||||
text: .plain(NSAttributedString(
|
||||
string: "Send Media",
|
||||
string: environment.strings.Channel_BanUser_PermissionSendMedia,
|
||||
font: Font.regular(presentationData.listsFontSize.baseDisplaySize),
|
||||
textColor: environment.theme.list.itemPrimaryTextColor
|
||||
)),
|
||||
@ -1068,7 +1062,7 @@ private final class AdminUserActionsSheetComponent: Component {
|
||||
case .addUsers:
|
||||
itemTitle = AnyComponent(MultilineTextComponent(
|
||||
text: .plain(NSAttributedString(
|
||||
string: "Add Users",
|
||||
string: environment.strings.Channel_BanUser_PermissionAddMembers,
|
||||
font: Font.regular(presentationData.listsFontSize.baseDisplaySize),
|
||||
textColor: environment.theme.list.itemPrimaryTextColor
|
||||
)),
|
||||
@ -1078,7 +1072,7 @@ private final class AdminUserActionsSheetComponent: Component {
|
||||
case .pinMessages:
|
||||
itemTitle = AnyComponent(MultilineTextComponent(
|
||||
text: .plain(NSAttributedString(
|
||||
string: "Pin Messages",
|
||||
string: environment.strings.Channel_EditAdmin_PermissionPinMessages,
|
||||
font: Font.regular(presentationData.listsFontSize.baseDisplaySize),
|
||||
textColor: environment.theme.list.itemPrimaryTextColor
|
||||
)),
|
||||
@ -1088,7 +1082,7 @@ private final class AdminUserActionsSheetComponent: Component {
|
||||
case .changeInfo:
|
||||
itemTitle = AnyComponent(MultilineTextComponent(
|
||||
text: .plain(NSAttributedString(
|
||||
string: "Change Chat Info",
|
||||
string: environment.strings.Channel_BanUser_PermissionChangeGroupInfo,
|
||||
font: Font.regular(presentationData.listsFontSize.baseDisplaySize),
|
||||
textColor: environment.theme.list.itemPrimaryTextColor
|
||||
)),
|
||||
@ -1163,23 +1157,23 @@ private final class AdminUserActionsSheetComponent: Component {
|
||||
let mediaItemTitle: String
|
||||
switch possibleMediaItem {
|
||||
case .photos:
|
||||
mediaItemTitle = "Send Photos"
|
||||
mediaItemTitle = environment.strings.Channel_BanUser_PermissionSendPhoto
|
||||
case .videos:
|
||||
mediaItemTitle = "Send Videos"
|
||||
mediaItemTitle = environment.strings.Channel_BanUser_PermissionSendVideo
|
||||
case .stickersAndGifs:
|
||||
mediaItemTitle = "Send Stickers & GIFs"
|
||||
mediaItemTitle = environment.strings.Channel_BanUser_PermissionSendStickersAndGifs
|
||||
case .music:
|
||||
mediaItemTitle = "Send Music"
|
||||
mediaItemTitle = environment.strings.Channel_BanUser_PermissionSendMusic
|
||||
case .files:
|
||||
mediaItemTitle = "Send Files"
|
||||
mediaItemTitle = environment.strings.Channel_BanUser_PermissionSendFile
|
||||
case .voiceMessages:
|
||||
mediaItemTitle = "Send Voice Messages"
|
||||
mediaItemTitle = environment.strings.Channel_BanUser_PermissionSendVoiceMessage
|
||||
case .videoMessages:
|
||||
mediaItemTitle = "Send Video Messages"
|
||||
mediaItemTitle = environment.strings.Channel_BanUser_PermissionSendVideoMessage
|
||||
case .links:
|
||||
mediaItemTitle = "Embed Links"
|
||||
mediaItemTitle = environment.strings.Channel_BanUser_PermissionEmbedLinks
|
||||
case .polls:
|
||||
mediaItemTitle = "Send Polls"
|
||||
mediaItemTitle = environment.strings.Channel_BanUser_PermissionSendPolls
|
||||
default:
|
||||
continue mediaRightsLoop
|
||||
}
|
||||
@ -1244,7 +1238,7 @@ private final class AdminUserActionsSheetComponent: Component {
|
||||
theme: environment.theme,
|
||||
header: AnyComponent(MultilineTextComponent(
|
||||
text: .plain(NSAttributedString(
|
||||
string: "WHAT CAN THIS USER DO?",
|
||||
string: environment.strings.Chat_AdminActionSheet_PermissionsSectionHeader,
|
||||
font: Font.regular(presentationData.listsFontSize.itemListBaseHeaderFontSize),
|
||||
textColor: environment.theme.list.freeTextColor
|
||||
)),
|
||||
@ -1318,7 +1312,7 @@ private final class AdminUserActionsSheetComponent: Component {
|
||||
content: AnyComponentWithIdentity(
|
||||
id: AnyHashable(0),
|
||||
component: AnyComponent(ButtonTextContentComponent(
|
||||
text: "Proceed",
|
||||
text: environment.strings.Chat_AdminActionSheet_ActionButton,
|
||||
badge: 0,
|
||||
textColor: environment.theme.list.itemCheckColors.foregroundColor,
|
||||
badgeBackground: environment.theme.list.itemCheckColors.foregroundColor,
|
||||
|
@ -264,21 +264,20 @@ public class ChatMessageForwardInfoNode: ASDisplayNode {
|
||||
titleColor = presentationData.theme.theme.chat.message.outgoing.accentTextColor
|
||||
}
|
||||
|
||||
//TODO:localize
|
||||
if let storyData = storyData {
|
||||
switch storyData.storyType {
|
||||
case .regular:
|
||||
titleString = PresentationStrings.FormattedString(string: "Forwarded story from", ranges: [])
|
||||
titleString = PresentationStrings.FormattedString(string: presentationData.strings.Chat_MessageForwardInfo_StoryHeader, ranges: [])
|
||||
authorString = peerString
|
||||
case .expired:
|
||||
titleString = PresentationStrings.FormattedString(string: "Expired story from", ranges: [])
|
||||
titleString = PresentationStrings.FormattedString(string: presentationData.strings.Chat_MessageForwardInfo_ExpiredStoryHeader, ranges: [])
|
||||
authorString = peerString
|
||||
case .unavailable:
|
||||
titleString = PresentationStrings.FormattedString(string: "Expired story from", ranges: [])
|
||||
titleString = PresentationStrings.FormattedString(string: presentationData.strings.Chat_MessageForwardInfo_UnavailableStoryHeader, ranges: [])
|
||||
authorString = peerString
|
||||
}
|
||||
} else {
|
||||
titleString = PresentationStrings.FormattedString(string: "Forwarded from", ranges: [])
|
||||
titleString = PresentationStrings.FormattedString(string: presentationData.strings.Chat_MessageForwardInfo_MessageHeader, ranges: [])
|
||||
authorString = peerString
|
||||
}
|
||||
}
|
||||
@ -309,7 +308,7 @@ public class ChatMessageForwardInfoNode: ASDisplayNode {
|
||||
titleString = strings.Message_GenericForwardedPsa(peerString)
|
||||
}
|
||||
} else {
|
||||
titleString = PresentationStrings.FormattedString(string: "Forwarded from", ranges: [])
|
||||
titleString = PresentationStrings.FormattedString(string: presentationData.strings.Chat_MessageForwardInfo_MessageHeader, ranges: [])
|
||||
authorString = peerString
|
||||
}
|
||||
}
|
||||
|
@ -972,8 +972,7 @@ final class OverscrollContentsComponent: Component {
|
||||
} else if let peer = component.peer {
|
||||
titleText = peer.compactDisplayTitle
|
||||
} else if component.isForumThread {
|
||||
//TODO:localize
|
||||
titleText = "You have no unread topics"
|
||||
titleText = component.context.sharedContext.currentPresentationData.with({ $0 }).strings.Chat_NavigationNoTopics
|
||||
} else {
|
||||
titleText = component.context.sharedContext.currentPresentationData.with({ $0 }).strings.Chat_NavigationNoChannels
|
||||
}
|
||||
|
@ -1658,7 +1658,6 @@ public extension EmojiPagerContentComponent {
|
||||
|
||||
let strings = context.sharedContext.currentPresentationData.with({ $0 }).strings
|
||||
|
||||
//TODO:localize
|
||||
let searchCategories: Signal<EmojiSearchCategories?, NoError>
|
||||
switch subject {
|
||||
case .groupPhotoEmojiSelection, .profilePhotoEmojiSelection:
|
||||
|
@ -26,10 +26,9 @@ extension ChatControllerImpl {
|
||||
return
|
||||
}
|
||||
|
||||
//TODO:localize
|
||||
var title: String? = messageIds.count == 1 ? "Message Deleted" : "Messages Deleted"
|
||||
var title: String? = messageIds.count == 1 ? self.presentationData.strings.Chat_AdminAction_ToastMessagesDeletedTitleSingle : self.presentationData.strings.Chat_AdminAction_ToastMessagesDeletedTitleMultiple
|
||||
if !result.deleteAllFromPeers.isEmpty {
|
||||
title = "Messages Deleted"
|
||||
title = self.presentationData.strings.Chat_AdminAction_ToastMessagesDeletedTitleMultiple
|
||||
}
|
||||
var text: String = ""
|
||||
var undoRights: [EnginePeer.Id: InitialBannedRights] = [:]
|
||||
@ -38,21 +37,13 @@ extension ChatControllerImpl {
|
||||
if !text.isEmpty {
|
||||
text.append("\n")
|
||||
}
|
||||
if result.reportSpamPeers.count == 1 {
|
||||
text.append("**1** user reported for spam.")
|
||||
} else {
|
||||
text.append("**\(result.reportSpamPeers.count)** users reported for spam.")
|
||||
}
|
||||
text.append(self.presentationData.strings.Chat_AdminAction_ToastReportedSpamText(Int32(result.reportSpamPeers.count)))
|
||||
}
|
||||
if !result.banPeers.isEmpty {
|
||||
if !text.isEmpty {
|
||||
text.append("\n")
|
||||
}
|
||||
if result.banPeers.count == 1 {
|
||||
text.append("**1** user banned.")
|
||||
} else {
|
||||
text.append("**\(result.banPeers.count)** users banned.")
|
||||
}
|
||||
text.append(self.presentationData.strings.Chat_AdminAction_ToastBannedText(Int32(result.banPeers.count)))
|
||||
for id in result.banPeers {
|
||||
if let value = initialUserBannedRights[id] {
|
||||
undoRights[id] = value
|
||||
@ -63,11 +54,7 @@ extension ChatControllerImpl {
|
||||
if !text.isEmpty {
|
||||
text.append("\n")
|
||||
}
|
||||
if result.updateBannedRights.count == 1 {
|
||||
text.append("**1** user restricted.")
|
||||
} else {
|
||||
text.append("**\(result.updateBannedRights.count)** users restricted.")
|
||||
}
|
||||
text.append(self.presentationData.strings.Chat_AdminAction_ToastRestrictedText(Int32(result.updateBannedRights.count)))
|
||||
for (id, _) in result.updateBannedRights {
|
||||
if let value = initialUserBannedRights[id] {
|
||||
undoRights[id] = value
|
||||
@ -97,9 +84,9 @@ extension ChatControllerImpl {
|
||||
}
|
||||
|
||||
if text.isEmpty {
|
||||
text = messageIds.count == 1 ? "Message Deleted." : "Messages Deleted."
|
||||
text = messageIds.count == 1 ? self.presentationData.strings.Chat_AdminAction_ToastMessagesDeletedTextSingle : self.presentationData.strings.Chat_AdminAction_ToastMessagesDeletedTextMultiple
|
||||
if !result.deleteAllFromPeers.isEmpty {
|
||||
text = "Messages Deleted."
|
||||
text = self.presentationData.strings.Chat_AdminAction_ToastMessagesDeletedTextMultiple
|
||||
}
|
||||
title = nil
|
||||
}
|
||||
|
@ -2243,12 +2243,11 @@ public final class ChatHistoryListNodeImpl: ListView, ChatHistoryNode, ChatHisto
|
||||
switch nextChannelToRead.location {
|
||||
case .same:
|
||||
if let controllerNode = self.controllerInteraction.chatControllerNode() as? ChatControllerNode, let chatController = controllerNode.interfaceInteraction?.chatController() as? ChatControllerImpl, chatController.customChatNavigationStack != nil {
|
||||
//TODO:localize
|
||||
swipeText = ("Pull up to go to the next channel", [])
|
||||
releaseText = ("Release to go to the next channel", [])
|
||||
swipeText = (self.currentPresentationData.strings.Chat_NextSuggestedChannelSwipeProgress, [])
|
||||
releaseText = (self.currentPresentationData.strings.Chat_NextSuggestedChannelSwipeAction, [])
|
||||
} else if nextChannelToRead.threadData != nil {
|
||||
swipeText = ("Pull up to go to the next topic", [])
|
||||
releaseText = ("Release to go to the next topic", [])
|
||||
swipeText = (self.currentPresentationData.strings.Chat_NextUnreadTopicSwipeProgress, [])
|
||||
releaseText = (self.currentPresentationData.strings.Chat_NextUnreadTopicSwipeAction, [])
|
||||
} else {
|
||||
swipeText = (self.currentPresentationData.strings.Chat_NextChannelSameLocationSwipeProgress, [])
|
||||
releaseText = (self.currentPresentationData.strings.Chat_NextChannelSameLocationSwipeAction, [])
|
||||
|
Loading…
x
Reference in New Issue
Block a user