mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-05 05:51:42 +00:00
Fix localization
This commit is contained in:
parent
76ff4e5dd9
commit
985a8f9135
@ -7621,8 +7621,8 @@ Sorry for the inconvenience.";
|
|||||||
"Premium.Avatar" = "Animated Profile Pictures";
|
"Premium.Avatar" = "Animated Profile Pictures";
|
||||||
"Premium.AvatarInfo" = "Video avatars animated in chat lists and chats to allow for additional self-expression.";
|
"Premium.AvatarInfo" = "Video avatars animated in chat lists and chats to allow for additional self-expression.";
|
||||||
|
|
||||||
"Premium.AppIcon" = "App Icons";
|
"Premium.AppIcon" = "Telegram App Icon";
|
||||||
"Premium.AppIconInfo" = "Additional app icons description goes here.";
|
"Premium.AppIconInfo" = "Choose from a selection of Telegram app icons for your homescreen.";
|
||||||
|
|
||||||
"Premium.AppIconStandalone" = "Additional App Icons";
|
"Premium.AppIconStandalone" = "Additional App Icons";
|
||||||
"Premium.AppIconStandaloneInfo" = "Unlock a wider range of app icons by subscribing to **Telegram Premium**.";
|
"Premium.AppIconStandaloneInfo" = "Unlock a wider range of app icons by subscribing to **Telegram Premium**.";
|
||||||
|
|||||||
@ -37,23 +37,31 @@ final class AppIconsDemoComponent: Component {
|
|||||||
public final class View: UIView {
|
public final class View: UIView {
|
||||||
private var component: AppIconsDemoComponent?
|
private var component: AppIconsDemoComponent?
|
||||||
|
|
||||||
|
private var containerView: UIView
|
||||||
private var imageViews: [UIImageView] = []
|
private var imageViews: [UIImageView] = []
|
||||||
|
|
||||||
|
private var isVisible = false
|
||||||
|
|
||||||
|
public override init(frame: CGRect) {
|
||||||
|
self.containerView = UIView()
|
||||||
|
self.containerView.clipsToBounds = true
|
||||||
|
|
||||||
|
super.init(frame: frame)
|
||||||
|
|
||||||
|
self.addSubview(self.containerView)
|
||||||
|
}
|
||||||
|
|
||||||
|
required init?(coder: NSCoder) {
|
||||||
|
fatalError("init(coder:) has not been implemented")
|
||||||
|
}
|
||||||
|
|
||||||
public func update(component: AppIconsDemoComponent, availableSize: CGSize, environment: Environment<DemoPageEnvironment>, transition: Transition) -> CGSize {
|
public func update(component: AppIconsDemoComponent, availableSize: CGSize, environment: Environment<DemoPageEnvironment>, transition: Transition) -> CGSize {
|
||||||
// let isDisplaying = environment[DemoPageEnvironment.self].isDisplaying
|
let isDisplaying = environment[DemoPageEnvironment.self].isDisplaying
|
||||||
|
|
||||||
// if self.node == nil {
|
|
||||||
// let node = StickersCarouselNode(
|
|
||||||
// context: component.context,
|
|
||||||
// stickers: component.stickers
|
|
||||||
// )
|
|
||||||
// self.node = node
|
|
||||||
// self.addSubnode(node)
|
|
||||||
// }
|
|
||||||
|
|
||||||
// let isFirstTime = self.component == nil
|
|
||||||
self.component = component
|
self.component = component
|
||||||
|
|
||||||
|
self.containerView.frame = CGRect(origin: .zero, size: availableSize)
|
||||||
|
|
||||||
if self.imageViews.isEmpty {
|
if self.imageViews.isEmpty {
|
||||||
for icon in component.appIcons {
|
for icon in component.appIcons {
|
||||||
if let image = UIImage(named: icon.imageName, in: getAppBundle(), compatibleWith: nil) {
|
if let image = UIImage(named: icon.imageName, in: getAppBundle(), compatibleWith: nil) {
|
||||||
@ -61,7 +69,7 @@ final class AppIconsDemoComponent: Component {
|
|||||||
imageView.clipsToBounds = true
|
imageView.clipsToBounds = true
|
||||||
imageView.layer.cornerRadius = 24.0
|
imageView.layer.cornerRadius = 24.0
|
||||||
imageView.image = image
|
imageView.image = image
|
||||||
self.addSubview(imageView)
|
self.containerView.addSubview(imageView)
|
||||||
|
|
||||||
self.imageViews.append(imageView)
|
self.imageViews.append(imageView)
|
||||||
}
|
}
|
||||||
@ -92,37 +100,46 @@ final class AppIconsDemoComponent: Component {
|
|||||||
|
|
||||||
if let _ = transition.userData(DemoAnimateInTransition.self), abs(mappedPosition) < .ulpOfOne {
|
if let _ = transition.userData(DemoAnimateInTransition.self), abs(mappedPosition) < .ulpOfOne {
|
||||||
Queue.mainQueue().after(0.1) {
|
Queue.mainQueue().after(0.1) {
|
||||||
var i = 0
|
self.animateIn(availableSize: availableSize)
|
||||||
for view in self.imageViews {
|
|
||||||
let from: CGPoint
|
|
||||||
let delay: Double
|
|
||||||
switch i {
|
|
||||||
case 0:
|
|
||||||
from = CGPoint(x: -availableSize.width * 0.333, y: -availableSize.height * 0.8)
|
|
||||||
delay = 0.1
|
|
||||||
case 1:
|
|
||||||
from = CGPoint(x: -availableSize.width * 0.75, y: availableSize.height * 0.75)
|
|
||||||
delay = 0.15
|
|
||||||
case 2:
|
|
||||||
from = CGPoint(x: availableSize.width * 0.9, y: availableSize.height * 0.0)
|
|
||||||
delay = 0.0
|
|
||||||
default:
|
|
||||||
from = CGPoint(x: availableSize.width * 0.5, y: availableSize.height * 0.5)
|
|
||||||
delay = 0.0
|
|
||||||
}
|
|
||||||
view.layer.animateScale(from: 3.0, to: 1.0, duration: 0.5, delay: delay, timingFunction: kCAMediaTimingFunctionSpring)
|
|
||||||
view.layer.animatePosition(from: from, to: CGPoint(), duration: 0.5, delay: delay, timingFunction: kCAMediaTimingFunctionSpring, additive: true)
|
|
||||||
|
|
||||||
i += 1
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if isDisplaying && !self.isVisible {
|
||||||
|
// var fast = false
|
||||||
|
// if let _ = transition.userData(DemoAnimateInTransition.self) {
|
||||||
|
// fast = true
|
||||||
|
// }
|
||||||
|
self.animateIn(availableSize: availableSize)
|
||||||
|
}
|
||||||
|
self.isVisible = isDisplaying
|
||||||
|
|
||||||
return availableSize
|
return availableSize
|
||||||
}
|
}
|
||||||
|
|
||||||
func animateIn() {
|
func animateIn(availableSize: CGSize) {
|
||||||
|
var i = 0
|
||||||
|
for view in self.imageViews {
|
||||||
|
let from: CGPoint
|
||||||
|
let delay: Double
|
||||||
|
switch i {
|
||||||
|
case 0:
|
||||||
|
from = CGPoint(x: -availableSize.width * 0.333, y: -availableSize.height * 0.8)
|
||||||
|
delay = 0.1
|
||||||
|
case 1:
|
||||||
|
from = CGPoint(x: -availableSize.width * 0.75, y: availableSize.height * 0.75)
|
||||||
|
delay = 0.15
|
||||||
|
case 2:
|
||||||
|
from = CGPoint(x: availableSize.width * 0.9, y: availableSize.height * 0.0)
|
||||||
|
delay = 0.0
|
||||||
|
default:
|
||||||
|
from = CGPoint(x: availableSize.width * 0.5, y: availableSize.height * 0.5)
|
||||||
|
delay = 0.0
|
||||||
|
}
|
||||||
|
view.layer.animateScale(from: 3.0, to: 1.0, duration: 0.5, delay: delay, timingFunction: kCAMediaTimingFunctionSpring)
|
||||||
|
view.layer.animatePosition(from: from, to: CGPoint(), duration: 0.5, delay: delay, timingFunction: kCAMediaTimingFunctionSpring, additive: true)
|
||||||
|
|
||||||
|
i += 1
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -942,19 +942,18 @@ private final class PremiumIntroScreenContentComponent: CombinedComponent {
|
|||||||
size.height += text.size.height
|
size.height += text.size.height
|
||||||
size.height += 21.0
|
size.height += 21.0
|
||||||
|
|
||||||
let gradientColors: [(UIColor, UIColor)] = [
|
let gradientColors: [UIColor] = [
|
||||||
(UIColor(rgb: 0xF28528), UIColor(rgb: 0xEF7633)),
|
UIColor(rgb: 0xF27C30),
|
||||||
(UIColor(rgb: 0xEA5F43), UIColor(rgb: 0xE7504E)),
|
UIColor(rgb: 0xE36850),
|
||||||
(UIColor(rgb: 0xDE4768), UIColor(rgb: 0xD54D82)),
|
UIColor(rgb: 0xD15078),
|
||||||
(UIColor(rgb: 0xDE4768), UIColor(rgb: 0xD54D82)),
|
UIColor(rgb: 0xC14998),
|
||||||
(UIColor(rgb: 0xC654A8), UIColor(rgb: 0xBE5AC2)),
|
UIColor(rgb: 0xB24CB5),
|
||||||
(UIColor(rgb: 0xAF62E9), UIColor(rgb: 0xA668FF)),
|
UIColor(rgb: 0xA34ED0),
|
||||||
(UIColor(rgb: 0x9674FF), UIColor(rgb: 0x8C7DFF)),
|
UIColor(rgb: 0x9054E9),
|
||||||
(UIColor(rgb: 0x9674FF), UIColor(rgb: 0x8C7DFF)),
|
UIColor(rgb: 0x7561EB),
|
||||||
(UIColor(rgb: 0x7B88FF), UIColor(rgb: 0x7091FF)),
|
UIColor(rgb: 0x5A6EEE),
|
||||||
(UIColor(rgb: 0x609DFF), UIColor(rgb: 0x56A5FF)),
|
UIColor(rgb: 0x548DFF),
|
||||||
|
UIColor(rgb: 0x54A3FF)
|
||||||
(UIColor(rgb: 0x609DFF), UIColor(rgb: 0x56A5FF))
|
|
||||||
]
|
]
|
||||||
|
|
||||||
var items: [SectionGroupComponent.Item] = []
|
var items: [SectionGroupComponent.Item] = []
|
||||||
@ -976,8 +975,7 @@ private final class PremiumIntroScreenContentComponent: CombinedComponent {
|
|||||||
PerkComponent(
|
PerkComponent(
|
||||||
iconName: perk.iconName,
|
iconName: perk.iconName,
|
||||||
iconBackgroundColors: [
|
iconBackgroundColors: [
|
||||||
iconBackgroundColors.0,
|
iconBackgroundColors
|
||||||
iconBackgroundColors.1
|
|
||||||
],
|
],
|
||||||
title: perk.title(strings: strings),
|
title: perk.title(strings: strings),
|
||||||
titleColor: titleColor,
|
titleColor: titleColor,
|
||||||
|
|||||||
@ -92,7 +92,6 @@ final class ReactionsCarouselComponent: Component {
|
|||||||
|
|
||||||
private let itemSize = CGSize(width: 110.0, height: 110.0)
|
private let itemSize = CGSize(width: 110.0, height: 110.0)
|
||||||
|
|
||||||
//private let order = ["👌","😍","🤡","🕊","🥱","🥴"]
|
|
||||||
private let order = ["😍","👌","🥴","🐳","🥱","🕊","🤡"]
|
private let order = ["😍","👌","🥴","🐳","🥱","🕊","🤡"]
|
||||||
|
|
||||||
private class ReactionCarouselNode: ASDisplayNode, UIScrollViewDelegate {
|
private class ReactionCarouselNode: ASDisplayNode, UIScrollViewDelegate {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user