Skip to content

Commit 4660f67

Browse files
committed
Update localization
1 parent 52e7a17 commit 4660f67

File tree

8 files changed

+92
-129
lines changed

8 files changed

+92
-129
lines changed

Telegram/Telegram-iOS/en.lproj/Localizable.strings

Lines changed: 53 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15539,12 +15539,56 @@ Error: %8$@";
1553915539
"Passkeys.AddPasskey" = "Create Passkey";
1554015540
"Passkeys.ListFooter" = "Your passkeys are stored securely in your password manager.";
1554115541

15542-
"Gifts.Demo.Title" = "Unique Collectibles";
15543-
"Gifts.Demo.Description" = "Telegram Gifts are collectible items you can trade or showcase on your profile.";
15544-
"Gifts.Demo.Unique.Title" = "Unique";
15545-
"Gifts.Demo.Unique.Text" = "Upgrade your gifts to get a unique number, model, backdrop and symbol.";
15546-
"Gifts.Demo.Tradable.Title" = "Tradable";
15547-
"Gifts.Demo.Tradable.Text" = "Sell your gift on Telegram or on third-party NFT marketplaces.";
15548-
"Gifts.Demo.Wearable.Title" = "Wearable";
15549-
"Gifts.Demo.Wearable.Text" = "Display gifts on your page and set them as profile covers or statuses.";
15550-
"Gifts.Demo.Understood" = "Understood";
15542+
"Gift.Demo.Title" = "Unique Collectibles";
15543+
"Gift.Demo.Description" = "Telegram Gifts are collectible items you can trade or showcase on your profile.";
15544+
"Gift.Demo.Unique.Title" = "Unique";
15545+
"Gift.Demo.Unique.Text" = "Upgrade your gifts to get a unique number, model, backdrop and symbol.";
15546+
"Gift.Demo.Tradable.Title" = "Tradable";
15547+
"Gift.Demo.Tradable.Text" = "Sell your gift on Telegram or on third-party NFT marketplaces.";
15548+
"Gift.Demo.Wearable.Title" = "Wearable";
15549+
"Gift.Demo.Wearable.Text" = "Display gifts on your page and set them as profile covers or statuses.";
15550+
"Gift.Demo.Understood" = "Understood";
15551+
15552+
"Gift.Variants.RandomTraits" = "Random Traits";
15553+
"Gift.Variants.SelectedTraits" = "Selected Traits";
15554+
"Gift.Variants.Randomize" = "Randomize Traits";
15555+
"Gift.Variants.Model" = "model";
15556+
"Gift.Variants.Backdrop" = "backdrop";
15557+
"Gift.Variants.Symbol" = "symbol";
15558+
"Gift.Variants.Models" = "Models";
15559+
"Gift.Variants.Backdrops" = "Backdrops";
15560+
"Gift.Variants.Symbols" = "Symbols";
15561+
15562+
"Gift.Variants.CollectionInfo" = "This collection features";
15563+
"Gift.Variants.CollectionInfo.Model_1" = "%@ unique model";
15564+
"Gift.Variants.CollectionInfo.Model_any" = "%@ unique models";
15565+
"Gift.Variants.CollectionInfo.Backdrop_1" = "%@ unique backdrop";
15566+
"Gift.Variants.CollectionInfo.Backdrop_any" = "%@ unique backdrops";
15567+
"Gift.Variants.CollectionInfo.Symbol_1" = "%@ unique symbol";
15568+
"Gift.Variants.CollectionInfo.Symbol_any" = "%@ unique symbols";
15569+
15570+
"Gift.Auction.GiftAuction" = "Upcoming Auction";
15571+
"Gift.Auction.UpcomingAuction" = "Upcoming Auction";
15572+
"Gift.Auction.LearnMore" = "Learn more about Telegram Gifts >";
15573+
15574+
"Gift.AuctionBid.UpcomingTitle" = "Place an Early Bid";
15575+
15576+
"Gift.View.Context.BuyOffer" = "Offer to Buy";
15577+
15578+
"Gift.Offer.Title" = "Offer to Buy";
15579+
"Gift.Offer.OfferStars" = "Offer Stars";
15580+
"Gift.Offer.OfferTon" = "Offer TON";
15581+
"Gift.Offer.PriceSectionStars" = "STARS TO OFFER";
15582+
"Gift.Offer.PriceSectionTon" = "TON TO OFFER";
15583+
"Gift.Offer.PricePlaceholder" = "Price";
15584+
"Gift.Offer.PriceDescriptionStars" = "Enter the number of Stars you'd like to offer for **%@**.";
15585+
"Gift.Offer.PriceDescriptionTon" = "Enter the number of TON you'd like to offer for **%@**.";
15586+
"Gift.Offer.Duration" = "Offer Duration";
15587+
"Gift.Offer.DurationDescriptionStars" = "Choose how long **%@** can accept your offer. When the time expires, your Stars will be automatically refunded.";
15588+
"Gift.Offer.DurationDescriptionTon" = "Choose how long **%@** can accept your offer. When the time expires, your TON will be automatically refunded.";
15589+
"Gift.Offer.Duration.Hours_1" = "%@ Hour";
15590+
"Gift.Offer.Duration.Hours_any" = "%@ Hours";
15591+
"Gift.Offer.Offer" = "Offer";
15592+
15593+
15594+
"Notification.StarGift.Sold" = "sold";

