diff --git a/Telegram/Telegram-iOS/en.lproj/Localizable.strings b/Telegram/Telegram-iOS/en.lproj/Localizable.strings index 39753ba6a8..d27d2f8102 100644 --- a/Telegram/Telegram-iOS/en.lproj/Localizable.strings +++ b/Telegram/Telegram-iOS/en.lproj/Localizable.strings @@ -7237,6 +7237,13 @@ Sorry for the inconvenience."; "PeerInfo.AllowedReactions.AllowAllGroupInfo" = "Allow subscribers to react to group messages."; "PeerInfo.AllowedReactions.AllowAllChannelInfo" = "Allow subscribers to react to channel posts."; "PeerInfo.AllowedReactions.ReactionListHeader" = "AVAILABLE REACTIONS"; +"PeerInfo.AllowedReactions.OptionAllReactions" = "All Reactions"; +"PeerInfo.AllowedReactions.OptionSomeReactions" = "Some Reactions"; +"PeerInfo.AllowedReactions.OptionNoReactions" = "No Reactions"; + +"PeerInfo.AllowedReactions.GroupOptionAllInfo" = "Members of this group can use any emoji as reactions to messages."; +"PeerInfo.AllowedReactions.GroupOptionSomeInfo" = "Members of the group can use only some allowed emoji as reactions to messages."; +"PeerInfo.AllowedReactions.GroupOptionNoInfo" = "Members of the group can't add any reactions to messages."; "PeerInfo.Reactions" = "Reactions"; "PeerInfo.ReactionsDisabled" = "Disabled"; @@ -7249,6 +7256,9 @@ Sorry for the inconvenience."; "Settings.QuickReactionSetup.DemoMessageAuthor" = "Dino"; "Settings.QuickReactionSetup.DemoMessageText" = "I hope you're enjoying your day as much as I am."; +"Settings.QuickReactionSetup.ChooseQuickReaction" = "Choose Your Quick Reaction"; +"Settings.QuickReactionSetup.ChooseQuickReactionInfo" = "You can set any emoji as your quick reaction."; + "Chat.ContextReactionCount_1" = "1 reaction"; "Chat.ContextReactionCount_any" = "%@ reactions"; "Chat.OutgoingContextReactionCount_1" = "1 reacted"; @@ -8040,3 +8050,21 @@ Sorry for the inconvenience."; "Login.CancelEmailVerification" = "Do you want to stop the email verification process?"; "Login.CancelEmailVerificationStop" = "Stop"; "Login.CancelEmailVerificationContinue" = "Continue"; + +"PeerStatusSetup.NoTimerTitle" = "Long tap to set a timer"; +"Chat.PremiumReactionToastTitle" = "Subscribe to **Telegram Premium** to unlock this reaction."; +"Chat.PremiumReactionToastAction" = "More"; + +"Chat.ClearReactionsAlertText" = "Do you want to clear your recent reaction emoji from suggestions?"; +"Chat.ClearReactionsAlertAction" = "Clear Recent Emoji"; + +"EmojiStatusSetup.SetUntil" = "Set Until"; +"EmojiStatusSetup.TimerOther" = "Other"; + +"Chat.ReactionSection.Popular" = "Popular"; +"Chat.ReactionSection.Recent" = "Recently Used"; + +"PeerInfo.SetEmojiStatus" = "Set Emoji Status"; +"PeerInfo.ChangeEmojiStatus" = "Change Emoji Status"; + +"PeerInfo.LabelAllReactions" = "All Reactions"; diff --git a/submodules/ChatListUI/Sources/ChatListController.swift b/submodules/ChatListUI/Sources/ChatListController.swift index 81947572ac..04d03267f8 100644 --- a/submodules/ChatListUI/Sources/ChatListController.swift +++ b/submodules/ChatListUI/Sources/ChatListController.swift @@ -852,8 +852,7 @@ public class ChatListControllerImpl: TelegramBaseController, ChatListController private func openStatusSetup(sourceView: UIView) { self.emojiStatusSelectionController?.dismiss() var selectedItems = Set() - //TODO:localize - var topStatusTitle = "Long tap to set a timer" + var topStatusTitle = self.presentationData.strings.PeerStatusSetup_NoTimerTitle if let peerStatus = self.titleView.title.peerStatus, case let .emoji(emojiStatus) = peerStatus { selectedItems.insert(MediaId(namespace: Namespaces.Media.CloudFile, id: emojiStatus.fileId)) diff --git a/submodules/ContextUI/Sources/ContextControllerExtractedPresentationNode.swift b/submodules/ContextUI/Sources/ContextControllerExtractedPresentationNode.swift index 7b3a024752..f2d253615d 100644 --- a/submodules/ContextUI/Sources/ContextControllerExtractedPresentationNode.swift +++ b/submodules/ContextUI/Sources/ContextControllerExtractedPresentationNode.swift @@ -568,9 +568,8 @@ final class ContextControllerExtractedPresentationNode: ASDisplayNode, ContextCo animateInAsReplacement = true } - //TODO:localize let presentationData = context.sharedContext.currentPresentationData.with { $0 } - let undoController = UndoOverlayController(presentationData: presentationData, content: .sticker(context: context, file: file, title: nil, text: "Subscribe to **Telegram Premium** to unlock this reaction.", undoText: "More", customAction: { [weak controller] in + let undoController = UndoOverlayController(presentationData: presentationData, content: .sticker(context: context, file: file, title: nil, text: presentationData.strings.Chat_PremiumReactionToastTitle, undoText: presentationData.strings.Chat_PremiumReactionToastAction, customAction: { [weak controller] in controller?.premiumReactionsSelected?() }), elevatedLayout: false, position: position, animateInAsReplacement: animateInAsReplacement, action: { _ in true }) strongSelf.currentUndoController = undoController diff --git a/submodules/PeerInfoUI/Sources/PeerAllowedReactionListController.swift b/submodules/PeerInfoUI/Sources/PeerAllowedReactionListController.swift index 8f95ad4bf8..3eadb5ab9b 100644 --- a/submodules/PeerInfoUI/Sources/PeerAllowedReactionListController.swift +++ b/submodules/PeerInfoUI/Sources/PeerAllowedReactionListController.swift @@ -278,8 +278,7 @@ private func peerAllowedReactionListControllerEntries( if let peer = peer, let availableReactions = availableReactions, let allowedReactions = state.updatedAllowedReactions, let mode = state.updatedMode { if let channel = peer as? TelegramChannel, case .broadcast = channel.info { - //TODO:localize - entries.append(.allowSwitch(text: "Allow Reactions", value: mode != .empty)) + entries.append(.allowSwitch(text: presentationData.strings.PeerInfo_AllowedReactions_AllowAllText, value: mode != .empty)) entries.append(.itemsHeader(presentationData.strings.PeerInfo_AllowedReactions_ReactionListHeader)) var index = 0 @@ -291,32 +290,30 @@ private func peerAllowedReactionListControllerEntries( index += 1 } } else { - //TODO:localize - entries.append(.allowAllHeader("AVAILABLE REACTIONS")) + entries.append(.allowAllHeader(presentationData.strings.PeerInfo_AllowedReactions_ReactionListHeader)) - //TODO:localize - entries.append(.allowAll(text: "All Reactions", isEnabled: mode == .all)) - entries.append(.allowSome(text: "Some Reactions", isEnabled: mode == .some)) - entries.append(.allowNone(text: "No Reactions", isEnabled: mode == .empty)) + entries.append(.allowAll(text: presentationData.strings.PeerInfo_AllowedReactions_OptionAllReactions, isEnabled: mode == .all)) + entries.append(.allowSome(text: presentationData.strings.PeerInfo_AllowedReactions_OptionSomeReactions, isEnabled: mode == .some)) + entries.append(.allowNone(text: presentationData.strings.PeerInfo_AllowedReactions_OptionNoReactions, isEnabled: mode == .empty)) let allInfoText: String if let peer = peer as? TelegramChannel, case .broadcast = peer.info { switch mode { case .all: - allInfoText = "Subscribers of this channel can use any emoji as reactions to messages." + allInfoText = presentationData.strings.PeerInfo_AllowedReactions_GroupOptionAllInfo case .some: - allInfoText = "You can select emoji that will allow subscribers of your channel to react to messages." + allInfoText = presentationData.strings.PeerInfo_AllowedReactions_GroupOptionSomeInfo case .empty: - allInfoText = "Subscribers of the channel can't add any reactions to messages." + allInfoText = presentationData.strings.PeerInfo_AllowedReactions_GroupOptionNoInfo } } else { switch mode { case .all: - allInfoText = "Members of this group can use any emoji as reactions to messages." + allInfoText = presentationData.strings.PeerInfo_AllowedReactions_GroupOptionAllInfo case .some: - allInfoText = "Members of the group can use only some allowed emoji as reactions to messages." + allInfoText = presentationData.strings.PeerInfo_AllowedReactions_GroupOptionSomeInfo case .empty: - allInfoText = "Members of the group can't add any reactions to messages." + allInfoText = presentationData.strings.PeerInfo_AllowedReactions_GroupOptionNoInfo } } diff --git a/submodules/ReactionSelectionNode/Sources/ReactionContextNode.swift b/submodules/ReactionSelectionNode/Sources/ReactionContextNode.swift index e5b520cbb1..6b49c3f13e 100644 --- a/submodules/ReactionSelectionNode/Sources/ReactionContextNode.swift +++ b/submodules/ReactionSelectionNode/Sources/ReactionContextNode.swift @@ -1145,9 +1145,8 @@ public final class ReactionContextNode: ASDisplayNode, UIScrollViewDelegate { let actionSheet = ActionSheetController(theme: ActionSheetControllerTheme(presentationTheme: presentationData.theme, fontSize: presentationData.listsFontSize)) var items: [ActionSheetItem] = [] let context = strongSelf.context - //TODO:localize - items.append(ActionSheetTextItem(title: "Do you want to clear your recent reaction emoji from suggestions?", parseMarkdown: true)) - items.append(ActionSheetButtonItem(title: presentationData.strings.Emoji_ClearRecent, color: .destructive, action: { [weak actionSheet] in + items.append(ActionSheetTextItem(title: presentationData.strings.Chat_ClearReactionsAlertText, parseMarkdown: true)) + items.append(ActionSheetButtonItem(title: presentationData.strings.Chat_ClearReactionsAlertAction, color: .destructive, action: { [weak actionSheet] in actionSheet?.dismissAnimated() guard let strongSelf = self else { return diff --git a/submodules/SettingsUI/Sources/Reactions/QuickReactionSetupController.swift b/submodules/SettingsUI/Sources/Reactions/QuickReactionSetupController.swift index fc382c70a2..2e715a2c16 100644 --- a/submodules/SettingsUI/Sources/Reactions/QuickReactionSetupController.swift +++ b/submodules/SettingsUI/Sources/Reactions/QuickReactionSetupController.swift @@ -189,11 +189,9 @@ private func quickReactionSetupControllerEntries( )) entries.append(.demoDescription(presentationData.strings.Settings_QuickReactionSetup_DemoInfo)) - //TODO:localize - entries.append(.quickReaction("Choose Your Quick Reaction", reactionSettings.quickReaction, availableReactions)) + entries.append(.quickReaction(presentationData.strings.Settings_QuickReactionSetup_ChooseQuickReaction, reactionSettings.quickReaction, availableReactions)) - //TODO:localize - entries.append(.quickReactionDescription("You can set any emoji as your quick reaction.")) + entries.append(.quickReactionDescription(presentationData.strings.Settings_QuickReactionSetup_ChooseQuickReactionInfo)) } return entries diff --git a/submodules/TelegramUI/Components/EmojiStatusSelectionComponent/Sources/EmojiStatusPreviewScreen.swift b/submodules/TelegramUI/Components/EmojiStatusSelectionComponent/Sources/EmojiStatusPreviewScreen.swift index e9723aa130..326bb51e9f 100644 --- a/submodules/TelegramUI/Components/EmojiStatusSelectionComponent/Sources/EmojiStatusPreviewScreen.swift +++ b/submodules/TelegramUI/Components/EmojiStatusSelectionComponent/Sources/EmojiStatusPreviewScreen.swift @@ -437,10 +437,9 @@ private final class TimeSelectionControlComponent: Component { let pickerSize = CGSize(width: availableSize.width, height: 216.0) let pickerFrame = CGRect(origin: CGPoint(x: 0.0, y: topPanelHeight + pickerSpacing), size: pickerSize) - //TODO:localize let titleSize = self.titleView.update( transition: transition, - component: AnyComponent(Text(text: "Set Until", font: Font.semibold(17.0), color: component.theme.list.itemPrimaryTextColor)), + component: AnyComponent(Text(text: component.strings.EmojiStatusSetup_SetUntil, font: Font.semibold(17.0), color: component.theme.list.itemPrimaryTextColor)), environment: {}, containerSize: CGSize(width: availableSize.width, height: 100.0) ) @@ -473,11 +472,10 @@ private final class TimeSelectionControlComponent: Component { transition.setFrame(view: leftButtonComponentView, frame: CGRect(origin: CGPoint(x: 16.0, y: floor((topPanelHeight - leftButtonSize.height) / 2.0)), size: leftButtonSize)) } - //TODO:localize let actionButtonSize = self.actionButtonView.update( transition: transition, component: AnyComponent(SolidRoundedButtonComponent( - title: "Set Until", + title: component.strings.EmojiStatusSetup_SetUntil, icon: nil, theme: SolidRoundedButtonComponent.Theme(theme: component.theme), font: .bold, @@ -674,9 +672,8 @@ final class EmojiStatusPreviewScreenComponent: Component { } )))) } - //TODO:localize menuItems.append(AnyComponentWithIdentity(id: "Other", component: AnyComponent(ContextMenuActionItem( - title: "Other", + title: component.strings.EmojiStatusSetup_TimerOther, action: { [weak self] in self?.toggleState() return .clearHighlight diff --git a/submodules/TelegramUI/Components/EntityKeyboard/Sources/EmojiPagerContentComponent.swift b/submodules/TelegramUI/Components/EntityKeyboard/Sources/EmojiPagerContentComponent.swift index 55c09f8237..f2b9e32da2 100644 --- a/submodules/TelegramUI/Components/EntityKeyboard/Sources/EmojiPagerContentComponent.swift +++ b/submodules/TelegramUI/Components/EntityKeyboard/Sources/EmojiPagerContentComponent.swift @@ -4985,7 +4985,6 @@ public final class EmojiPagerContentComponent: Component { itemGroups[groupIndex].items.append(resultItem) } else { itemGroupIndexById[groupId] = itemGroups.count - //TODO:localize itemGroups.append(ItemGroup(supergroupId: groupId, id: groupId, title: topStatusTitle?.uppercased(), subtitle: nil, isPremiumLocked: false, isFeatured: false, collapsedLineCount: 5, isClearable: false, headerItem: nil, items: [resultItem])) } @@ -5195,8 +5194,7 @@ public final class EmojiPagerContentComponent: Component { maxRecentLineCount = 5 } - //TODO:localize - let popularTitle = hasRecent ? "Recently Used" : "Popular" + let popularTitle = hasRecent ? strings.Chat_ReactionSection_Recent : strings.Chat_ReactionSection_Popular if let availableReactions = availableReactions { for reactionItem in availableReactions.reactions { diff --git a/submodules/TelegramUI/Sources/PeerInfo/PeerInfoScreen.swift b/submodules/TelegramUI/Sources/PeerInfo/PeerInfoScreen.swift index 5ef387b7f7..1845f97c09 100644 --- a/submodules/TelegramUI/Sources/PeerInfo/PeerInfoScreen.swift +++ b/submodules/TelegramUI/Sources/PeerInfo/PeerInfoScreen.swift @@ -633,11 +633,9 @@ private func settingsItems(data: PeerInfoScreenData?, context: AccountContext, p if let peer = data.peer as? TelegramUser, peer.isPremium { if peer.emojiStatus != nil { hasEmojiStatus = true - //TODO:localize - setStatusTitle = "Change Emoji Status" + setStatusTitle = presentationData.strings.PeerInfo_ChangeEmojiStatus } else { - //TODO:localize - setStatusTitle = "Set Emoji Status" + setStatusTitle = presentationData.strings.PeerInfo_SetEmojiStatus } displaySetStatus = true } else { @@ -1301,8 +1299,7 @@ private func editingItems(data: PeerInfoScreenData?, context: AccountContext, pr if let cachedData = data.cachedData as? CachedChannelData, case let .known(allowedReactions) = cachedData.allowedReactions { switch allowedReactions { case .all: - //TODO:localize - label = "All Reactions" + label = presentationData.strings.PeerInfo_LabelAllReactions case .empty: label = presentationData.strings.PeerInfo_ReactionsDisabled case let .limited(reactions): @@ -1467,8 +1464,7 @@ private func editingItems(data: PeerInfoScreenData?, context: AccountContext, pr if let cachedData = data.cachedData as? CachedChannelData, case let .known(allowedReactions) = cachedData.allowedReactions { switch allowedReactions { case .all: - //TODO:localize - label = "All Reactions" + label = presentationData.strings.PeerInfo_LabelAllReactions case .empty: label = presentationData.strings.PeerInfo_ReactionsDisabled case let .limited(reactions): @@ -1493,8 +1489,7 @@ private func editingItems(data: PeerInfoScreenData?, context: AccountContext, pr if let cachedData = data.cachedData as? CachedChannelData, case let .known(allowedReactions) = cachedData.allowedReactions { switch allowedReactions { case .all: - //TODO:localize - label = "All Reactions" + label = presentationData.strings.PeerInfo_LabelAllReactions case .empty: label = presentationData.strings.PeerInfo_ReactionsDisabled case let .limited(reactions): @@ -1607,8 +1602,7 @@ private func editingItems(data: PeerInfoScreenData?, context: AccountContext, pr if let cachedData = data.cachedData as? CachedGroupData, case let .known(allowedReactions) = cachedData.allowedReactions { switch allowedReactions { case .all: - //TODO:localize - label = "All Reactions" + label = presentationData.strings.PeerInfo_LabelAllReactions case .empty: label = presentationData.strings.PeerInfo_ReactionsDisabled case let .limited(reactions): @@ -3119,7 +3113,7 @@ final class PeerInfoScreenNode: ViewControllerTracingNode, UIScrollViewDelegate } } } - //TODO:localize + let emojiStatusSelectionController = EmojiStatusSelectionController( context: strongSelf.context, mode: .statusSelection,