Update localization

This commit is contained in:
Ali
2023-10-25 00:29:39 +04:00
parent e8a426c199
commit be6ddfc28f
10 changed files with 105 additions and 95 deletions

View File

@@ -4950,18 +4950,17 @@ public final class ChatControllerImpl: TelegramBaseController, ChatController, G
guard let self else {
return
}
//TODO:localize
let text: String
if let peer = peer as? TelegramChannel {
if case .broadcast = peer.info {
text = "This quote is from a private channel"
text = self.presentationData.strings.Chat_ToastQuoteChatUnavailbalePrivateChannel
} else {
text = "This quote is from a private group"
text = self.presentationData.strings.Chat_ToastQuoteChatUnavailbalePrivateGroup
}
} else if peer is TelegramGroup {
text = "This quote is from a private group"
text = self.presentationData.strings.Chat_ToastQuoteChatUnavailbalePrivateGroup
} else {
text = "This quote is from a private chat"
text = self.presentationData.strings.Chat_ToastQuoteChatUnavailbalePrivateChat
}
self.controllerInteraction?.displayUndo(.info(title: nil, text: text, timeout: nil, customUndoText: nil))
}, automaticMediaDownloadSettings: self.automaticMediaDownloadSettings, pollActionState: ChatInterfacePollActionState(), stickerSettings: self.stickerSettings, presentationContext: ChatPresentationContext(context: context, backgroundNode: self.chatBackgroundNode))
@@ -5294,15 +5293,13 @@ public final class ChatControllerImpl: TelegramBaseController, ChatController, G
if !selectionState.canQuote {
return nil
}
//TODO:localize
return "You can select a specific part to quote"
return presentationData.strings.Chat_SubtitleQuoteSelectionTip
}
case let .link(link):
subtitleTextSignal = link.options
|> map { options -> String? in
if options.hasAlternativeLinks {
//TODO:localize
return "Tap on a link to generate its preview"
return presentationData.strings.Chat_SubtitleLinkListTip
} else {
return nil
}
@@ -5354,12 +5351,11 @@ public final class ChatControllerImpl: TelegramBaseController, ChatController, G
if let peer = peerViewMainPeer(peerView) {
if case let .messageOptions(_, _, info) = presentationInterfaceState.subject {
if case .reply = info {
//TODO:localize
let titleContent: ChatTitleContent
if case let .reply(hasQuote) = messageOptionsTitleInfo, hasQuote {
titleContent = .custom("Reply to Quote", subtitleText, false)
titleContent = .custom(presentationInterfaceState.strings.Chat_TitleQuoteSelection, subtitleText, false)
} else {
titleContent = .custom("Reply to Message", subtitleText, false)
titleContent = .custom(presentationInterfaceState.strings.Chat_TitleReply, subtitleText, false)
}
if strongSelf.chatTitleView?.titleContent != titleContent {
if strongSelf.chatTitleView?.titleContent != nil {
@@ -5368,8 +5364,7 @@ public final class ChatControllerImpl: TelegramBaseController, ChatController, G
strongSelf.chatTitleView?.titleContent = titleContent
}
} else if case .link = info {
//TODO:localize
strongSelf.chatTitleView?.titleContent = .custom("Link Preview Settings", subtitleText, false)
strongSelf.chatTitleView?.titleContent = .custom(presentationInterfaceState.strings.Chat_TitleLinkOptions, subtitleText, false)
} else if displayedCount == 1 {
strongSelf.chatTitleView?.titleContent = .custom(presentationInterfaceState.strings.Conversation_ForwardOptions_ForwardTitleSingle, subtitleText, false)
} else {
@@ -8033,8 +8028,7 @@ public final class ChatControllerImpl: TelegramBaseController, ChatController, G
if message.text.contains(quote) {
hasQuote = true
} else {
//TODO:localize
strongSelf.present(UndoOverlayController(presentationData: strongSelf.presentationData, content: .info(title: nil, text: "Quote not found", timeout: nil, customUndoText: nil), elevatedLayout: false, action: { _ in return true }), in: .current)
strongSelf.present(UndoOverlayController(presentationData: strongSelf.presentationData, content: .info(title: nil, text: strongSelf.presentationData.strings.Chat_ToastQuoteNotFound, timeout: nil, customUndoText: nil), elevatedLayout: false, action: { _ in return true }), in: .current)
}
}