From 30e7056c2178f02612d2e9de4beb54446bab4644 Mon Sep 17 00:00:00 2001 From: Isaac <> Date: Tue, 30 Jan 2024 19:18:04 +0100 Subject: [PATCH] Update localization --- .../Telegram-iOS/en.lproj/Localizable.strings | 39 +++++++++++++++++++ .../ChatMessageSelectionInputPanelNode.swift | 9 ++--- .../Sources/ChatShareMessageTagView.swift | 3 +- .../Sources/SavedTagNameAlertController.swift | 3 +- .../Sources/PeerInfoScreen.swift | 5 +-- .../StoryItemSetContainerComponent.swift | 13 +++---- .../StoryQualityUpgradeSheetScreen.swift | 11 ++---- ...ChatControllerOpenMessageContextMenu.swift | 19 ++------- ...rollerOpenMessageReactionContextMenu.swift | 7 +--- .../ChatInterfaceStateContextMenus.swift | 3 +- .../ChatSearchTitleAccessoryPanelNode.swift | 20 +++++----- 11 files changed, 72 insertions(+), 60 deletions(-) diff --git a/Telegram/Telegram-iOS/en.lproj/Localizable.strings b/Telegram/Telegram-iOS/en.lproj/Localizable.strings index b2d0efc509..0dd370e466 100644 --- a/Telegram/Telegram-iOS/en.lproj/Localizable.strings +++ b/Telegram/Telegram-iOS/en.lproj/Localizable.strings @@ -10994,3 +10994,42 @@ Sorry for the inconvenience."; "Premium.MessageTags.Proceed" = "About Telegram Premium"; "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"; diff --git a/submodules/TelegramUI/Components/Chat/ChatMessageSelectionInputPanelNode/Sources/ChatMessageSelectionInputPanelNode.swift b/submodules/TelegramUI/Components/Chat/ChatMessageSelectionInputPanelNode/Sources/ChatMessageSelectionInputPanelNode.swift index 01e8beb4bc..47f2af83b9 100644 --- a/submodules/TelegramUI/Components/Chat/ChatMessageSelectionInputPanelNode/Sources/ChatMessageSelectionInputPanelNode.swift +++ b/submodules/TelegramUI/Components/Chat/ChatMessageSelectionInputPanelNode/Sources/ChatMessageSelectionInputPanelNode.swift @@ -113,13 +113,11 @@ public final class ChatMessageSelectionInputPanelNode: ChatInputPanelNode { self.tagButton = HighlightableButtonNode(pointerStyle: .rectangle(CGSize(width: 56.0, height: 40.0))) self.tagButton.isAccessibilityElement = true - //TODO:localize - self.tagButton.accessibilityLabel = "Tag" + self.tagButton.accessibilityLabel = strings.VoiceOver_MessageSelectionButtonTag self.tagEditButton = HighlightableButtonNode(pointerStyle: .rectangle(CGSize(width: 56.0, height: 40.0))) self.tagEditButton.isAccessibilityElement = true - //TODO:localize - self.tagEditButton.accessibilityLabel = "Edit Tag" + self.tagEditButton.accessibilityLabel = strings.VoiceOver_MessageSelectionButtonTag 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]) @@ -255,14 +253,13 @@ public final class ChatMessageSelectionInputPanelNode: ChatInputPanelNode { let presentationData = context.sharedContext.currentPresentationData.with { $0 } - //TODO:localize let reactionContextNode = ReactionContextNode( context: context, animationCache: context.animationCache, presentationData: presentationData, items: reactionItems.map(ReactionContextItem.reaction), 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, alwaysAllowPremiumReactions: false, allPresetReactionsAreAvailable: true, diff --git a/submodules/TelegramUI/Components/Chat/ChatShareMessageTagView/Sources/ChatShareMessageTagView.swift b/submodules/TelegramUI/Components/Chat/ChatShareMessageTagView/Sources/ChatShareMessageTagView.swift index 0f4f368316..18e56b8cb2 100644 --- a/submodules/TelegramUI/Components/Chat/ChatShareMessageTagView/Sources/ChatShareMessageTagView.swift +++ b/submodules/TelegramUI/Components/Chat/ChatShareMessageTagView/Sources/ChatShareMessageTagView.swift @@ -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) { super.init(frame: CGRect()) - //TODO:localize let reactionContextNode = ReactionContextNode( context: context, animationCache: context.animationCache, presentationData: presentationData, items: reactionItems.map(ReactionContextItem.reaction), 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, alwaysAllowPremiumReactions: false, allPresetReactionsAreAvailable: true, diff --git a/submodules/TelegramUI/Components/Chat/SavedTagNameAlertController/Sources/SavedTagNameAlertController.swift b/submodules/TelegramUI/Components/Chat/SavedTagNameAlertController/Sources/SavedTagNameAlertController.swift index 7177612a05..23f7b9bf18 100644 --- a/submodules/TelegramUI/Components/Chat/SavedTagNameAlertController/Sources/SavedTagNameAlertController.swift +++ b/submodules/TelegramUI/Components/Chat/SavedTagNameAlertController/Sources/SavedTagNameAlertController.swift @@ -242,8 +242,7 @@ private final class SavedTagNameAlertContentNode: AlertContentNode { self.file = file self.titleFont = titleFont - //TODO:localize - self.inputFieldNode = PromptInputFieldNode(theme: ptheme, placeholder: "Name", characterLimit: characterLimit) + self.inputFieldNode = PromptInputFieldNode(theme: ptheme, placeholder: strings.Chat_EditTagTitle_Placeholder, characterLimit: characterLimit) self.inputFieldNode.text = value ?? "" self.actionNodesSeparator = ASDisplayNode() diff --git a/submodules/TelegramUI/Components/PeerInfo/PeerInfoScreen/Sources/PeerInfoScreen.swift b/submodules/TelegramUI/Components/PeerInfo/PeerInfoScreen/Sources/PeerInfoScreen.swift index e0edabee79..d3e0a6624b 100644 --- a/submodules/TelegramUI/Components/PeerInfo/PeerInfoScreen/Sources/PeerInfoScreen.swift +++ b/submodules/TelegramUI/Components/PeerInfo/PeerInfoScreen/Sources/PeerInfoScreen.swift @@ -11303,8 +11303,7 @@ public final class PeerInfoScreenImpl: ViewController, PeerInfoScreen, KeyShortc var items: [ContextMenuItem] = [] - //TODO:localize - items.append(.action(ContextMenuActionItem(text: "View as Chats", icon: { theme in + items.append(.action(ContextMenuActionItem(text: strings.Chat.SavedMessagesModeMenu_ViewAsChats, icon: { theme in if !isViewingAsTopics { 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 { return generateTintedImage(image: UIImage(bundleImageName: "Chat/Context Menu/Check"), color: .clear) } diff --git a/submodules/TelegramUI/Components/Stories/StoryContainerScreen/Sources/StoryItemSetContainerComponent.swift b/submodules/TelegramUI/Components/Stories/StoryContainerScreen/Sources/StoryItemSetContainerComponent.swift index c509dd2235..1832753fc5 100644 --- a/submodules/TelegramUI/Components/Stories/StoryContainerScreen/Sources/StoryItemSetContainerComponent.swift +++ b/submodules/TelegramUI/Components/Stories/StoryContainerScreen/Sources/StoryItemSetContainerComponent.swift @@ -6758,9 +6758,8 @@ public final class StoryItemSetContainerComponent: Component { } if case let .file(file) = component.slice.item.storyItem.media, file.isVideo { - //TODO:localize 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 { return generateTintedImage(image: UIImage(bundleImageName: "Chat/Context Menu/QualitySd"), color: theme.contextMenu.primaryColor) } else { @@ -6774,22 +6773,20 @@ public final class StoryItemSetContainerComponent: Component { } if !component.slice.additionalPeerData.preferHighQualityStories && !accountUser.isPremium { - //TODO:localize self.presentQualityUpgradeScreen() return } let presentationData = component.context.sharedContext.currentPresentationData.with({ $0 }).withUpdated(theme: component.theme) - //TODO:localize let title: String let text: String if component.slice.additionalPeerData.preferHighQualityStories { - title = "Quality Lowered" - text = "Stories will now download faster." + title = component.strings.Story_ToastQualitySD_Title + text = component.strings.Story_ToastQualitySD_Text } else { - title = "Quality Increased" - text = "You can lower the quality later for faster downloads." + title = component.strings.Story_ToastQualityHD_Title + text = component.strings.Story_ToastQualityHD_Text } controller.present(UndoOverlayController( presentationData: presentationData, diff --git a/submodules/TelegramUI/Components/Stories/StoryQualityUpgradeSheetScreen/Sources/StoryQualityUpgradeSheetScreen.swift b/submodules/TelegramUI/Components/Stories/StoryQualityUpgradeSheetScreen/Sources/StoryQualityUpgradeSheetScreen.swift index 6c61b3ac2e..3db72ef093 100644 --- a/submodules/TelegramUI/Components/Stories/StoryQualityUpgradeSheetScreen/Sources/StoryQualityUpgradeSheetScreen.swift +++ b/submodules/TelegramUI/Components/Stories/StoryQualityUpgradeSheetScreen/Sources/StoryQualityUpgradeSheetScreen.swift @@ -166,11 +166,10 @@ private final class StoryQualityUpgradeSheetContentComponent: Component { contentHeight += 138.0 - //TODO:localize let titleSize = self.title.update( transition: transition, 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, maximumNumberOfLines: 0 )), @@ -186,11 +185,10 @@ private final class StoryQualityUpgradeSheetContentComponent: Component { contentHeight += titleSize.height contentHeight += 14.0 - //TODO:localize let textSize = self.text.update( transition: transition, 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, maximumNumberOfLines: 0, lineSpacing: 0.18 @@ -209,14 +207,13 @@ private final class StoryQualityUpgradeSheetContentComponent: Component { contentHeight += 32.0 - //TODO:localize var buttonContents: [AnyComponentWithIdentity] = [] 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( - title: "Premium Required", + title: environment.strings.Story_UpgradeQuality_ActionSubtitle, color: environment.theme.list.itemCheckColors.foregroundColor.withMultipliedAlpha(0.7) )))) diff --git a/submodules/TelegramUI/Sources/Chat/ChatControllerOpenMessageContextMenu.swift b/submodules/TelegramUI/Sources/Chat/ChatControllerOpenMessageContextMenu.swift index 5914df543a..91dfc36a22 100644 --- a/submodules/TelegramUI/Sources/Chat/ChatControllerOpenMessageContextMenu.swift +++ b/submodules/TelegramUI/Sources/Chat/ChatControllerOpenMessageContextMenu.swift @@ -117,8 +117,7 @@ extension ChatControllerImpl { if self.presentationInterfaceState.isPremium { actions.reactionsTitle = presentationData.strings.Chat_ContextMenuTagsTitle } else { - //TODO:localize - actions.reactionsTitle = "Organize your Saved Messages with tags for quicker access. [Learn more...]()" + actions.reactionsTitle = presentationData.strings.Chat_MessageContextMenu_NonPremiumTagsTitle actions.reactionsLocked = true actions.selectedReactionItems = Set() } @@ -308,24 +307,13 @@ extension ChatControllerImpl { } self.currentContextController = controller - //TODO:localize controller.premiumReactionsSelected = { [weak self, weak controller] in guard let self else { return } controller?.dismissWithoutContent() - - 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) + self.presentTagPremiumPaywall() } controller.reactionSelected = { [weak self, weak controller] chosenUpdatedReaction, isLarge in @@ -413,9 +401,8 @@ extension ChatControllerImpl { let _ = itemNode - //TODO:localize 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) }) self.present(tooltipScreen, in: .current) diff --git a/submodules/TelegramUI/Sources/ChatControllerOpenMessageReactionContextMenu.swift b/submodules/TelegramUI/Sources/ChatControllerOpenMessageReactionContextMenu.swift index 390195a52c..a45e1a7f31 100644 --- a/submodules/TelegramUI/Sources/ChatControllerOpenMessageReactionContextMenu.swift +++ b/submodules/TelegramUI/Sources/ChatControllerOpenMessageReactionContextMenu.swift @@ -18,7 +18,6 @@ import PremiumUI extension ChatControllerImpl { func presentTagPremiumPaywall() { - //TODO:localize let context = self.context var replaceImpl: ((ViewController) -> Void)? 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 return generateTintedImage(image: UIImage(bundleImageName: "Chat/Context Menu/TagEditName"), color: theme.contextMenu.primaryColor) }, action: { [weak self] c, a in @@ -101,8 +99,7 @@ extension ChatControllerImpl { let reaction = value - //TODO:localize - 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 + 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 guard let self else { return } diff --git a/submodules/TelegramUI/Sources/ChatInterfaceStateContextMenus.swift b/submodules/TelegramUI/Sources/ChatInterfaceStateContextMenus.swift index 4b63216982..b9af97583d 100644 --- a/submodules/TelegramUI/Sources/ChatInterfaceStateContextMenus.swift +++ b/submodules/TelegramUI/Sources/ChatInterfaceStateContextMenus.swift @@ -1667,8 +1667,7 @@ func contextMenuForChatPresentationInterfaceState(chatPresentationInterfaceState title = chatPresentationInterfaceState.strings.Conversation_ContextMenuCancelSending } else { if case .peer(context.account.peerId) = chatPresentationInterfaceState.chatLocation, message.effectivelyIncoming(context.account.peerId) { - //TODO:localize - title = "Remove" + title = chatPresentationInterfaceState.strings.Chat_MessageContextMenu_Remove } else { title = chatPresentationInterfaceState.strings.Conversation_ContextMenuDelete } diff --git a/submodules/TelegramUI/Sources/ChatSearchTitleAccessoryPanelNode.swift b/submodules/TelegramUI/Sources/ChatSearchTitleAccessoryPanelNode.swift index 9810c9dced..92fee5cb18 100644 --- a/submodules/TelegramUI/Sources/ChatSearchTitleAccessoryPanelNode.swift +++ b/submodules/TelegramUI/Sources/ChatSearchTitleAccessoryPanelNode.swift @@ -133,11 +133,10 @@ final class ChatSearchTitleAccessoryPanelNode: ChatTitleAccessoryPanelNode, Chat containerSize: CGSize(width: 14.0, height: 14.0) ) - //TODO:localize let titleSize = self.title.update( transition: .immediate, 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: {}, containerSize: CGSize(width: 200.0, height: 100.0) @@ -175,7 +174,7 @@ final class ChatSearchTitleAccessoryPanelNode: ChatTitleAccessoryPanelNode, Chat let textSize = self.text.update( transition: .immediate, 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: {}, containerSize: CGSize(width: 200.0, height: 100.0) @@ -660,6 +659,10 @@ final class ChatSearchTitleAccessoryPanelNode: ChatTitleAccessoryPanelNode, Chat gesture.cancel() return } + guard let item = self.items.first(where: { $0.reaction == reaction }) else { + gesture.cancel() + return + } if !params.interfaceState.isPremium { (chatController as? ChatControllerImpl)?.presentTagPremiumPaywall() @@ -669,8 +672,7 @@ final class ChatSearchTitleAccessoryPanelNode: ChatTitleAccessoryPanelNode, Chat var items: [ContextMenuItem] = [] let presentationData = self.context.sharedContext.currentPresentationData.with({ $0 }) - //TODO:localize - items.append(.action(ContextMenuActionItem(text: "Edit Title", icon: { theme in + items.append(.action(ContextMenuActionItem(text: item.title != nil ? presentationData.strings.Chat_ReactionContextMenu_EditTagLabel : presentationData.strings.Chat_ReactionContextMenu_SetTagLabel, icon: { theme in return generateTintedImage(image: UIImage(bundleImageName: "Chat/Context Menu/TagEditName"), color: theme.contextMenu.primaryColor) }, action: { [weak self] c, a in guard let self else { @@ -755,8 +757,9 @@ final class ChatSearchTitleAccessoryPanelNode: ChatTitleAccessoryPanelNode, Chat } private func openEditTagTitle(reaction: MessageReaction.Reaction, hasTitle: Bool) { - //TODO:localize - let optionTitle = hasTitle ? "Edit Name" : "Add Name" + let presentationData = self.context.sharedContext.currentPresentationData.with { $0 } + + let optionTitle = hasTitle ? presentationData.strings.Chat_EditTagTitle_TitleEdit : presentationData.strings.Chat_EditTagTitle_TitleSet let reactionFile: Signal switch reaction { @@ -783,8 +786,7 @@ final class ChatSearchTitleAccessoryPanelNode: ChatTitleAccessoryPanelNode, Chat return } - //TODO:localize - 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 + 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 guard let self else { return }