Fix localization

This commit is contained in:
Ali 2023-09-19 19:25:57 +02:00
parent 75d9f03212
commit f5241f12e7
2 changed files with 14 additions and 2 deletions

View File

@ -10048,6 +10048,8 @@ Sorry for the inconvenience.";
"Story.SendReactionAsMessage" = "Send reaction as a private message";
"StoryList.TooltipStoriesSavedToChannel_1" = "Story saved to channel's profile";
"StoryList.TooltipStoriesSavedToChannel_any" = "%d stories saved to channel's profile.";
"Story.ToastRemovedFromChannelText" = "Story removed from the channel's profile";
"Story.ToastSavedToChannelTitle" = "Story saved to the channel's profile";
"Story.ToastSavedToChannelText" = "Saved stories can be viewed by others on the channel's profile until an admin removes them.";

View File

@ -371,10 +371,20 @@ final class PeerInfoStoryGridScreenComponent: Component {
let presentationData = component.context.sharedContext.currentPresentationData.with({ $0 }).withUpdated(theme: environment.theme)
let title: String = presentationData.strings.StoryList_TooltipStoriesSavedToProfile(Int32(paneNode.selectedIds.count))
let title: String
let text: String
if component.peerId == component.context.account.peerId {
title = presentationData.strings.StoryList_TooltipStoriesSavedToProfile(Int32(paneNode.selectedIds.count))
text = presentationData.strings.StoryList_TooltipStoriesSavedToProfileText
} else {
title = presentationData.strings.StoryList_TooltipStoriesSavedToChannel(Int32(paneNode.selectedIds.count))
text = presentationData.strings.Story_ToastSavedToChannelText
}
environment.controller()?.present(UndoOverlayController(
presentationData: presentationData,
content: .info(title: title, text: presentationData.strings.StoryList_TooltipStoriesSavedToProfileText, timeout: nil),
content: .info(title: title, text: text, timeout: nil),
elevatedLayout: false,
animateInAsReplacement: false,
action: { _ in return false }