mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-11-29 03:21:29 +00:00
Update localization
This commit is contained in:
parent
6e5e365d40
commit
dedf348e37
@ -6378,3 +6378,7 @@ Sorry for the inconvenience.";
|
|||||||
"VoiceChat.CancelConfirmationEnd" = "Cancel";
|
"VoiceChat.CancelConfirmationEnd" = "Cancel";
|
||||||
|
|
||||||
"Checkout.PaymentLiabilityAlert" = "Neither Telegram, nor {target} will have access to your credit card information. Credit card details will be handled only by the payment system, {payment_system}.\n\nPayments will go directly to the developer of {target}. Telegram cannot provide any guarantees, so proceed at your own risk. In case of problems, please contact the developer of {target} or your bank.";
|
"Checkout.PaymentLiabilityAlert" = "Neither Telegram, nor {target} will have access to your credit card information. Credit card details will be handled only by the payment system, {payment_system}.\n\nPayments will go directly to the developer of {target}. Telegram cannot provide any guarantees, so proceed at your own risk. In case of problems, please contact the developer of {target} or your bank.";
|
||||||
|
|
||||||
|
"Checkout.OptionalTipItem" = "Tip (Optional)";
|
||||||
|
"Checkout.TipItem" = "Tip";
|
||||||
|
"Checkout.OptionalTipItemPlaceholder" = "Enter Custom";
|
||||||
|
|||||||
@ -329,8 +329,7 @@ private func botCheckoutControllerEntries(presentationData: PresentationData, st
|
|||||||
|
|
||||||
if let tip = paymentForm.invoice.tip {
|
if let tip = paymentForm.invoice.tip {
|
||||||
let tipTitle: String
|
let tipTitle: String
|
||||||
//TODO:localize
|
tipTitle = presentationData.strings.Checkout_OptionalTipItem
|
||||||
tipTitle = "Tip (Optional)"
|
|
||||||
entries.append(.tip(index, presentationData.theme, tipTitle, paymentForm.invoice.currency, "\(formatCurrencyAmount(currentTip ?? 0, currency: paymentForm.invoice.currency))", currentTip ?? 0, tip.max, tip.suggested.map { item -> (String, Int64) in
|
entries.append(.tip(index, presentationData.theme, tipTitle, paymentForm.invoice.currency, "\(formatCurrencyAmount(currentTip ?? 0, currency: paymentForm.invoice.currency))", currentTip ?? 0, tip.max, tip.suggested.map { item -> (String, Int64) in
|
||||||
return ("\(formatCurrencyAmount(item, currency: paymentForm.invoice.currency))", item)
|
return ("\(formatCurrencyAmount(item, currency: paymentForm.invoice.currency))", item)
|
||||||
}))
|
}))
|
||||||
@ -1090,10 +1089,9 @@ final class BotCheckoutControllerNode: ItemListControllerNode, PKPaymentAuthoriz
|
|||||||
if let tipAmount = strongSelf.currentTipAmount {
|
if let tipAmount = strongSelf.currentTipAmount {
|
||||||
totalAmount += tipAmount
|
totalAmount += tipAmount
|
||||||
|
|
||||||
//TODO:localize
|
|
||||||
if let fractional = currencyToFractionalAmount(value: tipAmount, currency: paymentForm.invoice.currency) {
|
if let fractional = currencyToFractionalAmount(value: tipAmount, currency: paymentForm.invoice.currency) {
|
||||||
let amount = NSDecimalNumber(value: fractional)
|
let amount = NSDecimalNumber(value: fractional)
|
||||||
items.append(PKPaymentSummaryItem(label: "Tip", amount: amount))
|
items.append(PKPaymentSummaryItem(label: strongSelf.presentationData.strings.Checkout_TipItem, amount: amount))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -234,8 +234,7 @@ class BotCheckoutTipItemNode: ListViewItemNode, UITextFieldDelegate {
|
|||||||
|
|
||||||
let (titleLayout, titleApply) = makeTitleLayout(TextNodeLayoutArguments(attributedString: NSAttributedString(string: item.title, font: textFont, textColor: textColor), backgroundColor: nil, maximumNumberOfLines: 1, truncationType: .end, constrainedSize: CGSize(width: params.width - params.leftInset - params.rightInset - 20.0, height: CGFloat.greatestFiniteMagnitude), alignment: .natural, cutout: nil, insets: UIEdgeInsets()))
|
let (titleLayout, titleApply) = makeTitleLayout(TextNodeLayoutArguments(attributedString: NSAttributedString(string: item.title, font: textFont, textColor: textColor), backgroundColor: nil, maximumNumberOfLines: 1, truncationType: .end, constrainedSize: CGSize(width: params.width - params.leftInset - params.rightInset - 20.0, height: CGFloat.greatestFiniteMagnitude), alignment: .natural, cutout: nil, insets: UIEdgeInsets()))
|
||||||
|
|
||||||
//TODO:localize
|
let (labelLayout, labelApply) = makeLabelLayout(TextNodeLayoutArguments(attributedString: NSAttributedString(string: item.strings.Checkout_OptionalTipItemPlaceholder, font: textFont, textColor: textColor.withMultipliedAlpha(0.8)), backgroundColor: nil, maximumNumberOfLines: 1, truncationType: .end, constrainedSize: CGSize(width: params.width - params.leftInset - params.rightInset - 20.0, height: CGFloat.greatestFiniteMagnitude), alignment: .natural, cutout: nil, insets: UIEdgeInsets()))
|
||||||
let (labelLayout, labelApply) = makeLabelLayout(TextNodeLayoutArguments(attributedString: NSAttributedString(string: "Enter Custom", font: textFont, textColor: textColor.withMultipliedAlpha(0.8)), backgroundColor: nil, maximumNumberOfLines: 1, truncationType: .end, constrainedSize: CGSize(width: params.width - params.leftInset - params.rightInset - 20.0, height: CGFloat.greatestFiniteMagnitude), alignment: .natural, cutout: nil, insets: UIEdgeInsets()))
|
|
||||||
|
|
||||||
return (ListViewItemNodeLayout(contentSize: contentSize, insets: insets), { [weak self] in
|
return (ListViewItemNodeLayout(contentSize: contentSize, insets: insets), { [weak self] in
|
||||||
if let strongSelf = self {
|
if let strongSelf = self {
|
||||||
|
|||||||
@ -208,8 +208,7 @@ private func botReceiptControllerEntries(presentationData: PresentationData, inv
|
|||||||
}
|
}
|
||||||
|
|
||||||
if let tipAmount = tipAmount, tipAmount != 0 {
|
if let tipAmount = tipAmount, tipAmount != 0 {
|
||||||
//TODO:localize
|
entries.append(.price(index, presentationData.theme, presentationData.strings.Checkout_TipItem, formatCurrencyAmount(tipAmount, currency: formInvoice.currency), index == 0, false))
|
||||||
entries.append(.price(index, presentationData.theme, "Tip", formatCurrencyAmount(tipAmount, currency: formInvoice.currency), index == 0, false))
|
|
||||||
totalPrice += tipAmount
|
totalPrice += tipAmount
|
||||||
index += 1
|
index += 1
|
||||||
}
|
}
|
||||||
|
|||||||
@ -144,12 +144,13 @@ private func cancelContextGestures(view: UIView) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public final class PinchSourceContainerNode: ASDisplayNode {
|
public final class PinchSourceContainerNode: ASDisplayNode, UIGestureRecognizerDelegate {
|
||||||
public let contentNode: ASDisplayNode
|
public let contentNode: ASDisplayNode
|
||||||
public var contentRect: CGRect = CGRect()
|
public var contentRect: CGRect = CGRect()
|
||||||
private(set) var naturalContentFrame: CGRect?
|
private(set) var naturalContentFrame: CGRect?
|
||||||
|
|
||||||
fileprivate let gesture: PinchSourceGesture
|
fileprivate let gesture: PinchSourceGesture
|
||||||
|
fileprivate var panGesture: UIPanGestureRecognizer?
|
||||||
|
|
||||||
public var isPinchGestureEnabled: Bool = false {
|
public var isPinchGestureEnabled: Bool = false {
|
||||||
didSet {
|
didSet {
|
||||||
@ -217,6 +218,13 @@ public final class PinchSourceContainerNode: ASDisplayNode {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@objc private func panGestureRecognized(_ recognizer: UIPanGestureRecognizer) {
|
||||||
|
}
|
||||||
|
|
||||||
|
public func gestureRecognizer(_ gestureRecognizer: UIGestureRecognizer, shouldRecognizeSimultaneouslyWith otherGestureRecognizer: UIGestureRecognizer) -> Bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
public func update(size: CGSize, transition: ContainedViewLayoutTransition) {
|
public func update(size: CGSize, transition: ContainedViewLayoutTransition) {
|
||||||
let contentFrame = CGRect(origin: CGPoint(), size: size)
|
let contentFrame = CGRect(origin: CGPoint(), size: size)
|
||||||
self.naturalContentFrame = contentFrame
|
self.naturalContentFrame = contentFrame
|
||||||
@ -290,10 +298,10 @@ private final class PinchControllerNode: ViewControllerTracingNode {
|
|||||||
)
|
)
|
||||||
|
|
||||||
var transform = CATransform3DIdentity
|
var transform = CATransform3DIdentity
|
||||||
|
transform = CATransform3DTranslate(transform, offset.x - pinchOffset.x * (scale - 1.0), offset.y - pinchOffset.y * (scale - 1.0), 0.0)
|
||||||
transform = CATransform3DScale(transform, scale, scale, 0.0)
|
transform = CATransform3DScale(transform, scale, scale, 0.0)
|
||||||
|
|
||||||
strongSelf.sourceNode.contentNode.transform = transform
|
strongSelf.sourceNode.contentNode.transform = transform
|
||||||
strongSelf.sourceNode.contentNode.position = CGPoint(x: initialSourceFrame.midX + offset.x - pinchOffset.x * (scale - 1.0), y: initialSourceFrame.midY + offset.y - pinchOffset.y * (scale - 1.0))
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user