From caa8a597e2f28f561f40bd298df44b929bf0d691 Mon Sep 17 00:00:00 2001 From: Ali <> Date: Thu, 2 Nov 2023 21:21:57 +0400 Subject: [PATCH] Add missing strings --- Telegram/Telegram-iOS/en.lproj/Localizable.strings | 2 ++ submodules/TelegramUI/Sources/ChatTextInputPanelNode.swift | 3 +-- submodules/TextInputMenu/Sources/TextInputMenu.swift | 5 +++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Telegram/Telegram-iOS/en.lproj/Localizable.strings b/Telegram/Telegram-iOS/en.lproj/Localizable.strings index 5c9c484fb4e..c0de01da106 100644 --- a/Telegram/Telegram-iOS/en.lproj/Localizable.strings +++ b/Telegram/Telegram-iOS/en.lproj/Localizable.strings @@ -10421,3 +10421,5 @@ Sorry for the inconvenience."; "ChannelBoost.Or" = "or"; "Channel.ChannelColor" = "Channel Color"; + +"TextFormat.Code" = "Code"; diff --git a/submodules/TelegramUI/Sources/ChatTextInputPanelNode.swift b/submodules/TelegramUI/Sources/ChatTextInputPanelNode.swift index 8008e9fe634..35eb70f6f41 100644 --- a/submodules/TelegramUI/Sources/ChatTextInputPanelNode.swift +++ b/submodules/TelegramUI/Sources/ChatTextInputPanelNode.swift @@ -3793,8 +3793,7 @@ class ChatTextInputPanelNode: ChatInputPanelNode, ASEditableTextNodeDelegate, Ch } ] as [UIAction]) - //TODO:localize - children.append(UIAction(title: "Code", image: nil) { [weak self] (action) in + children.append(UIAction(title: self.strings?.TextFormat_Code ?? "Code", image: nil) { [weak self] (action) in if let strongSelf = self { strongSelf.formatAttributesCodeBlock(strongSelf) } diff --git a/submodules/TextInputMenu/Sources/TextInputMenu.swift b/submodules/TextInputMenu/Sources/TextInputMenu.swift index 343316b9f84..4722e0acb80 100644 --- a/submodules/TextInputMenu/Sources/TextInputMenu.swift +++ b/submodules/TextInputMenu/Sources/TextInputMenu.swift @@ -17,6 +17,7 @@ public final class TextInputMenu { private var stringUnderline: String = "Underline" private var stringSpoiler: String = "Spoiler" private var stringQuote: String = "Quote" + private var stringCode: String = "Code" private let hasSpoilers: Bool private let hasQuotes: Bool @@ -43,8 +44,7 @@ public final class TextInputMenu { } if self.hasQuotes { menuItems.insert(UIMenuItem(title: self.stringQuote, action: Selector(("formatAttributesQuote:"))), at: 0) - //TODO:localize - menuItems.append(UIMenuItem(title: "Code", action: Selector(("formatAttributesCodeBlock:")))) + menuItems.append(UIMenuItem(title: self.stringCode, action: Selector(("formatAttributesCodeBlock:")))) } UIMenuController.shared.menuItems = menuItems } @@ -77,6 +77,7 @@ public final class TextInputMenu { self.stringUnderline = strings.TextFormat_Underline self.stringSpoiler = strings.TextFormat_Spoiler self.stringQuote = strings.TextFormat_Quote + self.stringCode = strings.TextFormat_Code } public func activate() {