diff --git a/Telegram/Telegram-iOS/en.lproj/Localizable.strings b/Telegram/Telegram-iOS/en.lproj/Localizable.strings index a70ab6ec3d..fe0a679269 100644 --- a/Telegram/Telegram-iOS/en.lproj/Localizable.strings +++ b/Telegram/Telegram-iOS/en.lproj/Localizable.strings @@ -10788,13 +10788,44 @@ Sorry for the inconvenience."; "Channel.AdminLog.ChannelChangedWallpaper" = "%1$@ set a new wallpaper"; +"Channel.Appearance.Title" = "Appearance"; "Channel.Appearance.UnsavedChangesAlertTitle" = "Unsaved Changes"; "Channel.Appearance.UnsavedChangesAlertText" = "You have changed the channel appearance settings. Apply changes?"; "Channel.Appearance.UnsavedChangesAlertDiscard" = "Discard"; "Channel.Appearance.UnsavedChangesAlertApply" = "Apply"; +"Channel.Appearance.ToastAppliedText" = "Appearance settings have been updated."; + +"Channel.Appearance.ExampleReplyText" = "Reply to your channel"; +"Channel.Appearance.ExampleText" = "The color you select will be used for the channel's name"; +"Channel.Appearance.ExampleLinkWebsite" = "Telegram"; +"Channel.Appearance.ExampleLinkTitle" = "Link Preview"; +"Channel.Appearance.ExampleLinkText" = "This preview will also be tinted."; + +"Channel.Appearance.NameIcon" = "Replies Logo"; +"Channel.Appearance.NameColorFooter" = "Choose a color for the name of your channel, the link it sends, and replies to its messages."; + +"Channel.Appearance.Wallpaper" = "Channel Wallpaper"; +"Channel.Appearance.WallpaperFooter" = "Set a wallpaper that will be visible to everyone reading your channel."; + +"Channel.Appearance.ProfileHeader" = "PROFILE PAGE COLOR"; +"Channel.Appearance.ProfileFooter" = "Choose a color and a logo for the channel's profile."; +"Channel.Appearance.ProfileIcon" = "Profile Logo"; +"Channel.Appearance.ResetProfileColor" = "Reset Profile Color"; + +"Channel.Appearance.Status" = "Channel Emoji Status"; +"Channel.Appearance.StatusFooter" = "Choose a status that will be shown next to the channel's name."; + +"Channel.Appearance.ApplyButton" = "Apply Changes"; "ChatList.PremiumGiftInSettingsInfo" = "You can gift **Telegram Premium** to a friend later in **Settings**."; "ChannelAppearance.BoostLevel" = "Level %@"; "Message.FullDateFormat" = "%1$@, %2$@"; + +"SavedMessages.OpenChannel" = "Open Channel"; +"SavedMessages.OpenGroup" = "Open Group"; +"SavedMessages.OpenChat" = "Open Chat"; + +"Channel.Info.BoostLevelPlusBadge" = "Level %@+"; +"Channel.Info.AppearanceItem" = "Appearance"; diff --git a/submodules/TelegramUI/Components/Chat/ChatChannelSubscriberInputPanelNode/Sources/ChatChannelSubscriberInputPanelNode.swift b/submodules/TelegramUI/Components/Chat/ChatChannelSubscriberInputPanelNode/Sources/ChatChannelSubscriberInputPanelNode.swift index 3eb6f62cbe..0e18d44fe8 100644 --- a/submodules/TelegramUI/Components/Chat/ChatChannelSubscriberInputPanelNode/Sources/ChatChannelSubscriberInputPanelNode.swift +++ b/submodules/TelegramUI/Components/Chat/ChatChannelSubscriberInputPanelNode/Sources/ChatChannelSubscriberInputPanelNode.swift @@ -47,14 +47,11 @@ private func titleAndColorForAction(_ action: SubscriberAction, theme: Presentat case .hidePinnedMessages: return (strings.Chat_PanelHidePinnedMessages, theme.chat.inputPanel.panelControlAccentColor) case .openChannel: - //TODO:localize - return ("Open Channel", theme.chat.inputPanel.panelControlAccentColor) + return (strings.SavedMessages_OpenChannel, theme.chat.inputPanel.panelControlAccentColor) case .openGroup: - //TODO:localize - return ("Open Group", theme.chat.inputPanel.panelControlAccentColor) + return (strings.SavedMessages_OpenGroup, theme.chat.inputPanel.panelControlAccentColor) case .openChat: - //TODO:localize - return ("Open Chat", theme.chat.inputPanel.panelControlAccentColor) + return (strings.SavedMessages_OpenChat, theme.chat.inputPanel.panelControlAccentColor) } } diff --git a/submodules/TelegramUI/Components/PeerInfo/PeerInfoScreen/Sources/PeerInfoPaneContainerNode.swift b/submodules/TelegramUI/Components/PeerInfo/PeerInfoScreen/Sources/PeerInfoPaneContainerNode.swift index e72cc4f91f..198fc3cfba 100644 --- a/submodules/TelegramUI/Components/PeerInfo/PeerInfoScreen/Sources/PeerInfoPaneContainerNode.swift +++ b/submodules/TelegramUI/Components/PeerInfo/PeerInfoScreen/Sources/PeerInfoPaneContainerNode.swift @@ -1001,8 +1001,7 @@ final class PeerInfoPaneContainerNode: ASDisplayNode, UIGestureRecognizerDelegat case .recommended: title = presentationData.strings.PeerInfo_PaneRecommended case .savedMessagesChats: - //TODO:localized - title = "Chats" + title = presentationData.strings.DialogList_TabTitle } return PeerInfoPaneSpecifier(key: key, title: title) }, selectedPane: self.currentPaneKey, transitionFraction: self.transitionFraction, transition: transition) diff --git a/submodules/TelegramUI/Components/PeerInfo/PeerInfoScreen/Sources/PeerInfoScreen.swift b/submodules/TelegramUI/Components/PeerInfo/PeerInfoScreen/Sources/PeerInfoScreen.swift index 72ebc9e0eb..4f738341da 100644 --- a/submodules/TelegramUI/Components/PeerInfo/PeerInfoScreen/Sources/PeerInfoScreen.swift +++ b/submodules/TelegramUI/Components/PeerInfo/PeerInfoScreen/Sources/PeerInfoScreen.swift @@ -1672,12 +1672,11 @@ private func editingItems(data: PeerInfoScreenData?, state: PeerInfoState, chatL } let colorImage = generateSettingsMenuPeerColorsLabelIcon(colors: colors) - //TODO:localize var boostIcon: UIImage? - if let approximateBoostLevel = channel.approximateBoostLevel, approximateBoostLevel < 1 { - boostIcon = generateDisclosureActionBoostLevelBadgeImage(text: "Level 1+") + if let approximateBoostLevel = channel.approximateBoostLevel, approximateBoostLevel < 100 { + boostIcon = generateDisclosureActionBoostLevelBadgeImage(text: presentationData.strings.Channel_Info_BoostLevelPlusBadge("1").string) } - items[.peerSettings]!.append(PeerInfoScreenDisclosureItem(id: ItemPeerColor, label: .image(colorImage, colorImage.size), additionalBadgeIcon: boostIcon, text: "Appearance", icon: UIImage(bundleImageName: "Chat/Info/NameColorIcon"), action: { + items[.peerSettings]!.append(PeerInfoScreenDisclosureItem(id: ItemPeerColor, label: .image(colorImage, colorImage.size), additionalBadgeIcon: boostIcon, text: presentationData.strings.Channel_Info_AppearanceItem, icon: UIImage(bundleImageName: "Chat/Info/NameColorIcon"), action: { interaction.editingOpenNameColorSetup() })) } diff --git a/submodules/TelegramUI/Components/Settings/PeerNameColorScreen/Sources/ChannelAppearanceScreen.swift b/submodules/TelegramUI/Components/Settings/PeerNameColorScreen/Sources/ChannelAppearanceScreen.swift index 8d5e6de919..ef33770dfc 100644 --- a/submodules/TelegramUI/Components/Settings/PeerNameColorScreen/Sources/ChannelAppearanceScreen.swift +++ b/submodules/TelegramUI/Components/Settings/PeerNameColorScreen/Sources/ChannelAppearanceScreen.swift @@ -556,8 +556,7 @@ final class ChannelAppearanceScreenComponent: Component { self.environment?.controller()?.dismiss() if let lastController = navigationController?.viewControllers.last as? ViewController { - //TODO:localize - let tipController = UndoOverlayController(presentationData: presentationData, content: .actionSucceeded(title: nil, text: "Appearance settings have been updated.", cancel: nil, destructive: false), elevatedLayout: false, position: .bottom, animateInAsReplacement: false, action: { _ in return false }) + let tipController = UndoOverlayController(presentationData: presentationData, content: .actionSucceeded(title: nil, text: presentationData.strings.Channel_Appearance_ToastAppliedText, cancel: nil, destructive: false), elevatedLayout: false, position: .bottom, animateInAsReplacement: false, action: { _ in return false }) lastController.present(tipController, in: .window(.root)) } }) @@ -945,7 +944,6 @@ final class ChannelAppearanceScreenComponent: Component { let presentationData = component.context.sharedContext.currentPresentationData.with { $0 } - //TODO:localize let messageItem = PeerNameColorChatPreviewItem.MessageItem( outgoing: false, peerId: EnginePeer.Id(namespace: peer.id.namespace, id: PeerId.Id._internalFromInt64Value(0)), @@ -953,15 +951,15 @@ final class ChannelAppearanceScreenComponent: Component { photo: peer.profileImageRepresentations, nameColor: resolvedState.nameColor, backgroundEmojiId: replyFileId, - reply: (peer.compactDisplayTitle, "Reply to your channel"), - linkPreview: ("Telegram", "Link Preview", "This preview will also be tinted."), - text: "The color you select will be used for the channel's name" + reply: (peer.compactDisplayTitle, environment.strings.Channel_Appearance_ExampleReplyText), + linkPreview: (environment.strings.Channel_Appearance_ExampleLinkWebsite, environment.strings.Channel_Appearance_ExampleLinkTitle, environment.strings.Channel_Appearance_ExampleLinkText), + text: environment.strings.Channel_Appearance_ExampleText ) var replyLogoContents: [AnyComponentWithIdentity] = [] replyLogoContents.append(AnyComponentWithIdentity(id: 0, component: AnyComponent(MultilineTextComponent( text: .plain(NSAttributedString( - string: "Replies Logo", //TODO:localize + string: environment.strings.Channel_Appearance_NameIcon, font: Font.regular(presentationData.listsFontSize.baseDisplaySize), textColor: environment.theme.list.itemPrimaryTextColor )), @@ -995,7 +993,7 @@ final class ChannelAppearanceScreenComponent: Component { header: nil, footer: AnyComponent(MultilineTextComponent( text: .plain(NSAttributedString( - string: "Choose a color for the name of your channel, the link it sends, and replies to its messages.", //TODO:localize + string: environment.strings.Channel_Appearance_NameColorFooter, font: Font.regular(presentationData.listsFontSize.itemListBaseHeaderFontSize), textColor: environment.theme.list.freeTextColor )), @@ -1072,7 +1070,7 @@ final class ChannelAppearanceScreenComponent: Component { var wallpaperLogoContents: [AnyComponentWithIdentity] = [] wallpaperLogoContents.append(AnyComponentWithIdentity(id: 0, component: AnyComponent(MultilineTextComponent( text: .plain(NSAttributedString( - string: "Channel Wallpaper", //TODO:localize + string: environment.strings.Channel_Appearance_Wallpaper, font: Font.regular(presentationData.listsFontSize.baseDisplaySize), textColor: environment.theme.list.itemPrimaryTextColor )), @@ -1100,7 +1098,7 @@ final class ChannelAppearanceScreenComponent: Component { header: nil, footer: AnyComponent(MultilineTextComponent( text: .plain(NSAttributedString( - string: "Set a wallpaper that will be visible to everyone reading your channel.", //TODO:localize + string: environment.strings.Channel_Appearance_WallpaperFooter, font: Font.regular(presentationData.listsFontSize.itemListBaseHeaderFontSize), textColor: environment.theme.list.freeTextColor )), @@ -1169,7 +1167,7 @@ final class ChannelAppearanceScreenComponent: Component { var profileLogoContents: [AnyComponentWithIdentity] = [] profileLogoContents.append(AnyComponentWithIdentity(id: 0, component: AnyComponent(MultilineTextComponent( text: .plain(NSAttributedString( - string: "Profile Logo", //TODO:localize + string: environment.strings.Channel_Appearance_ProfileIcon, font: Font.regular(presentationData.listsFontSize.baseDisplaySize), textColor: environment.theme.list.itemPrimaryTextColor )), @@ -1195,7 +1193,7 @@ final class ChannelAppearanceScreenComponent: Component { background: bannerBackground, header: AnyComponent(MultilineTextComponent( text: .plain(NSAttributedString( - string: "PROFILE PAGE COLOR", //TODO:localize + string: environment.strings.Channel_Appearance_ProfileHeader, font: Font.regular(presentationData.listsFontSize.itemListBaseHeaderFontSize), textColor: environment.theme.list.freeTextColor )), @@ -1203,7 +1201,7 @@ final class ChannelAppearanceScreenComponent: Component { )), footer: AnyComponent(MultilineTextComponent( text: .plain(NSAttributedString( - string: "Choose a color and a logo for the channel's profile.", //TODO:localize + string: environment.strings.Channel_Appearance_ProfileFooter, font: Font.regular(presentationData.listsFontSize.itemListBaseHeaderFontSize), textColor: environment.theme.list.freeTextColor )), @@ -1280,7 +1278,7 @@ final class ChannelAppearanceScreenComponent: Component { var emojiStatusContents: [AnyComponentWithIdentity] = [] emojiStatusContents.append(AnyComponentWithIdentity(id: 0, component: AnyComponent(MultilineTextComponent( text: .plain(NSAttributedString( - string: "Channel Emoji Status", //TODO:localize + string: environment.strings.Channel_Appearance_Status, font: Font.regular(presentationData.listsFontSize.baseDisplaySize), textColor: environment.theme.list.itemPrimaryTextColor )), @@ -1304,7 +1302,7 @@ final class ChannelAppearanceScreenComponent: Component { theme: environment.theme, title: AnyComponent(MultilineTextComponent( text: .plain(NSAttributedString( - string: "Reset Profile Color", //TODO:localize + string: environment.strings.Channel_Appearance_ResetProfileColor, font: Font.regular(presentationData.listsFontSize.baseDisplaySize), textColor: environment.theme.list.itemAccentColor )), @@ -1352,7 +1350,7 @@ final class ChannelAppearanceScreenComponent: Component { header: nil, footer: AnyComponent(MultilineTextComponent( text: .plain(NSAttributedString( - string: "Choose a status that will be shown next to the channel's name.", //TODO:localize + string: environment.strings.Channel_Appearance_StatusFooter, font: Font.regular(presentationData.listsFontSize.itemListBaseHeaderFontSize), textColor: environment.theme.list.freeTextColor )), @@ -1393,9 +1391,8 @@ final class ChannelAppearanceScreenComponent: Component { contentHeight += bottomContentInset var buttonContents: [AnyComponentWithIdentity] = [] - //TODO:localize buttonContents.append(AnyComponentWithIdentity(id: AnyHashable(0 as Int), component: AnyComponent( - Text(text: "Apply Changes", font: Font.semibold(17.0), color: environment.theme.list.itemCheckColors.foregroundColor) + Text(text: environment.strings.Channel_Appearance_ApplyButton, font: Font.semibold(17.0), color: environment.theme.list.itemCheckColors.foregroundColor) ))) let requiredLevel = requiredBoostSubject.requiredLevel(context: component.context, configuration: premiumConfiguration) @@ -1512,8 +1509,7 @@ public class ChannelAppearanceScreen: ViewControllerComponentContainer { ), navigationBarAppearance: .default, theme: .default, updatedPresentationData: updatedPresentationData) let presentationData = context.sharedContext.currentPresentationData.with { $0 } - //TODO:localize - self.title = "Appearance" + self.title = presentationData.strings.Channel_Appearance_Title self.navigationItem.backBarButtonItem = UIBarButtonItem(title: presentationData.strings.Common_Back, style: .plain, target: nil, action: nil) self.ready.set(.never())