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
8f10c8e526
commit
30e7056c21
@ -10994,3 +10994,42 @@ Sorry for the inconvenience.";
|
|||||||
"Premium.MessageTags.Proceed" = "About Telegram Premium";
|
"Premium.MessageTags.Proceed" = "About Telegram Premium";
|
||||||
|
|
||||||
"Chat.SavedMessagesTabInfoText" = "Messages you send to **Saved Messages**";
|
"Chat.SavedMessagesTabInfoText" = "Messages you send to **Saved Messages**";
|
||||||
|
|
||||||
|
"VoiceOver.MessageSelectionButtonTag" = "Tag";
|
||||||
|
|
||||||
|
"Chat.ReactionSelectionTitleAddTag" = "Tag a message with emojis for quick search";
|
||||||
|
"Chat.ReactionSelectionTitleEditTag" = "Edit tags of selected messages";
|
||||||
|
"Chat.ForwardToSavedMessageTagSelectionTitle" = "You can add a tag to the message";
|
||||||
|
"Chat.ForwardToSavedMessagesTagSelectionTitle" = "You can add a tag to messages";
|
||||||
|
|
||||||
|
"Chat.EditTagTitle.Placeholder" = "Name";
|
||||||
|
"Chat.EditTagTitle.TitleSet" = "Set Name";
|
||||||
|
"Chat.EditTagTitle.TitleEdit" = "Edit Name";
|
||||||
|
"Chat.EditTagTitle.Text" = "You can label your emoji tag with a text name.";
|
||||||
|
|
||||||
|
"Chat.SavedMessagesModeMenu.ViewAsChats" = "View as Chats";
|
||||||
|
"Chat.SavedMessagesModeMenu.ViewAsMessages" = "View as Messages";
|
||||||
|
|
||||||
|
"Story.ContextMenuHD" = "Increase Quality";
|
||||||
|
"Story.ContextMenuSD" = "Decrease Quality";
|
||||||
|
"Story.ToastQualitySD.Title" = "Quality Lowered";
|
||||||
|
"Story.ToastQualitySD.Text" = "Stories will now download faster.";
|
||||||
|
"Story.ToastQualityHD.Title" = "Quality Increased";
|
||||||
|
"Story.ToastQualityHD.Text" = "You can lower the quality later for faster downloads."
|
||||||
|
|
||||||
|
"Story.UpgradeQuality.Title" = "High-Quality Stories";
|
||||||
|
"Story.UpgradeQuality.Text" = "Subscribe to premium to view stories in higher resolution.";
|
||||||
|
"Story.UpgradeQuality.Action" = "Increase Quality";
|
||||||
|
"Story.UpgradeQuality.ActionSubtitle" = "Premium Required";
|
||||||
|
|
||||||
|
"Chat.MessageContextMenu.NonPremiumTagsTitle" = "Organize your Saved Messages with tags for quicker access. [Learn more...]()";
|
||||||
|
|
||||||
|
"Chat.TooltipAddTagLabel" = "Tap and hold to add a name to your tag";
|
||||||
|
|
||||||
|
"Chat.MessageContextMenu.Remove" = "Remove";
|
||||||
|
|
||||||
|
"Chat.TagsHeaderPanel.Unlock" = "Unlock";
|
||||||
|
"Chat.TagsHeaderPanel.AddTags" = "Add tags";
|
||||||
|
"Chat.TagsHeaderPanel.AddTagsSuffix" = "to your Saved Messages";
|
||||||
|
"Chat.ReactionContextMenu.SetTagLabel" = "Set Name";
|
||||||
|
"Chat.ReactionContextMenu.EditTagLabel" = "Edit Name";
|
||||||
|
@ -113,13 +113,11 @@ public final class ChatMessageSelectionInputPanelNode: ChatInputPanelNode {
|
|||||||
|
|
||||||
self.tagButton = HighlightableButtonNode(pointerStyle: .rectangle(CGSize(width: 56.0, height: 40.0)))
|
self.tagButton = HighlightableButtonNode(pointerStyle: .rectangle(CGSize(width: 56.0, height: 40.0)))
|
||||||
self.tagButton.isAccessibilityElement = true
|
self.tagButton.isAccessibilityElement = true
|
||||||
//TODO:localize
|
self.tagButton.accessibilityLabel = strings.VoiceOver_MessageSelectionButtonTag
|
||||||
self.tagButton.accessibilityLabel = "Tag"
|
|
||||||
|
|
||||||
self.tagEditButton = HighlightableButtonNode(pointerStyle: .rectangle(CGSize(width: 56.0, height: 40.0)))
|
self.tagEditButton = HighlightableButtonNode(pointerStyle: .rectangle(CGSize(width: 56.0, height: 40.0)))
|
||||||
self.tagEditButton.isAccessibilityElement = true
|
self.tagEditButton.isAccessibilityElement = true
|
||||||
//TODO:localize
|
self.tagEditButton.accessibilityLabel = strings.VoiceOver_MessageSelectionButtonTag
|
||||||
self.tagEditButton.accessibilityLabel = "Edit Tag"
|
|
||||||
|
|
||||||
self.deleteButton.setImage(generateTintedImage(image: UIImage(bundleImageName: "Chat/Input/Accessory Panels/MessageSelectionTrash"), color: theme.chat.inputPanel.panelControlAccentColor), for: [.normal])
|
self.deleteButton.setImage(generateTintedImage(image: UIImage(bundleImageName: "Chat/Input/Accessory Panels/MessageSelectionTrash"), color: theme.chat.inputPanel.panelControlAccentColor), for: [.normal])
|
||||||
self.deleteButton.setImage(generateTintedImage(image: UIImage(bundleImageName: "Chat/Input/Accessory Panels/MessageSelectionTrash"), color: theme.chat.inputPanel.panelControlDisabledColor), for: [.disabled])
|
self.deleteButton.setImage(generateTintedImage(image: UIImage(bundleImageName: "Chat/Input/Accessory Panels/MessageSelectionTrash"), color: theme.chat.inputPanel.panelControlDisabledColor), for: [.disabled])
|
||||||
@ -255,14 +253,13 @@ public final class ChatMessageSelectionInputPanelNode: ChatInputPanelNode {
|
|||||||
|
|
||||||
let presentationData = context.sharedContext.currentPresentationData.with { $0 }
|
let presentationData = context.sharedContext.currentPresentationData.with { $0 }
|
||||||
|
|
||||||
//TODO:localize
|
|
||||||
let reactionContextNode = ReactionContextNode(
|
let reactionContextNode = ReactionContextNode(
|
||||||
context: context,
|
context: context,
|
||||||
animationCache: context.animationCache,
|
animationCache: context.animationCache,
|
||||||
presentationData: presentationData,
|
presentationData: presentationData,
|
||||||
items: reactionItems.map(ReactionContextItem.reaction),
|
items: reactionItems.map(ReactionContextItem.reaction),
|
||||||
selectedItems: actions.editTags,
|
selectedItems: actions.editTags,
|
||||||
title: actions.editTags.isEmpty ? "Tag a message with emojis for quick search" : "Edit tags of selected messages",
|
title: actions.editTags.isEmpty ? presentationData.strings.Chat_ReactionSelectionTitleAddTag : presentationData.strings.Chat_ReactionSelectionTitleEditTag,
|
||||||
reactionsLocked: false,
|
reactionsLocked: false,
|
||||||
alwaysAllowPremiumReactions: false,
|
alwaysAllowPremiumReactions: false,
|
||||||
allPresetReactionsAreAvailable: true,
|
allPresetReactionsAreAvailable: true,
|
||||||
|
@ -27,14 +27,13 @@ public final class ChatShareMessageTagView: UIView, UndoOverlayControllerAdditio
|
|||||||
public init(context: AccountContext, presentationData: PresentationData, isSingleMessage: Bool, reactionItems: [ReactionItem], completion: @escaping (TelegramMediaFile, UpdateMessageReaction) -> Void) {
|
public init(context: AccountContext, presentationData: PresentationData, isSingleMessage: Bool, reactionItems: [ReactionItem], completion: @escaping (TelegramMediaFile, UpdateMessageReaction) -> Void) {
|
||||||
super.init(frame: CGRect())
|
super.init(frame: CGRect())
|
||||||
|
|
||||||
//TODO:localize
|
|
||||||
let reactionContextNode = ReactionContextNode(
|
let reactionContextNode = ReactionContextNode(
|
||||||
context: context,
|
context: context,
|
||||||
animationCache: context.animationCache,
|
animationCache: context.animationCache,
|
||||||
presentationData: presentationData,
|
presentationData: presentationData,
|
||||||
items: reactionItems.map(ReactionContextItem.reaction),
|
items: reactionItems.map(ReactionContextItem.reaction),
|
||||||
selectedItems: Set(),
|
selectedItems: Set(),
|
||||||
title: isSingleMessage ? presentationData.strings.Chat_ContextMenuTagsTitle : "You can add a tag to messages",
|
title: isSingleMessage ? presentationData.strings.Chat_ForwardToSavedMessageTagSelectionTitle : presentationData.strings.Chat_ForwardToSavedMessagesTagSelectionTitle,
|
||||||
reactionsLocked: false,
|
reactionsLocked: false,
|
||||||
alwaysAllowPremiumReactions: false,
|
alwaysAllowPremiumReactions: false,
|
||||||
allPresetReactionsAreAvailable: true,
|
allPresetReactionsAreAvailable: true,
|
||||||
|
@ -242,8 +242,7 @@ private final class SavedTagNameAlertContentNode: AlertContentNode {
|
|||||||
self.file = file
|
self.file = file
|
||||||
self.titleFont = titleFont
|
self.titleFont = titleFont
|
||||||
|
|
||||||
//TODO:localize
|
self.inputFieldNode = PromptInputFieldNode(theme: ptheme, placeholder: strings.Chat_EditTagTitle_Placeholder, characterLimit: characterLimit)
|
||||||
self.inputFieldNode = PromptInputFieldNode(theme: ptheme, placeholder: "Name", characterLimit: characterLimit)
|
|
||||||
self.inputFieldNode.text = value ?? ""
|
self.inputFieldNode.text = value ?? ""
|
||||||
|
|
||||||
self.actionNodesSeparator = ASDisplayNode()
|
self.actionNodesSeparator = ASDisplayNode()
|
||||||
|
@ -11303,8 +11303,7 @@ public final class PeerInfoScreenImpl: ViewController, PeerInfoScreen, KeyShortc
|
|||||||
|
|
||||||
var items: [ContextMenuItem] = []
|
var items: [ContextMenuItem] = []
|
||||||
|
|
||||||
//TODO:localize
|
items.append(.action(ContextMenuActionItem(text: strings.Chat.SavedMessagesModeMenu_ViewAsChats, icon: { theme in
|
||||||
items.append(.action(ContextMenuActionItem(text: "View as Chats", icon: { theme in
|
|
||||||
if !isViewingAsTopics {
|
if !isViewingAsTopics {
|
||||||
return generateTintedImage(image: UIImage(bundleImageName: "Chat/Context Menu/Check"), color: .clear)
|
return generateTintedImage(image: UIImage(bundleImageName: "Chat/Context Menu/Check"), color: .clear)
|
||||||
}
|
}
|
||||||
@ -11331,7 +11330,7 @@ public final class PeerInfoScreenImpl: ViewController, PeerInfoScreen, KeyShortc
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
})))
|
})))
|
||||||
items.append(.action(ContextMenuActionItem(text: strings.Chat_ContextViewAsMessages, icon: { theme in
|
items.append(.action(ContextMenuActionItem(text: strings.Chat_SavedMessagesModeMenu_ViewAsMessages, icon: { theme in
|
||||||
if isViewingAsTopics {
|
if isViewingAsTopics {
|
||||||
return generateTintedImage(image: UIImage(bundleImageName: "Chat/Context Menu/Check"), color: .clear)
|
return generateTintedImage(image: UIImage(bundleImageName: "Chat/Context Menu/Check"), color: .clear)
|
||||||
}
|
}
|
||||||
|
@ -6758,9 +6758,8 @@ public final class StoryItemSetContainerComponent: Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if case let .file(file) = component.slice.item.storyItem.media, file.isVideo {
|
if case let .file(file) = component.slice.item.storyItem.media, file.isVideo {
|
||||||
//TODO:localize
|
|
||||||
let isHq = component.slice.additionalPeerData.preferHighQualityStories
|
let isHq = component.slice.additionalPeerData.preferHighQualityStories
|
||||||
items.append(.action(ContextMenuActionItem(text: isHq ? "Decrease Quality" : "Increase Quality", icon: { theme in
|
items.append(.action(ContextMenuActionItem(text: isHq ? component.strings.Story_ContextMenuSD : component.strings.Story_ContextMenuHD, icon: { theme in
|
||||||
if isHq {
|
if isHq {
|
||||||
return generateTintedImage(image: UIImage(bundleImageName: "Chat/Context Menu/QualitySd"), color: theme.contextMenu.primaryColor)
|
return generateTintedImage(image: UIImage(bundleImageName: "Chat/Context Menu/QualitySd"), color: theme.contextMenu.primaryColor)
|
||||||
} else {
|
} else {
|
||||||
@ -6774,22 +6773,20 @@ public final class StoryItemSetContainerComponent: Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if !component.slice.additionalPeerData.preferHighQualityStories && !accountUser.isPremium {
|
if !component.slice.additionalPeerData.preferHighQualityStories && !accountUser.isPremium {
|
||||||
//TODO:localize
|
|
||||||
self.presentQualityUpgradeScreen()
|
self.presentQualityUpgradeScreen()
|
||||||
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
let presentationData = component.context.sharedContext.currentPresentationData.with({ $0 }).withUpdated(theme: component.theme)
|
let presentationData = component.context.sharedContext.currentPresentationData.with({ $0 }).withUpdated(theme: component.theme)
|
||||||
//TODO:localize
|
|
||||||
let title: String
|
let title: String
|
||||||
let text: String
|
let text: String
|
||||||
if component.slice.additionalPeerData.preferHighQualityStories {
|
if component.slice.additionalPeerData.preferHighQualityStories {
|
||||||
title = "Quality Lowered"
|
title = component.strings.Story_ToastQualitySD_Title
|
||||||
text = "Stories will now download faster."
|
text = component.strings.Story_ToastQualitySD_Text
|
||||||
} else {
|
} else {
|
||||||
title = "Quality Increased"
|
title = component.strings.Story_ToastQualityHD_Title
|
||||||
text = "You can lower the quality later for faster downloads."
|
text = component.strings.Story_ToastQualityHD_Text
|
||||||
}
|
}
|
||||||
controller.present(UndoOverlayController(
|
controller.present(UndoOverlayController(
|
||||||
presentationData: presentationData,
|
presentationData: presentationData,
|
||||||
|
@ -166,11 +166,10 @@ private final class StoryQualityUpgradeSheetContentComponent: Component {
|
|||||||
|
|
||||||
contentHeight += 138.0
|
contentHeight += 138.0
|
||||||
|
|
||||||
//TODO:localize
|
|
||||||
let titleSize = self.title.update(
|
let titleSize = self.title.update(
|
||||||
transition: transition,
|
transition: transition,
|
||||||
component: AnyComponent(MultilineTextComponent(
|
component: AnyComponent(MultilineTextComponent(
|
||||||
text: .plain(NSAttributedString(string: "High-Quality Stories", font: Font.semibold(20.0), textColor: environment.theme.list.itemPrimaryTextColor)),
|
text: .plain(NSAttributedString(string: environment.strings.Story_UpgradeQuality_Title, font: Font.semibold(20.0), textColor: environment.theme.list.itemPrimaryTextColor)),
|
||||||
horizontalAlignment: .center,
|
horizontalAlignment: .center,
|
||||||
maximumNumberOfLines: 0
|
maximumNumberOfLines: 0
|
||||||
)),
|
)),
|
||||||
@ -186,11 +185,10 @@ private final class StoryQualityUpgradeSheetContentComponent: Component {
|
|||||||
contentHeight += titleSize.height
|
contentHeight += titleSize.height
|
||||||
contentHeight += 14.0
|
contentHeight += 14.0
|
||||||
|
|
||||||
//TODO:localize
|
|
||||||
let textSize = self.text.update(
|
let textSize = self.text.update(
|
||||||
transition: transition,
|
transition: transition,
|
||||||
component: AnyComponent(BalancedTextComponent(
|
component: AnyComponent(BalancedTextComponent(
|
||||||
text: .plain(NSAttributedString(string: "Subscribe to premium to view stories in higher resolution.", font: Font.regular(14.0), textColor: environment.theme.list.itemSecondaryTextColor)),
|
text: .plain(NSAttributedString(string: environment.strings.Story_UpgradeQuality_Text, font: Font.regular(14.0), textColor: environment.theme.list.itemSecondaryTextColor)),
|
||||||
horizontalAlignment: .center,
|
horizontalAlignment: .center,
|
||||||
maximumNumberOfLines: 0,
|
maximumNumberOfLines: 0,
|
||||||
lineSpacing: 0.18
|
lineSpacing: 0.18
|
||||||
@ -209,14 +207,13 @@ private final class StoryQualityUpgradeSheetContentComponent: Component {
|
|||||||
|
|
||||||
contentHeight += 32.0
|
contentHeight += 32.0
|
||||||
|
|
||||||
//TODO:localize
|
|
||||||
var buttonContents: [AnyComponentWithIdentity<Empty>] = []
|
var buttonContents: [AnyComponentWithIdentity<Empty>] = []
|
||||||
buttonContents.append(AnyComponentWithIdentity(id: AnyHashable(0 as Int), component: AnyComponent(
|
buttonContents.append(AnyComponentWithIdentity(id: AnyHashable(0 as Int), component: AnyComponent(
|
||||||
Text(text: "Increase Quality", font: Font.semibold(17.0), color: environment.theme.list.itemCheckColors.foregroundColor)
|
Text(text: environment.strings.Story_UpgradeQuality_Action, font: Font.semibold(17.0), color: environment.theme.list.itemCheckColors.foregroundColor)
|
||||||
)))
|
)))
|
||||||
|
|
||||||
buttonContents.append(AnyComponentWithIdentity(id: AnyHashable(1 as Int), component: AnyComponent(ButtonSubtitleComponent(
|
buttonContents.append(AnyComponentWithIdentity(id: AnyHashable(1 as Int), component: AnyComponent(ButtonSubtitleComponent(
|
||||||
title: "Premium Required",
|
title: environment.strings.Story_UpgradeQuality_ActionSubtitle,
|
||||||
color: environment.theme.list.itemCheckColors.foregroundColor.withMultipliedAlpha(0.7)
|
color: environment.theme.list.itemCheckColors.foregroundColor.withMultipliedAlpha(0.7)
|
||||||
))))
|
))))
|
||||||
|
|
||||||
|
@ -117,8 +117,7 @@ extension ChatControllerImpl {
|
|||||||
if self.presentationInterfaceState.isPremium {
|
if self.presentationInterfaceState.isPremium {
|
||||||
actions.reactionsTitle = presentationData.strings.Chat_ContextMenuTagsTitle
|
actions.reactionsTitle = presentationData.strings.Chat_ContextMenuTagsTitle
|
||||||
} else {
|
} else {
|
||||||
//TODO:localize
|
actions.reactionsTitle = presentationData.strings.Chat_MessageContextMenu_NonPremiumTagsTitle
|
||||||
actions.reactionsTitle = "Organize your Saved Messages with tags for quicker access. [Learn more...]()"
|
|
||||||
actions.reactionsLocked = true
|
actions.reactionsLocked = true
|
||||||
actions.selectedReactionItems = Set()
|
actions.selectedReactionItems = Set()
|
||||||
}
|
}
|
||||||
@ -308,24 +307,13 @@ extension ChatControllerImpl {
|
|||||||
}
|
}
|
||||||
self.currentContextController = controller
|
self.currentContextController = controller
|
||||||
|
|
||||||
//TODO:localize
|
|
||||||
controller.premiumReactionsSelected = { [weak self, weak controller] in
|
controller.premiumReactionsSelected = { [weak self, weak controller] in
|
||||||
guard let self else {
|
guard let self else {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
controller?.dismissWithoutContent()
|
controller?.dismissWithoutContent()
|
||||||
|
self.presentTagPremiumPaywall()
|
||||||
let context = self.context
|
|
||||||
var replaceImpl: ((ViewController) -> Void)?
|
|
||||||
let controller = PremiumDemoScreen(context: context, subject: .messageTags, action: {
|
|
||||||
let controller = PremiumIntroScreen(context: context, source: .messageTags)
|
|
||||||
replaceImpl?(controller)
|
|
||||||
})
|
|
||||||
replaceImpl = { [weak controller] c in
|
|
||||||
controller?.replace(with: c)
|
|
||||||
}
|
|
||||||
self.push(controller)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
controller.reactionSelected = { [weak self, weak controller] chosenUpdatedReaction, isLarge in
|
controller.reactionSelected = { [weak self, weak controller] chosenUpdatedReaction, isLarge in
|
||||||
@ -413,9 +401,8 @@ extension ChatControllerImpl {
|
|||||||
|
|
||||||
let _ = itemNode
|
let _ = itemNode
|
||||||
|
|
||||||
//TODO:localize
|
|
||||||
let rect = self.chatDisplayNode.view.convert(targetView.bounds, from: targetView).insetBy(dx: -8.0, dy: -8.0)
|
let rect = self.chatDisplayNode.view.convert(targetView.bounds, from: targetView).insetBy(dx: -8.0, dy: -8.0)
|
||||||
let tooltipScreen = TooltipScreen(account: self.context.account, sharedContext: self.context.sharedContext, text: .plain(text: "Tap and hold to add a name to your tag"), location: .point(rect, .bottom), displayDuration: .custom(5.0), shouldDismissOnTouch: { _, _ in
|
let tooltipScreen = TooltipScreen(account: self.context.account, sharedContext: self.context.sharedContext, text: .plain(text: self.presentationData.strings.Chat_TooltipAddTagLabel), location: .point(rect, .bottom), displayDuration: .custom(5.0), shouldDismissOnTouch: { _, _ in
|
||||||
return .dismiss(consume: false)
|
return .dismiss(consume: false)
|
||||||
})
|
})
|
||||||
self.present(tooltipScreen, in: .current)
|
self.present(tooltipScreen, in: .current)
|
||||||
|
@ -18,7 +18,6 @@ import PremiumUI
|
|||||||
|
|
||||||
extension ChatControllerImpl {
|
extension ChatControllerImpl {
|
||||||
func presentTagPremiumPaywall() {
|
func presentTagPremiumPaywall() {
|
||||||
//TODO:localize
|
|
||||||
let context = self.context
|
let context = self.context
|
||||||
var replaceImpl: ((ViewController) -> Void)?
|
var replaceImpl: ((ViewController) -> Void)?
|
||||||
let controller = PremiumDemoScreen(context: context, subject: .messageTags, action: {
|
let controller = PremiumDemoScreen(context: context, subject: .messageTags, action: {
|
||||||
@ -77,9 +76,8 @@ extension ChatControllerImpl {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
let optionTitle = hasTitle ? "Edit Name" : "Add Name"
|
let optionTitle = hasTitle ? self.presentationData.strings.Chat_EditTagTitle_TitleEdit : self.presentationData.strings.Chat_EditTagTitle_TitleSet
|
||||||
|
|
||||||
//TODO:localize
|
|
||||||
items.append(.action(ContextMenuActionItem(text: optionTitle, icon: { theme in
|
items.append(.action(ContextMenuActionItem(text: optionTitle, icon: { theme in
|
||||||
return generateTintedImage(image: UIImage(bundleImageName: "Chat/Context Menu/TagEditName"), color: theme.contextMenu.primaryColor)
|
return generateTintedImage(image: UIImage(bundleImageName: "Chat/Context Menu/TagEditName"), color: theme.contextMenu.primaryColor)
|
||||||
}, action: { [weak self] c, a in
|
}, action: { [weak self] c, a in
|
||||||
@ -101,8 +99,7 @@ extension ChatControllerImpl {
|
|||||||
|
|
||||||
let reaction = value
|
let reaction = value
|
||||||
|
|
||||||
//TODO:localize
|
let promptController = savedTagNameAlertController(context: self.context, updatedPresentationData: nil, text: optionTitle, subtext: self.presentationData.strings.Chat_EditTagTitle_Text, value: savedMessageTags.tags.first(where: { $0.reaction == reaction })?.title ?? "", reaction: reaction, file: reactionFile, characterLimit: 10, apply: { [weak self] value in
|
||||||
let promptController = savedTagNameAlertController(context: self.context, updatedPresentationData: nil, text: optionTitle, subtext: "You can label your emoji tag with a text name.", value: savedMessageTags.tags.first(where: { $0.reaction == reaction })?.title ?? "", reaction: reaction, file: reactionFile, characterLimit: 10, apply: { [weak self] value in
|
|
||||||
guard let self else {
|
guard let self else {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
@ -1667,8 +1667,7 @@ func contextMenuForChatPresentationInterfaceState(chatPresentationInterfaceState
|
|||||||
title = chatPresentationInterfaceState.strings.Conversation_ContextMenuCancelSending
|
title = chatPresentationInterfaceState.strings.Conversation_ContextMenuCancelSending
|
||||||
} else {
|
} else {
|
||||||
if case .peer(context.account.peerId) = chatPresentationInterfaceState.chatLocation, message.effectivelyIncoming(context.account.peerId) {
|
if case .peer(context.account.peerId) = chatPresentationInterfaceState.chatLocation, message.effectivelyIncoming(context.account.peerId) {
|
||||||
//TODO:localize
|
title = chatPresentationInterfaceState.strings.Chat_MessageContextMenu_Remove
|
||||||
title = "Remove"
|
|
||||||
} else {
|
} else {
|
||||||
title = chatPresentationInterfaceState.strings.Conversation_ContextMenuDelete
|
title = chatPresentationInterfaceState.strings.Conversation_ContextMenuDelete
|
||||||
}
|
}
|
||||||
|
@ -133,11 +133,10 @@ final class ChatSearchTitleAccessoryPanelNode: ChatTitleAccessoryPanelNode, Chat
|
|||||||
containerSize: CGSize(width: 14.0, height: 14.0)
|
containerSize: CGSize(width: 14.0, height: 14.0)
|
||||||
)
|
)
|
||||||
|
|
||||||
//TODO:localize
|
|
||||||
let titleSize = self.title.update(
|
let titleSize = self.title.update(
|
||||||
transition: .immediate,
|
transition: .immediate,
|
||||||
component: AnyComponent(MultilineTextComponent(
|
component: AnyComponent(MultilineTextComponent(
|
||||||
text: .plain(NSAttributedString(string: isUnlock ? "Unlock" : "Add tags", font: Font.medium(14.0), textColor: theme.rootController.navigationBar.accentTextColor))
|
text: .plain(NSAttributedString(string: isUnlock ? strings.Chat_TagsHeaderPanel_Unlock : strings.Chat_TagsHeaderPanel_AddTags, font: Font.medium(14.0), textColor: theme.rootController.navigationBar.accentTextColor))
|
||||||
)),
|
)),
|
||||||
environment: {},
|
environment: {},
|
||||||
containerSize: CGSize(width: 200.0, height: 100.0)
|
containerSize: CGSize(width: 200.0, height: 100.0)
|
||||||
@ -175,7 +174,7 @@ final class ChatSearchTitleAccessoryPanelNode: ChatTitleAccessoryPanelNode, Chat
|
|||||||
let textSize = self.text.update(
|
let textSize = self.text.update(
|
||||||
transition: .immediate,
|
transition: .immediate,
|
||||||
component: AnyComponent(MultilineTextComponent(
|
component: AnyComponent(MultilineTextComponent(
|
||||||
text: .plain(NSAttributedString(string: "to your Saved Messages", font: Font.regular(14.0), textColor: theme.rootController.navigationBar.secondaryTextColor))
|
text: .plain(NSAttributedString(string: strings.Chat_TagsHeaderPanel_AddTagsSuffix, font: Font.regular(14.0), textColor: theme.rootController.navigationBar.secondaryTextColor))
|
||||||
)),
|
)),
|
||||||
environment: {},
|
environment: {},
|
||||||
containerSize: CGSize(width: 200.0, height: 100.0)
|
containerSize: CGSize(width: 200.0, height: 100.0)
|
||||||
@ -660,6 +659,10 @@ final class ChatSearchTitleAccessoryPanelNode: ChatTitleAccessoryPanelNode, Chat
|
|||||||
gesture.cancel()
|
gesture.cancel()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
guard let item = self.items.first(where: { $0.reaction == reaction }) else {
|
||||||
|
gesture.cancel()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
if !params.interfaceState.isPremium {
|
if !params.interfaceState.isPremium {
|
||||||
(chatController as? ChatControllerImpl)?.presentTagPremiumPaywall()
|
(chatController as? ChatControllerImpl)?.presentTagPremiumPaywall()
|
||||||
@ -669,8 +672,7 @@ final class ChatSearchTitleAccessoryPanelNode: ChatTitleAccessoryPanelNode, Chat
|
|||||||
var items: [ContextMenuItem] = []
|
var items: [ContextMenuItem] = []
|
||||||
|
|
||||||
let presentationData = self.context.sharedContext.currentPresentationData.with({ $0 })
|
let presentationData = self.context.sharedContext.currentPresentationData.with({ $0 })
|
||||||
//TODO:localize
|
items.append(.action(ContextMenuActionItem(text: item.title != nil ? presentationData.strings.Chat_ReactionContextMenu_EditTagLabel : presentationData.strings.Chat_ReactionContextMenu_SetTagLabel, icon: { theme in
|
||||||
items.append(.action(ContextMenuActionItem(text: "Edit Title", icon: { theme in
|
|
||||||
return generateTintedImage(image: UIImage(bundleImageName: "Chat/Context Menu/TagEditName"), color: theme.contextMenu.primaryColor)
|
return generateTintedImage(image: UIImage(bundleImageName: "Chat/Context Menu/TagEditName"), color: theme.contextMenu.primaryColor)
|
||||||
}, action: { [weak self] c, a in
|
}, action: { [weak self] c, a in
|
||||||
guard let self else {
|
guard let self else {
|
||||||
@ -755,8 +757,9 @@ final class ChatSearchTitleAccessoryPanelNode: ChatTitleAccessoryPanelNode, Chat
|
|||||||
}
|
}
|
||||||
|
|
||||||
private func openEditTagTitle(reaction: MessageReaction.Reaction, hasTitle: Bool) {
|
private func openEditTagTitle(reaction: MessageReaction.Reaction, hasTitle: Bool) {
|
||||||
//TODO:localize
|
let presentationData = self.context.sharedContext.currentPresentationData.with { $0 }
|
||||||
let optionTitle = hasTitle ? "Edit Name" : "Add Name"
|
|
||||||
|
let optionTitle = hasTitle ? presentationData.strings.Chat_EditTagTitle_TitleEdit : presentationData.strings.Chat_EditTagTitle_TitleSet
|
||||||
|
|
||||||
let reactionFile: Signal<TelegramMediaFile?, NoError>
|
let reactionFile: Signal<TelegramMediaFile?, NoError>
|
||||||
switch reaction {
|
switch reaction {
|
||||||
@ -783,8 +786,7 @@ final class ChatSearchTitleAccessoryPanelNode: ChatTitleAccessoryPanelNode, Chat
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
//TODO:localize
|
let promptController = savedTagNameAlertController(context: self.context, updatedPresentationData: nil, text: optionTitle, subtext: presentatinData.strings.Chat_EditTagTitle_Text, value: savedMessageTags.tags.first(where: { $0.reaction == reaction })?.title ?? "", reaction: reaction, file: reactionFile, characterLimit: 10, apply: { [weak self] value in
|
||||||
let promptController = savedTagNameAlertController(context: self.context, updatedPresentationData: nil, text: optionTitle, subtext: "You can label your emoji tag with a text name.", value: savedMessageTags.tags.first(where: { $0.reaction == reaction })?.title ?? "", reaction: reaction, file: reactionFile, characterLimit: 10, apply: { [weak self] value in
|
|
||||||
guard let self else {
|
guard let self else {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user