From bb9ce8dedbcd376e1b823538c826551f5bc20f75 Mon Sep 17 00:00:00 2001 From: Ilya Laktyushin Date: Thu, 21 Dec 2023 01:01:07 +0400 Subject: [PATCH] Update localization --- Telegram/Telegram-iOS/en.lproj/Localizable.strings | 2 +- .../Sources/BoostLevelIconComponent.swift | 3 +-- .../WallpaperGridScreen/Sources/ThemeGridControllerNode.swift | 4 ++-- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/Telegram/Telegram-iOS/en.lproj/Localizable.strings b/Telegram/Telegram-iOS/en.lproj/Localizable.strings index fe0a679269..8057a5b651 100644 --- a/Telegram/Telegram-iOS/en.lproj/Localizable.strings +++ b/Telegram/Telegram-iOS/en.lproj/Localizable.strings @@ -10819,7 +10819,7 @@ Sorry for the inconvenience."; "ChatList.PremiumGiftInSettingsInfo" = "You can gift **Telegram Premium** to a friend later in **Settings**."; -"ChannelAppearance.BoostLevel" = "Level %@"; +"Channel.Appearance.BoostLevel" = "Level %@"; "Message.FullDateFormat" = "%1$@, %2$@"; diff --git a/submodules/TelegramUI/Components/Settings/BoostLevelIconComponent/Sources/BoostLevelIconComponent.swift b/submodules/TelegramUI/Components/Settings/BoostLevelIconComponent/Sources/BoostLevelIconComponent.swift index 74c0fc126c..0bee22b64e 100644 --- a/submodules/TelegramUI/Components/Settings/BoostLevelIconComponent/Sources/BoostLevelIconComponent.swift +++ b/submodules/TelegramUI/Components/Settings/BoostLevelIconComponent/Sources/BoostLevelIconComponent.swift @@ -82,8 +82,7 @@ public final class BoostLevelIconComponent: Component { func update(component: BoostLevelIconComponent, availableSize: CGSize, state: EmptyComponentState, environment: Environment, transition: Transition) -> CGSize { if self.component != component { - //TODO:localize - self.imageView.image = generateDisclosureActionBoostLevelBadgeImage(text: "Level \(component.level)") + self.imageView.image = generateDisclosureActionBoostLevelBadgeImage(text: component.strings.Channel_Appearance_BoostLevel("\(component.level)")) } self.component = component diff --git a/submodules/TelegramUI/Components/Settings/WallpaperGridScreen/Sources/ThemeGridControllerNode.swift b/submodules/TelegramUI/Components/Settings/WallpaperGridScreen/Sources/ThemeGridControllerNode.swift index b8743f6b10..50ba9af0cd 100644 --- a/submodules/TelegramUI/Components/Settings/WallpaperGridScreen/Sources/ThemeGridControllerNode.swift +++ b/submodules/TelegramUI/Components/Settings/WallpaperGridScreen/Sources/ThemeGridControllerNode.swift @@ -259,7 +259,7 @@ final class ThemeGridControllerNode: ASDisplayNode { requiredCustomWallpaperLevel = customLevel } - self.galleryItem = ItemListPeerActionItem(presentationData: ItemListPresentationData(presentationData), icon: generateTintedImage(image: UIImage(bundleImageName: "Chat/Attach Menu/Image"), color: presentationData.theme.list.itemAccentColor), title: presentationData.strings.Wallpaper_SetCustomBackground, additionalBadgeIcon: requiredCustomWallpaperLevel.flatMap { generateDisclosureActionBoostLevelBadgeImage(text: presentationData.strings.ChannelAppearance_BoostLevel("\($0)").string) }, alwaysPlain: false, hasSeparator: true, sectionId: 0, height: .generic, color: .accent, editing: false, action: { + self.galleryItem = ItemListPeerActionItem(presentationData: ItemListPresentationData(presentationData), icon: generateTintedImage(image: UIImage(bundleImageName: "Chat/Attach Menu/Image"), color: presentationData.theme.list.itemAccentColor), title: presentationData.strings.Wallpaper_SetCustomBackground, additionalBadgeIcon: requiredCustomWallpaperLevel.flatMap { generateDisclosureActionBoostLevelBadgeImage(text: presentationData.strings.Channel_Appearance_BoostLevel("\($0)").string) }, alwaysPlain: false, hasSeparator: true, sectionId: 0, height: .generic, color: .accent, editing: false, action: { presentGallery() }) self.galleryItemNode = ItemListPeerActionItemNode() @@ -684,7 +684,7 @@ final class ThemeGridControllerNode: ASDisplayNode { if case let .peer(_, _, _, _, customLevel) = mode { requiredCustomWallpaperLevel = customLevel } - self.galleryItem = ItemListPeerActionItem(presentationData: ItemListPresentationData(presentationData), icon: generateTintedImage(image: UIImage(bundleImageName: "Chat/Attach Menu/Image"), color: presentationData.theme.list.itemAccentColor), title: presentationData.strings.Wallpaper_SetCustomBackground, additionalBadgeIcon: requiredCustomWallpaperLevel.flatMap { generateDisclosureActionBoostLevelBadgeImage(text: presentationData.strings.ChannelAppearance_BoostLevel("\($0)").string) }, alwaysPlain: false, hasSeparator: true, sectionId: 0, height: .generic, color: .accent, editing: false, action: { [weak self] in + self.galleryItem = ItemListPeerActionItem(presentationData: ItemListPresentationData(presentationData), icon: generateTintedImage(image: UIImage(bundleImageName: "Chat/Attach Menu/Image"), color: presentationData.theme.list.itemAccentColor), title: presentationData.strings.Wallpaper_SetCustomBackground, additionalBadgeIcon: requiredCustomWallpaperLevel.flatMap { generateDisclosureActionBoostLevelBadgeImage(text: presentationData.strings.Channel_Appearance_BoostLevel("\($0)").string) }, alwaysPlain: false, hasSeparator: true, sectionId: 0, height: .generic, color: .accent, editing: false, action: { [weak self] in self?.presentGallery() }) self.removeItem = ItemListPeerActionItem(presentationData: ItemListPresentationData(presentationData), icon: generateTintedImage(image: UIImage(bundleImageName: "Chat/Input/Accessory Panels/MessageSelectionTrash"), color: presentationData.theme.list.itemDestructiveColor), title: presentationData.strings.Wallpaper_ChannelRemoveBackground, alwaysPlain: false, hasSeparator: true, sectionId: 0, height: .generic, color: .destructive, editing: false, action: { [weak self] in