Add missing strings

This commit is contained in:
Ali 2023-11-02 21:21:57 +04:00
parent 74a73fb41c
commit caa8a597e2
3 changed files with 6 additions and 4 deletions

View File

@ -10421,3 +10421,5 @@ Sorry for the inconvenience.";
"ChannelBoost.Or" = "or";
"Channel.ChannelColor" = "Channel Color";
"TextFormat.Code" = "Code";

View File

@ -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)
}

View File

@ -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() {