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";
|
||||
|
||||
"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 {
|
||||
let tipTitle: String
|
||||
//TODO:localize
|
||||
tipTitle = "Tip (Optional)"
|
||||
tipTitle = presentationData.strings.Checkout_OptionalTipItem
|
||||
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)
|
||||
}))
|
||||
@ -1090,10 +1089,9 @@ final class BotCheckoutControllerNode: ItemListControllerNode, PKPaymentAuthoriz
|
||||
if let tipAmount = strongSelf.currentTipAmount {
|
||||
totalAmount += tipAmount
|
||||
|
||||
//TODO:localize
|
||||
if let fractional = currencyToFractionalAmount(value: tipAmount, currency: paymentForm.invoice.currency) {
|
||||
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()))
|
||||
|
||||
//TODO:localize
|
||||
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()))
|
||||
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()))
|
||||
|
||||
return (ListViewItemNodeLayout(contentSize: contentSize, insets: insets), { [weak self] in
|
||||
if let strongSelf = self {
|
||||
|
||||
@ -208,8 +208,7 @@ private func botReceiptControllerEntries(presentationData: PresentationData, inv
|
||||
}
|
||||
|
||||
if let tipAmount = tipAmount, tipAmount != 0 {
|
||||
//TODO:localize
|
||||
entries.append(.price(index, presentationData.theme, "Tip", formatCurrencyAmount(tipAmount, currency: formInvoice.currency), index == 0, false))
|
||||
entries.append(.price(index, presentationData.theme, presentationData.strings.Checkout_TipItem, formatCurrencyAmount(tipAmount, currency: formInvoice.currency), index == 0, false))
|
||||
totalPrice += tipAmount
|
||||
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 var contentRect: CGRect = CGRect()
|
||||
private(set) var naturalContentFrame: CGRect?
|
||||
|
||||
fileprivate let gesture: PinchSourceGesture
|
||||
fileprivate var panGesture: UIPanGestureRecognizer?
|
||||
|
||||
public var isPinchGestureEnabled: Bool = false {
|
||||
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) {
|
||||
let contentFrame = CGRect(origin: CGPoint(), size: size)
|
||||
self.naturalContentFrame = contentFrame
|
||||
@ -290,10 +298,10 @@ private final class PinchControllerNode: ViewControllerTracingNode {
|
||||
)
|
||||
|
||||
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)
|
||||
|
||||
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