diff --git a/Telegram/Telegram-iOS/en.lproj/Localizable.strings b/Telegram/Telegram-iOS/en.lproj/Localizable.strings index 68fc11e9fb..3f5035a237 100644 --- a/Telegram/Telegram-iOS/en.lproj/Localizable.strings +++ b/Telegram/Telegram-iOS/en.lproj/Localizable.strings @@ -13051,3 +13051,5 @@ Sorry for the inconvenience."; "Report.Comment.Placeholder.Optional" = "Add Comment (Optional)"; "Report.Comment.Info" = "Please help us by telling what is wrong with the message you have selected."; "Report.Send" = "Send Report"; + +f diff --git a/submodules/TelegramCallsUI/Sources/VideoChatActionButtonComponent.swift b/submodules/TelegramCallsUI/Sources/VideoChatActionButtonComponent.swift index f89a6bda96..beef446dc2 100644 --- a/submodules/TelegramCallsUI/Sources/VideoChatActionButtonComponent.swift +++ b/submodules/TelegramCallsUI/Sources/VideoChatActionButtonComponent.swift @@ -164,7 +164,7 @@ final class VideoChatActionButtonComponent: Component { } iconDiameter = 60.0 case let .video(isActive): - titleText = "video" + titleText = component.strings.VoiceChat_Video switch component.microphoneState { case .connecting: backgroundColor = UIColor(white: 0.1, alpha: 1.0) @@ -177,7 +177,7 @@ final class VideoChatActionButtonComponent: Component { } iconDiameter = 60.0 case .leave: - titleText = "leave" + titleText = component.strings.VoiceChat_Leave backgroundColor = UIColor(rgb: 0x47191E) iconDiameter = 22.0 } diff --git a/submodules/TelegramCallsUI/Sources/VideoChatMicButtonComponent.swift b/submodules/TelegramCallsUI/Sources/VideoChatMicButtonComponent.swift index d7db6cc15f..1541bf5ff9 100644 --- a/submodules/TelegramCallsUI/Sources/VideoChatMicButtonComponent.swift +++ b/submodules/TelegramCallsUI/Sources/VideoChatMicButtonComponent.swift @@ -189,6 +189,7 @@ final class VideoChatMicButtonComponent: Component { } let call: PresentationGroupCall + let strings: PresentationStrings let content: Content let isCollapsed: Bool let updateUnmutedStateIsPushToTalk: (Bool?) -> Void @@ -197,6 +198,7 @@ final class VideoChatMicButtonComponent: Component { init( call: PresentationGroupCall, + strings: PresentationStrings, content: Content, isCollapsed: Bool, updateUnmutedStateIsPushToTalk: @escaping (Bool?) -> Void, @@ -204,6 +206,7 @@ final class VideoChatMicButtonComponent: Component { scheduleAction: @escaping () -> Void ) { self.call = call + self.strings = strings self.content = content self.isCollapsed = isCollapsed self.updateUnmutedStateIsPushToTalk = updateUnmutedStateIsPushToTalk @@ -327,29 +330,29 @@ final class VideoChatMicButtonComponent: Component { var isEnabled = true switch component.content { case .connecting: - titleText = "Connecting..." + titleText = component.strings.VoiceChat_Connecting isEnabled = false case .muted: - titleText = "Unmute" + titleText = component.strings.VoiceChat_Unmute case let .unmuted(isPushToTalk): - titleText = isPushToTalk ? "You are Live" : "Tap to Mute" + titleText = isPushToTalk ? component.strings.VoiceChat_Live : component.strings.VoiceChat_Mute case let .raiseHand(isRaised): if isRaised { - titleText = "You asked to speak" - subtitleText = "We let the speakers know" + titleText = component.strings.VoiceChat_AskedToSpeak + subtitleText = component.strings.VoiceChat_AskedToSpeakHelp } else { - titleText = "Muted by Admin" - subtitleText = "Tap if you want to speak" + titleText = component.strings.VoiceChat_MutedByAdmin + subtitleText = component.strings.VoiceChat_MutedByAdminHelp } case let .scheduled(state): switch state { case .start: - titleText = "Start Now" + titleText = component.strings.VoiceChat_StartNow case let .toggleSubscription(isSubscribed): if isSubscribed { - titleText = "Clear Reminder" + titleText = component.strings.VoiceChat_CancelReminder } else { - titleText = "Set Reminder" + titleText = component.strings.VoiceChat_SetReminder } } } diff --git a/submodules/TelegramCallsUI/Sources/VideoChatParticipantsComponent.swift b/submodules/TelegramCallsUI/Sources/VideoChatParticipantsComponent.swift index 7b98a0b136..5d8605d1ef 100644 --- a/submodules/TelegramCallsUI/Sources/VideoChatParticipantsComponent.swift +++ b/submodules/TelegramCallsUI/Sources/VideoChatParticipantsComponent.swift @@ -1193,17 +1193,17 @@ final class VideoChatParticipantsComponent: Component { let subtitle: PeerListItemComponent.Subtitle if participant.peer.id == component.call.accountContext.account.peerId { - subtitle = PeerListItemComponent.Subtitle(text: "this is you", color: .accent) + subtitle = PeerListItemComponent.Subtitle(text: component.strings.VoiceChat_You, color: .accent) } else if component.speakingParticipants.contains(participant.peer.id) { if let volume = participant.volume, volume / 100 != 100 { - subtitle = PeerListItemComponent.Subtitle(text: "\(volume / 100)% speaking", color: .constructive) + subtitle = PeerListItemComponent.Subtitle(text: component.strings.VoiceChat_StatusSpeakingVolume("\(volume / 100)%").string, color: .constructive) } else { - subtitle = PeerListItemComponent.Subtitle(text: "speaking", color: .constructive) + subtitle = PeerListItemComponent.Subtitle(text: component.strings.VoiceChat_StatusSpeaking, color: .constructive) } } else if let about = participant.about, !about.isEmpty { subtitle = PeerListItemComponent.Subtitle(text: about, color: .neutral) } else { - subtitle = PeerListItemComponent.Subtitle(text: "listening", color: .neutral) + subtitle = PeerListItemComponent.Subtitle(text: component.strings.VoiceChat_StatusListening, color: .neutral) } let rightAccessoryComponent: AnyComponent = AnyComponent(VideoChatParticipantStatusComponent( @@ -1667,12 +1667,12 @@ final class VideoChatParticipantsComponent: Component { if let participants = component.participants, let inviteType = participants.inviteType { switch inviteType { case .invite: - inviteText = "Invite Members" + inviteText = component.strings.VoiceChat_InviteMember case .shareLink: - inviteText = "Share Invite Link" + inviteText = component.strings.VoiceChat_Share } } else { - inviteText = "Invite Members" + inviteText = component.strings.VoiceChat_InviteMember } let inviteListItemSize = self.inviteListItemView.update( transition: transition, diff --git a/submodules/TelegramCallsUI/Sources/VideoChatScheduledInfoComponent.swift b/submodules/TelegramCallsUI/Sources/VideoChatScheduledInfoComponent.swift index 3c97c76306..c9ae7d1dea 100644 --- a/submodules/TelegramCallsUI/Sources/VideoChatScheduledInfoComponent.swift +++ b/submodules/TelegramCallsUI/Sources/VideoChatScheduledInfoComponent.swift @@ -123,7 +123,7 @@ final class VideoChatScheduledInfoComponent: Component { let titleSize = self.title.update( transition: .immediate, component: AnyComponent(MultilineTextComponent( - text: .plain(NSAttributedString(string: "Starts in", font: Font.with(size: 23.0, design: .round, weight: .semibold), textColor: .white)) + text: .plain(NSAttributedString(string: component.strings.VoiceChat_StartsIn, font: Font.with(size: 23.0, design: .round, weight: .semibold), textColor: .white)) )), environment: {}, containerSize: CGSize(width: availableSize.width - 16.0 * 2.0, height: 200.0) diff --git a/submodules/TelegramCallsUI/Sources/VideoChatScreen.swift b/submodules/TelegramCallsUI/Sources/VideoChatScreen.swift index a6a0564e8c..f49f82e495 100644 --- a/submodules/TelegramCallsUI/Sources/VideoChatScreen.swift +++ b/submodules/TelegramCallsUI/Sources/VideoChatScreen.swift @@ -1270,9 +1270,9 @@ final class VideoChatScreenComponent: Component { if callState.networkState == .connected, let members = self.members { idleTitleStatusText = environment.strings.VoiceChat_Panel_Members(Int32(max(1, members.totalCount))) } else if callState.scheduleTimestamp != nil { - idleTitleStatusText = "scheduled" + idleTitleStatusText = environment.strings.VoiceChat_Scheduled } else { - idleTitleStatusText = "connecting..." + idleTitleStatusText = environment.strings.VoiceChat_Connecting } } else { idleTitleStatusText = " " @@ -1686,6 +1686,7 @@ final class VideoChatScreenComponent: Component { transition: transition, component: AnyComponent(VideoChatMicButtonComponent( call: component.call, + strings: environment.strings, content: micButtonContent, isCollapsed: areButtonsCollapsed, updateUnmutedStateIsPushToTalk: { [weak self] unmutedStateIsPushToTalk in