Refactor string generation

This commit is contained in:
Ali
2021-07-20 11:57:50 +02:00
parent bbd096d88b
commit 7bed1728bb
205 changed files with 15848 additions and 33988 deletions

View File

@@ -971,7 +971,7 @@ final class BotCheckoutControllerNode: ItemListControllerNode, PKPaymentAuthoriz
let totalAmount = currentTotalPrice(paymentForm: self.paymentFormValue, validatedFormInfo: self.currentValidatedFormInfo, currentShippingOptionId: self.currentShippingOptionId, currentTip: self.currentTipAmount)
let payString: String
if let paymentForm = self.paymentFormValue, totalAmount > 0 {
payString = self.presentationData.strings.Checkout_PayPrice(formatCurrencyAmount(totalAmount, currency: paymentForm.invoice.currency)).0
payString = self.presentationData.strings.Checkout_PayPrice(formatCurrencyAmount(totalAmount, currency: paymentForm.invoice.currency)).string
} else {
payString = self.presentationData.strings.CheckoutInfo_Pay
}
@@ -1324,12 +1324,12 @@ final class BotCheckoutControllerNode: ItemListControllerNode, PKPaymentAuthoriz
let alertText: String
if requiresBiometrics {
if let biometricAuthentication = LocalAuth.biometricAuthentication, case .faceId = biometricAuthentication {
alertText = strongSelf.presentationData.strings.Checkout_SavePasswordTimeoutAndFaceId(durationString).0
alertText = strongSelf.presentationData.strings.Checkout_SavePasswordTimeoutAndFaceId(durationString).string
} else {
alertText = strongSelf.presentationData.strings.Checkout_SavePasswordTimeoutAndTouchId(durationString).0
alertText = strongSelf.presentationData.strings.Checkout_SavePasswordTimeoutAndTouchId(durationString).string
}
} else {
alertText = strongSelf.presentationData.strings.Checkout_SavePasswordTimeout(durationString).0
alertText = strongSelf.presentationData.strings.Checkout_SavePasswordTimeout(durationString).string
}
strongSelf.present(textAlertController(context: strongSelf.context, title: nil, text: alertText, actions: [