Skip to content

Commit

Permalink
Add missing strings
Browse files Browse the repository at this point in the history
  • Loading branch information
Ali committed Nov 2, 2023
1 parent 74a73fb commit caa8a59
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 2 additions & 0 deletions Telegram/Telegram-iOS/en.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -10421,3 +10421,5 @@ Sorry for the inconvenience.";
"ChannelBoost.Or" = "or";

"Channel.ChannelColor" = "Channel Color";

"TextFormat.Code" = "Code";
3 changes: 1 addition & 2 deletions submodules/TelegramUI/Sources/ChatTextInputPanelNode.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down
5 changes: 3 additions & 2 deletions submodules/TextInputMenu/Sources/TextInputMenu.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
}
Expand Down Expand Up @@ -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() {
Expand Down

0 comments on commit caa8a59

Please sign in to comment.