submodules/TelegramUI/Components/Chat/ChatMessageGiftBubbleContentNode/Sources/ChatMessageGiftBubbleContentNode.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -717,8 +717,7 @@ public class ChatMessageGiftBubbleContentNode: ChatMessageBubbleContentNode {
717717
}
718718
text = isStoryEntity ? "**\(item.presentationData.strings.Notification_StarGift_Collectible) #\(formatCollectibleNumber(uniqueGift.number, dateTimeFormat: item.presentationData.dateTimeFormat))**" : "**\(uniqueGift.title) #\(formatCollectibleNumber(uniqueGift.number, dateTimeFormat: item.presentationData.dateTimeFormat))**"
719719
if fromOffer {
720-
//TODO:localize
721-
ribbonTitle = incoming ? "" : "sold"
720+
ribbonTitle = incoming ? "" : item.presentationData.strings.Notification_StarGift_Sold
722721
customRibbonColors = [UIColor(rgb: 0xd9433a), UIColor(rgb: 0xff645b)]
723722
} else {
724723
ribbonTitle = isStoryEntity ? "" : item.presentationData.strings.Notification_StarGift_Gift

submodules/TelegramUI/Components/Gifts/GiftDemoScreen/Sources/GiftDemoScreen.swift

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ private final class DemoSheetContent: CombinedComponent {
316316
playOnce: state.playButtonAnimation
317317
))))
318318
buttonTitle.append(AnyComponentWithIdentity(id: 1, component: AnyComponent(ButtonTextContentComponent(
319-
text: strings.Gifts_Demo_Understood,
319+
text: strings.Gift_Demo_Understood,
320320
badge: 0,
321321
textColor: theme.list.itemCheckColors.foregroundColor,
322322
badgeBackground: theme.list.itemCheckColors.foregroundColor,
@@ -497,7 +497,7 @@ private final class GiftDemoListComponent: CombinedComponent {
497497
var contentSize = CGSize(width: context.availableSize.width, height: 32.0)
498498

499499
let title = title.update(
500-
component: MultilineTextComponent(text: .plain(NSAttributedString(string: strings.Gifts_Demo_Title, font: Font.bold(25.0), textColor: titleColor))),
500+
component: MultilineTextComponent(text: .plain(NSAttributedString(string: strings.Gift_Demo_Title, font: Font.bold(25.0), textColor: titleColor))),
501501
availableSize: context.availableSize,
502502
transition: context.transition
503503
)
@@ -509,7 +509,7 @@ private final class GiftDemoListComponent: CombinedComponent {
509509

510510
let description = description.update(
511511
component: BalancedTextComponent(
512-
text: .plain(NSAttributedString(string: strings.Gifts_Demo_Description, font: Font.regular(15.0), textColor: textColor)),
512+
text: .plain(NSAttributedString(string: strings.Gift_Demo_Description, font: Font.regular(15.0), textColor: textColor)),
513513
horizontalAlignment: .center,
514514
maximumNumberOfLines: 0,
515515
lineSpacing: 0.2
@@ -528,9 +528,9 @@ private final class GiftDemoListComponent: CombinedComponent {
528528
AnyComponentWithIdentity(
529529
id: "unique",
530530
component: AnyComponent(InfoParagraphComponent(
531-
title: strings.Gifts_Demo_Unique_Title,
531+
title: strings.Gift_Demo_Unique_Title,
532532
titleColor: titleColor,
533-
text: strings.Gifts_Demo_Unique_Text,
533+
text: strings.Gift_Demo_Unique_Text,
534534
textColor: textColor,
535535
accentColor: iconColor,
536536
iconName: "Premium/Collectible/Unique",
@@ -542,9 +542,9 @@ private final class GiftDemoListComponent: CombinedComponent {
542542
AnyComponentWithIdentity(
543543
id: "tradable",
544544
component: AnyComponent(InfoParagraphComponent(
545-
title: strings.Gifts_Demo_Tradable_Title,
545+
title: strings.Gift_Demo_Tradable_Title,
546546
titleColor: titleColor,
547-
text: strings.Gifts_Demo_Tradable_Text,
547+
text: strings.Gift_Demo_Tradable_Text,
548548
textColor: textColor,
549549
accentColor: iconColor,
550550
iconName: "Premium/Collectible/Transferable",
@@ -556,9 +556,9 @@ private final class GiftDemoListComponent: CombinedComponent {
556556
AnyComponentWithIdentity(
557557
id: "wearable",
558558
component: AnyComponent(InfoParagraphComponent(
559-
title: strings.Gifts_Demo_Wearable_Title,
559+
title: strings.Gift_Demo_Wearable_Title,
560560
titleColor: titleColor,
561-
text: strings.Gifts_Demo_Wearable_Text,
561+
text: strings.Gift_Demo_Wearable_Text,
562562
textColor: textColor,
563563
accentColor: iconColor,
564564
iconName: "Premium/Collectible/Tradable",

submodules/TelegramUI/Components/Gifts/GiftViewScreen/Sources/GiftAuctionBidScreen.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2697,8 +2697,7 @@ private final class GiftAuctionBidScreenComponent: Component {
26972697

26982698
let titleString: String
26992699
if isUpcoming {
2700-
//TODO:localize
2701-
titleString = "Place an Early Bid"
2700+
titleString = environment.strings.Gift_AuctionBid_UpcomingTitle
27022701
} else {
27032702
titleString = environment.strings.Gift_AuctionBid_Title
27042703
}

submodules/TelegramUI/Components/Gifts/GiftViewScreen/Sources/GiftAuctionViewScreen.swift

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -677,8 +677,7 @@ private final class GiftAuctionViewSheetContent: CombinedComponent {
677677
)
678678
))
679679
} else {
680-
//TODO:localize
681-
descriptionText = isUpcoming ? "Upcoming Auction" : "Gift Auction"
680+
descriptionText = isUpcoming ? strings.Gift_Auction_UpcomingAuction : strings.Gift_Auction_GiftAuction
682681

683682
tableItems.append(.init(
684683
id: "start",
@@ -805,8 +804,7 @@ private final class GiftAuctionViewSheetContent: CombinedComponent {
805804
state.cachedSmallChevronImage = (generateTintedImage(image: UIImage(bundleImageName: "Item List/InlineTextRightArrow"), color: linkColor)!, theme)
806805
}
807806

808-
//TODO:localize
809-
let learnMoreAttributedString = parseMarkdownIntoAttributedString("Learn more about Telegram Gifts >", attributes: markdownAttributes, textAlignment: .center).mutableCopy() as! NSMutableAttributedString
807+
let learnMoreAttributedString = parseMarkdownIntoAttributedString(strings.Gift_Auction_LearnMore, attributes: markdownAttributes, textAlignment: .center).mutableCopy() as! NSMutableAttributedString
810808
if let range = learnMoreAttributedString.string.range(of: ">"), let chevronImage = state.cachedSmallChevronImage?.0 {
811809
learnMoreAttributedString.addAttribute(.attachment, value: chevronImage, range: NSRange(range, in: learnMoreAttributedString.string))
812810
}

submodules/TelegramUI/Components/Gifts/GiftViewScreen/Sources/GiftUpgradePreviewScreen.swift

Lines changed: 0 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -856,81 +856,6 @@ private final class GiftUpgradePreviewScreenComponent: Component {
856856
contentHeight += descriptionSize.height
857857
contentHeight += 26.0
858858

859-
860-
861-
862-
////
863-
//// var validKeys: Set<Int64> = Set()
864-
//// for auctionState in self.auctionStates {
865-
//// let id = auctionState.gift.giftId
866-
//// validKeys.insert(id)
867-
////
868-
//// let itemView: ComponentView<Empty>
869-
//// if let current = self.itemsViews[id] {
870-
//// itemView = current
871-
//// } else {
872-
//// itemView = ComponentView()
873-
//// self.itemsViews[id] = itemView
874-
//// }
875-
////
876-
//// let itemSize = itemView.update(
877-
//// transition: transition,
878-
//// component: AnyComponent(
879-
//// ActiveAuctionComponent(
880-
//// context: component.context,
881-
//// theme: theme,
882-
//// strings: environment.strings,
883-
//// dateTimeFormat: environment.dateTimeFormat,
884-
//// state: auctionState,
885-
//// currentTime: currentTime,
886-
//// action: { [weak self] in
887-
//// guard let self, let component = self.component else {
888-
//// return
889-
//// }
890-
//// if let giftAuctionsManager = component.context.giftAuctionsManager {
891-
//// let _ = (giftAuctionsManager.auctionContext(for: .giftId(id))
892-
//// |> deliverOnMainQueue).start(next: { [weak self] auction in
893-
//// guard let self, let component = self.component, let auction, let controller = environment.controller(), let navigationController = controller.navigationController as? NavigationController else {
894-
//// return
895-
//// }
896-
//// let bidController = component.context.sharedContext.makeGiftAuctionBidScreen(context: component.context, toPeerId: auction.currentBidPeerId ?? component.context.account.peerId, text: nil, entities: nil, hideName: false, auctionContext: auction, acquiredGifts: nil)
897-
//// navigationController.pushViewController(bidController)
898-
//// })
899-
//// }
900-
//// }
901-
//// )
902-
//// ),
903-
//// environment: {},
904-
//// containerSize: CGSize(width: availableSize.width - sideInset * 2.0, height: 1000.0)
905-
//// )
906-
//// let itemFrame = CGRect(origin: CGPoint(x: sideInset, y: contentHeight), size: itemSize)
907-
//// if let view = itemView.view {
908-
//// if view.superview == nil {
909-
//// self.scrollContentView.addSubview(view)
910-
//// }
911-
//// view.frame = itemFrame
912-
//// }
913-
//// contentHeight += itemSize.height
914-
//// contentHeight += 20.0
915-
//// }
916-
//// contentHeight -= 10.0
917-
//
918-
// var removeKeys: [Int64] = []
919-
// for (id, item) in self.itemsViews {
920-
// if !validKeys.contains(id) {
921-
// removeKeys.append(id)
922-
//
923-
// if let itemView = item.view {
924-
// transition.setAlpha(view: itemView, alpha: 0.0, completion: { _ in
925-
// itemView.removeFromSuperview()
926-
// })
927-
// }
928-
// }
929-
// }
930-
// for id in removeKeys {
931-
// self.itemsViews.removeValue(forKey: id)
932-
// }
933-
934859
if self.backgroundHandleView.image == nil {
935860
self.backgroundHandleView.image = generateStretchableFilledCircleImage(diameter: 5.0, color: .white)?.withRenderingMode(.alwaysTemplate)
936861
}

submodules/TelegramUI/Components/Gifts/GiftViewScreen/Sources/GiftViewScreen.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1438,9 +1438,8 @@ private final class GiftViewSheetContent: CombinedComponent {
14381438
self?.shareGift()
14391439
})))
14401440

1441-
//TODO:localize
14421441
if case let .unique(uniqueGift) = arguments.gift, case let .peerId(ownerPeerId) = uniqueGift.owner, ownerPeerId != self.context.account.peerId, uniqueGift.minOfferStars != nil {
1443-
items.append(.action(ContextMenuActionItem(text: "Offer to Buy", icon: { theme in
1442+
items.append(.action(ContextMenuActionItem(text: presentationData.strings.Gift_View_Context_BuyOffer, icon: { theme in
14441443
return generateTintedImage(image: UIImage(bundleImageName: "Media Grid/Paid"), color: theme.contextMenu.primaryColor)
14451444
}, action: { [weak self] c, _ in
14461445
c?.dismiss(completion: nil)

0 commit comments

Comments
 (0)