Browse Source

added send money recipt lanauages

pull/1/head
gme_2 6 years ago
parent
commit
070a416ae0
  1. 10
      GMERemittance/Extension/UIViewControllerExtension.swift
  2. 10
      GMERemittance/Module/SendMoney/SendMoneyPaymentMode/User Interface/View/SendMoneyPaymentModeViewController.swift

10
GMERemittance/Extension/UIViewControllerExtension.swift

@ -50,7 +50,7 @@ extension UIViewController {
confirmAction() confirmAction()
} }
let cancelAction = UIAlertAction(title: "Cancel", style: .cancel) { action -> Void in
let cancelAction = UIAlertAction(title: "cancel_text".localized(), style: .cancel) { action -> Void in
} }
@ -60,20 +60,20 @@ extension UIViewController {
self.present(deleteActionSheetController, animated: true, completion: nil) self.present(deleteActionSheetController, animated: true, completion: nil)
} }
func alert(message: String?, title: String? = "Alert!", okAction: (()->())? = nil) {
func alert(message: String?, title: String? = "alert_text".localized(), okAction: (()->())? = nil) {
let alertController = getAlert(message: message, title: title) let alertController = getAlert(message: message, title: title)
alertController.addAction(title: "Ok", handler: okAction)
alertController.addAction(title: "ok_text".localized(), handler: okAction)
self.present(alertController, animated: true, completion: nil) self.present(alertController, animated: true, completion: nil)
} }
func alertWithOkCancel(message: String?, title: String? = "Error", okTitle: String? = "Ok", style: UIAlertControllerStyle? = .alert, cancelTitle: String? = "Cancel", OkStyle: UIAlertActionStyle = .default, cancelStyle: UIAlertActionStyle = .default, okAction: (()->())? = nil, cancelAction: (()->())? = nil) {
func alertWithOkCancel(message: String?, title: String? = "Error", okTitle: String? = "ok_text".localized(), style: UIAlertControllerStyle? = .alert, cancelTitle: String? = "cancel_text".localized(), OkStyle: UIAlertActionStyle = .default, cancelStyle: UIAlertActionStyle = .default, okAction: (()->())? = nil, cancelAction: (()->())? = nil) {
let alertController = getAlert(message: message, title: title, style: style) let alertController = getAlert(message: message, title: title, style: style)
alertController.addAction(title: okTitle,style: OkStyle, handler: okAction) alertController.addAction(title: okTitle,style: OkStyle, handler: okAction)
alertController.addAction(title: cancelTitle, style: cancelStyle, handler: cancelAction) alertController.addAction(title: cancelTitle, style: cancelStyle, handler: cancelAction)
self.present(alertController, animated: true, completion: nil) self.present(alertController, animated: true, completion: nil)
} }
func alertWithOk(message: String?, title: String? = "Error", okTitle: String? = "Ok", style: UIAlertControllerStyle? = .alert, OkStyle: UIAlertActionStyle = .default, okAction: (()->())? = nil) {
func alertWithOk(message: String?, title: String? = "Error", okTitle: String? = "ok_text".localized(), style: UIAlertControllerStyle? = .alert, OkStyle: UIAlertActionStyle = .default, okAction: (()->())? = nil) {
let alertController = getAlert(message: message, title: title, style: style) let alertController = getAlert(message: message, title: title, style: style)
alertController.addAction(title: okTitle,style: OkStyle, handler: okAction) alertController.addAction(title: okTitle,style: OkStyle, handler: okAction)
self.present(alertController, animated: true, completion: nil) self.present(alertController, animated: true, completion: nil)

10
GMERemittance/Module/SendMoney/SendMoneyPaymentMode/User Interface/View/SendMoneyPaymentModeViewController.swift

@ -157,7 +157,7 @@ class SendMoneyPaymentModeViewController: UIViewController {
var callingApi = false var callingApi = false
var errors = "" var errors = ""
if self.selectedPayoutMode == nil { if self.selectedPayoutMode == nil {
self.show(error: "please select Payment mode")
self.show(error: "payment_mode_empty_error".localized())
return return
} }
@ -165,13 +165,13 @@ class SendMoneyPaymentModeViewController: UIViewController {
let bank = bankTextField.text! let bank = bankTextField.text!
if bank.isEmpty { if bank.isEmpty {
shouldGoNextPage = false shouldGoNextPage = false
errors = errors + " " + Constants.validationErrorMessageBank
errors = errors + " " + "bank_empty_error".localized()
}else { }else {
if shouldValidateBranch() { if shouldValidateBranch() {
let branch = self.branchTextField.text! let branch = self.branchTextField.text!
if branch.isEmpty { if branch.isEmpty {
shouldGoNextPage = false shouldGoNextPage = false
errors = errors + " " + Constants.validationErrorMessageBranch
errors = errors + " " + "branch_empty_error".localized()
} }
} }
@ -181,7 +181,7 @@ class SendMoneyPaymentModeViewController: UIViewController {
let accountNumber = self.accountTextField.text! let accountNumber = self.accountTextField.text!
if accountNumber.isEmpty { if accountNumber.isEmpty {
shouldGoNextPage = false shouldGoNextPage = false
errors = errors + " " + Constants.validationErrorMessageAccountNumber
errors = errors + " " + "account_number_empty_error".localized()
} }
} }
@ -189,7 +189,7 @@ class SendMoneyPaymentModeViewController: UIViewController {
let accountNumber = self.accountTextField.text! let accountNumber = self.accountTextField.text!
if accountNumber.isEmpty { if accountNumber.isEmpty {
shouldGoNextPage = false shouldGoNextPage = false
errors = errors + " " + Constants.validationErrorMessageAccountNumber
errors = errors + " " + "account_number_empty_error".localized()
}else { }else {
let validationRequest = SendMoneyAccountValidationRequestModel() let validationRequest = SendMoneyAccountValidationRequestModel()
validationRequest.idType = "1" validationRequest.idType = "1"

Loading…
Cancel
Save