From 14ee4b56b5f64c0d92111f221cec5a73df2070d1 Mon Sep 17 00:00:00 2001 From: Ilya Laktyushin Date: Mon, 28 Jul 2025 23:38:23 +0200 Subject: [PATCH 1/2] Various improvements --- .../Telegram-iOS/en.lproj/Localizable.strings | 14 ++++++++++++ .../Sources/PremiumIntroScreen.swift | 6 ++--- .../Sources/GiftItemComponent.swift | 2 +- .../Sources/GiftPurchaseAlertController.swift | 12 +++++----- .../Sources/GiftViewScreen.swift | 21 ++++++++++++++---- .../Sources/StarsWithdrawalScreen.swift | 8 +++---- .../Collectible/Hidden.imageset/Contents.json | 12 ++++++++++ .../Collectible/Hidden.imageset/hidded_18.pdf | Bin 0 -> 4398 bytes .../Premium/TonGift.imageset/Contents.json | 12 ++++++++++ .../Premium/TonGift.imageset/giftton.pdf | Bin 0 -> 4021 bytes 10 files changed, 66 insertions(+), 21 deletions(-) create mode 100644 submodules/TelegramUI/Images.xcassets/Premium/Collectible/Hidden.imageset/Contents.json create mode 100644 submodules/TelegramUI/Images.xcassets/Premium/Collectible/Hidden.imageset/hidded_18.pdf create mode 100644 submodules/TelegramUI/Images.xcassets/Premium/TonGift.imageset/Contents.json create mode 100644 submodules/TelegramUI/Images.xcassets/Premium/TonGift.imageset/giftton.pdf diff --git a/Telegram/Telegram-iOS/en.lproj/Localizable.strings b/Telegram/Telegram-iOS/en.lproj/Localizable.strings index d9578e9b5f..8b8efcda09 100644 --- a/Telegram/Telegram-iOS/en.lproj/Localizable.strings +++ b/Telegram/Telegram-iOS/en.lproj/Localizable.strings @@ -14773,3 +14773,17 @@ Sorry for the inconvenience."; "Gift.View.UpgradeDescription" = "Upgrade this gift to turn it to a unique collectible."; "Gift.View.UpgradeFreeDescription" = "Upgrade this gift for free to turn it to a unique collectible."; + +"Gift.View.EqualsTo" = "Equals to %@"; + +"Gift.Buy.AcceptsTonOnly" = "The seller only accepts\nTON as payment."; +"Gift.Buy.PayInStars" = "Pay in Stars"; +"Gift.Buy.PayInTon" = "Pay in TON"; +"Gift.Buy.PayInTon.Tooltip" = "Pay with TON to skip the 21-day wait before transferring the gift again."; + +"Premium.PremiumGift.Title" = "Premium Gift"; +"Premium.PremiumGift.Description" = "Subscribe to **Telegram Premium** to send up to **5** of these gifts and unlock access to multiple additional features."; + +"Stars.SellGift.TonAmountTitle" = "PRICE IN TON"; +"Stars.SellGift.OnlyTon" = "Only Accept TON"; +"Stars.SellGift.OnlyTonInfo" = "If the buyer pays you in TON, there's no risk of refunds, unlike with Stars payments."; diff --git a/submodules/PremiumUI/Sources/PremiumIntroScreen.swift b/submodules/PremiumUI/Sources/PremiumIntroScreen.swift index e0961e864b..c8a4210d2b 100644 --- a/submodules/PremiumUI/Sources/PremiumIntroScreen.swift +++ b/submodules/PremiumUI/Sources/PremiumIntroScreen.swift @@ -1831,8 +1831,7 @@ private final class PremiumIntroScreenContentComponent: CombinedComponent { var link = "" let textString: String if case .premiumGift = context.component.source { - //TODO:localize - textString = "Subscribe to **Telegram Premium** to send up to **5** of these gifts and unlock access to multiple additional features." + textString = strings.Premium_PremiumGift_Description } else if case .emojiStatus = context.component.source { textString = strings.Premium_EmojiStatusText.replacingOccurrences(of: "#", with: "# ") } else if case .giftTerms = context.component.source { @@ -3459,8 +3458,7 @@ private final class PremiumIntroScreenComponent: CombinedComponent { let titleString: String if case .premiumGift = context.component.source { - //TODO:localize - titleString = "Premium Gift" + titleString = environment.strings.Premium_PremiumGift_Title } else if case .business = context.component.mode { titleString = environment.strings.Business_Title } else if case .emojiStatus = context.component.source { diff --git a/submodules/TelegramUI/Components/Gifts/GiftItemComponent/Sources/GiftItemComponent.swift b/submodules/TelegramUI/Components/Gifts/GiftItemComponent/Sources/GiftItemComponent.swift index 18b5cbff89..6af3bfcb3f 100644 --- a/submodules/TelegramUI/Components/Gifts/GiftItemComponent/Sources/GiftItemComponent.swift +++ b/submodules/TelegramUI/Components/Gifts/GiftItemComponent/Sources/GiftItemComponent.swift @@ -644,7 +644,7 @@ public final class GiftItemComponent: Component { component: AnyComponent( ZStack([ AnyComponentWithIdentity(id: "background", component: AnyComponent(RoundedRectangle(color: buttonColor, cornerRadius: 12.0))), - AnyComponentWithIdentity(id: "icon", component: AnyComponent(BundleIconComponent(name: "Ads/TonMedium", tintColor: .white, maxSize: CGSize(width: 13.0, height: 13.0)))) + AnyComponentWithIdentity(id: "icon", component: AnyComponent(BundleIconComponent(name: "Premium/TonGift", tintColor: .white))) ]) ), environment: {}, diff --git a/submodules/TelegramUI/Components/Gifts/GiftViewScreen/Sources/GiftPurchaseAlertController.swift b/submodules/TelegramUI/Components/Gifts/GiftViewScreen/Sources/GiftPurchaseAlertController.swift index f7a10e0c95..04c429990f 100644 --- a/submodules/TelegramUI/Components/Gifts/GiftViewScreen/Sources/GiftPurchaseAlertController.swift +++ b/submodules/TelegramUI/Components/Gifts/GiftViewScreen/Sources/GiftPurchaseAlertController.swift @@ -161,12 +161,11 @@ private final class GiftPurchaseAlertContentNode: AlertContentNode { } if self.gift.resellForTonOnly { - //TODO:localize let headerSize = self.header.update( transition: .immediate, component: AnyComponent( MultilineTextComponent( - text: .plain(NSAttributedString(string: "The seller only accepts\nTON as payment.", font: Font.regular(13.0), textColor: self.presentationTheme.actionSheet.secondaryTextColor)), + text: .plain(NSAttributedString(string: self.strings.Gift_Buy_AcceptsTonOnly, font: Font.regular(13.0), textColor: self.presentationTheme.actionSheet.secondaryTextColor)), horizontalAlignment: .center, maximumNumberOfLines: 2 ) @@ -184,7 +183,7 @@ private final class GiftPurchaseAlertContentNode: AlertContentNode { origin.y += headerSize.height + 17.0 } else { origin.y -= 4.0 - //TODO:localize + let headerSize = self.header.update( transition: ComponentTransition(transition), component: AnyComponent(TabSelectorComponent( @@ -201,11 +200,11 @@ private final class GiftPurchaseAlertContentNode: AlertContentNode { items: [ TabSelectorComponent.Item( id: AnyHashable(0), - content: .text("Pay in Stars") + content: .text(self.strings.Gift_Buy_PayInStars) ), TabSelectorComponent.Item( id: AnyHashable(1), - content: .text("Pay in TON") + content: .text(self.strings.Gift_Buy_PayInTon) ) ], selectedId: self.currency == .ton ? AnyHashable(1) : AnyHashable(0), @@ -499,8 +498,7 @@ public func giftPurchaseAlertController( if let headerView = contentNode?.header.view { let absoluteFrame = headerView.convert(headerView.bounds, to: nil) let location = CGRect(origin: CGPoint(x: absoluteFrame.minX + floor(absoluteFrame.width * 0.75), y: absoluteFrame.minY - 8.0), size: CGSize()) - //TODO:localize - let tooltipController = TooltipScreen(account: context.account, sharedContext: context.sharedContext, text: .plain(text: "Pay with TON to skip the 21-day wait before transferring the gift again."), style: .wide, location: .point(location, .bottom), displayDuration: .default, inset: 16.0, shouldDismissOnTouch: { _, _ in + let tooltipController = TooltipScreen(account: context.account, sharedContext: context.sharedContext, text: .plain(text: presentationData.strings.Gift_Buy_PayInTon_Tooltip), style: .wide, location: .point(location, .bottom), displayDuration: .default, inset: 16.0, shouldDismissOnTouch: { _, _ in return .dismiss(consume: false) }) controller.present(tooltipController, in: .window(.root)) diff --git a/submodules/TelegramUI/Components/Gifts/GiftViewScreen/Sources/GiftViewScreen.swift b/submodules/TelegramUI/Components/Gifts/GiftViewScreen/Sources/GiftViewScreen.swift index 18ff93aa9e..0a3611e655 100644 --- a/submodules/TelegramUI/Components/Gifts/GiftViewScreen/Sources/GiftViewScreen.swift +++ b/submodules/TelegramUI/Components/Gifts/GiftViewScreen/Sources/GiftViewScreen.swift @@ -98,6 +98,7 @@ private final class GiftViewSheetContent: CombinedComponent { var cachedChevronImage: (UIImage, PresentationTheme)? var cachedSmallChevronImage: (UIImage, PresentationTheme)? + var cachedHiddenImage: (UIImage, PresentationTheme)? var inProgress = false @@ -3222,10 +3223,17 @@ private final class GiftViewSheetContent: CombinedComponent { } if ((incoming && !converted && !upgraded) || exported || selling) && (!showUpgradePreview && !showWearPreview) { + let textFont = Font.regular(13.0) + let textColor = theme.list.itemSecondaryTextColor let linkColor = theme.actionSheet.controlAccentColor + if state.cachedSmallChevronImage == nil || state.cachedSmallChevronImage?.1 !== environment.theme { state.cachedSmallChevronImage = (generateTintedImage(image: UIImage(bundleImageName: "Item List/InlineTextRightArrow"), color: linkColor)!, theme) } + if state.cachedHiddenImage == nil || state.cachedHiddenImage?.1 !== environment.theme { + state.cachedHiddenImage = (generateTintedImage(image: UIImage(bundleImageName: "Premium/Collectible/Hidden"), color: textColor)!, theme) + } + var addressToOpen: String? var descriptionText: String if let uniqueGift, selling { @@ -3245,10 +3253,11 @@ private final class GiftViewSheetContent: CombinedComponent { } else { descriptionText = savedToProfile ? strings.Gift_View_DisplayedInfoNew : strings.Gift_View_HiddenInfoNew } + if !savedToProfile { + descriptionText = "# \(descriptionText)" + } } - let textFont = Font.regular(13.0) - let textColor = theme.list.itemSecondaryTextColor let markdownAttributes = MarkdownAttributes(body: MarkdownAttributeSet(font: textFont, textColor: textColor), bold: MarkdownAttributeSet(font: textFont, textColor: textColor), link: MarkdownAttributeSet(font: textFont, textColor: linkColor), linkAttribute: { contents in return (TelegramTextAttributes.URL, contents) }) @@ -3258,6 +3267,10 @@ private final class GiftViewSheetContent: CombinedComponent { if let range = attributedString.string.range(of: ">"), let chevronImage = state.cachedSmallChevronImage?.0 { attributedString.addAttribute(.attachment, value: chevronImage, range: NSRange(range, in: attributedString.string)) } + if let range = attributedString.string.range(of: "#"), let hiddenImage = state.cachedHiddenImage?.0 { + attributedString.addAttribute(.attachment, value: hiddenImage, range: NSRange(range, in: attributedString.string)) + attributedString.addAttribute(.baselineOffset, value: 1.5, range: NSRange(range, in: attributedString.string)) + } originY -= 5.0 let additionalText = additionalText.update( @@ -3266,6 +3279,7 @@ private final class GiftViewSheetContent: CombinedComponent { horizontalAlignment: .center, maximumNumberOfLines: 5, lineSpacing: 0.2, + insets: UIEdgeInsets(top: 0.0, left: 2.0, bottom: 0.0, right: 2.0), highlightColor: linkColor.withAlphaComponent(0.1), highlightInset: UIEdgeInsets(top: 0.0, left: 0.0, bottom: 0.0, right: -8.0), highlightAction: { attributes in @@ -3555,8 +3569,7 @@ private final class GiftViewSheetContent: CombinedComponent { currencyAmount = formatTonAmountText(resellAmount.amount.value, dateTimeFormat: environment.dateTimeFormat, maxDecimalPositions: nil) if let starsAmount = uniqueGift?.resellAmounts?.first(where: { $0.currency == .stars }) { - //TODO:localize - buttonAttributedSubtitleString = NSMutableAttributedString(string: "Equals to # \(formatStarsAmountText(starsAmount.amount, dateTimeFormat: environment.dateTimeFormat))", font: Font.medium(11.0), textColor: theme.list.itemCheckColors.foregroundColor.withAlphaComponent(0.7), paragraphAlignment: .center) + buttonAttributedSubtitleString = NSMutableAttributedString(string: strings.Gift_View_EqualsTo(" # \(formatStarsAmountText(starsAmount.amount, dateTimeFormat: environment.dateTimeFormat))").string, font: Font.medium(11.0), textColor: theme.list.itemCheckColors.foregroundColor.withAlphaComponent(0.7), paragraphAlignment: .center) } } buyString += " \(currencySymbol) \(currencyAmount)" diff --git a/submodules/TelegramUI/Components/Stars/StarsWithdrawalScreen/Sources/StarsWithdrawalScreen.swift b/submodules/TelegramUI/Components/Stars/StarsWithdrawalScreen/Sources/StarsWithdrawalScreen.swift index 4b1c4a94be..d21a0a07a9 100644 --- a/submodules/TelegramUI/Components/Stars/StarsWithdrawalScreen/Sources/StarsWithdrawalScreen.swift +++ b/submodules/TelegramUI/Components/Stars/StarsWithdrawalScreen/Sources/StarsWithdrawalScreen.swift @@ -208,8 +208,7 @@ private final class SheetContent: CombinedComponent { minAmount = StarsAmount(value: resaleConfiguration.starGiftResaleMinStarsAmount, nanos: 0) maxAmount = StarsAmount(value: resaleConfiguration.starGiftResaleMaxStarsAmount, nanos: 0) case .ton: - //TODO:localize - amountTitle = "PRICE IN TON" + amountTitle = environment.strings.Stars_SellGift_TonAmountTitle minAmount = StarsAmount(value: resaleConfiguration.starGiftResaleMinTonAmount, nanos: 0) maxAmount = StarsAmount(value: resaleConfiguration.starGiftResaleMaxTonAmount, nanos: 0) } @@ -597,8 +596,7 @@ private final class SheetContent: CombinedComponent { if case .starGiftResell = component.mode { contentSize.height += 24.0 - //TODO:localize - let onlyTonFooterString = NSAttributedString(attributedString: parseMarkdownIntoAttributedString("If the buyer pays you in TON, there's no risk of refunds, unlike with Stars payments.", attributes: amountMarkdownAttributes, textAlignment: .natural)) + let onlyTonFooterString = NSAttributedString(attributedString: parseMarkdownIntoAttributedString(environment.strings.Stars_SellGift_OnlyTonInfo, attributes: amountMarkdownAttributes, textAlignment: .natural)) let onlyTonFooter = AnyComponent(MultilineTextComponent( text: .plain(onlyTonFooterString), maximumNumberOfLines: 0 @@ -616,7 +614,7 @@ private final class SheetContent: CombinedComponent { title: AnyComponent(VStack([ AnyComponentWithIdentity(id: AnyHashable(0), component: AnyComponent(MultilineTextComponent( text: .plain(NSAttributedString( - string: "Only Accept TON", + string: environment.strings.Stars_SellGift_OnlyTon, font: Font.regular(presentationData.listsFontSize.baseDisplaySize), textColor: theme.list.itemPrimaryTextColor )), diff --git a/submodules/TelegramUI/Images.xcassets/Premium/Collectible/Hidden.imageset/Contents.json b/submodules/TelegramUI/Images.xcassets/Premium/Collectible/Hidden.imageset/Contents.json new file mode 100644 index 0000000000..7732d87263 --- /dev/null +++ b/submodules/TelegramUI/Images.xcassets/Premium/Collectible/Hidden.imageset/Contents.json @@ -0,0 +1,12 @@ +{ + "images" : [ + { + "filename" : "hidded_18.pdf", + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/submodules/TelegramUI/Images.xcassets/Premium/Collectible/Hidden.imageset/hidded_18.pdf b/submodules/TelegramUI/Images.xcassets/Premium/Collectible/Hidden.imageset/hidded_18.pdf new file mode 100644 index 0000000000000000000000000000000000000000..e7924d3eb033b5c5229b3242d5488887bbcd6b0f GIT binary patch literal 4398 zcmai2c|4R~`?k{{E%qgYB*YjDhRD7zLy~mFWGmUX zsO)9m^P6e=zJ1^K^ZA{Bo-^0E&wZc!ex7rEu6y`ls_G(OQE32wC}9A=Krx`ZtrGwU zynGo5QgT5fz1$FJBoL&E^hMbrjWm=AON0SZM-kTuPZz?nD$>r~9{FoU7wL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BQXglq1*3=1QMERQDHy4I*w4m@jjr!}wJ@%;)xT67&nXs%?m zepq^V#O!u^`_X!lYLSOdImgX-)>(yaS2EdKwPh)*-7Z*k7xK}IIK;$?baHT6STe~K zMPOd5`P<1pR#v2n96#g1DJRfj(%Czu9!@H*7FEzAVq8v5(@?RI&t}5!|np^rkoNi5S7`I7F(B=BKHIR)x@Yu4&me z^?!Z%J^ab?x5BpuE(|x8r*%ZOTYLQu0E+=NROaWNheh{%ZRvfqh`L;I9!!^I!1O{Q zDGRSN9?91xT}fJ}H9iY(_#d@Psg1u{Czz!4?*fzijs9q;+}v<@FR+Ex&(6sBx;weI zLZPqzYM%5k_E@wUjtI5@OG-%o7=KTsWPU+^&weo(VZ3kzPdkhkm~sp#HA?By)NyWj zj2rojlsf+fqR^gX3@rZ>`mfVKf&T9Pbg=g1t%4~LP>$IzMgrLv`mgj!{Fo;{R5MgBi~NHFuW%k>w@tF zQ7QnbK~AZV7tR$U3>L!L3;&f^h!GBl2UC*v<0nBbVtp`_4E*Ss(VqApIgyr=mIMh1 IAPhAB16y|RegFUf literal 0 HcmV?d00001 From 74cdd1816f360eb3a70bdc85432e390e329f2343 Mon Sep 17 00:00:00 2001 From: Ilya Laktyushin Date: Tue, 29 Jul 2025 00:21:59 +0200 Subject: [PATCH 2/2] Various fixes --- .../GiftViewScreen/Sources/GiftViewScreen.swift | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/submodules/TelegramUI/Components/Gifts/GiftViewScreen/Sources/GiftViewScreen.swift b/submodules/TelegramUI/Components/Gifts/GiftViewScreen/Sources/GiftViewScreen.swift index 0a3611e655..05827b0c89 100644 --- a/submodules/TelegramUI/Components/Gifts/GiftViewScreen/Sources/GiftViewScreen.swift +++ b/submodules/TelegramUI/Components/Gifts/GiftViewScreen/Sources/GiftViewScreen.swift @@ -3248,10 +3248,14 @@ private final class GiftViewSheetContent: CombinedComponent { addressToOpen = address descriptionText = strings.Gift_View_TonGiftAddressInfo } else { - if isChannelGift { - descriptionText = savedToProfile ? strings.Gift_View_DisplayedInfoChannelNew : strings.Gift_View_HiddenInfoChannelNew + if canUpgrade || savedToProfile { + if isChannelGift { + descriptionText = savedToProfile ? strings.Gift_View_DisplayedInfoChannelNew : strings.Gift_View_HiddenInfoChannelNew + } else { + descriptionText = savedToProfile ? strings.Gift_View_DisplayedInfoNew : strings.Gift_View_HiddenInfoNew + } } else { - descriptionText = savedToProfile ? strings.Gift_View_DisplayedInfoNew : strings.Gift_View_HiddenInfoNew + descriptionText = isChannelGift ? strings.Gift_View_UniqueHiddenInfo_Channel : strings.Gift_View_UniqueHiddenInfo } if !savedToProfile { descriptionText = "# \(descriptionText)" @@ -3492,7 +3496,7 @@ private final class GiftViewSheetContent: CombinedComponent { availableSize: buttonSize, transition: context.transition ) - } else if incoming && !converted && !upgraded { + } else if incoming && !converted && !upgraded && canUpgrade { let buttonTitle: String if let upgradeStars, upgradeStars > 0 { buttonTitle = strings.Gift_View_UpgradeForFree