From 070a416ae07d8711c41e7b8aeb003e3697734be9 Mon Sep 17 00:00:00 2001 From: gme_2 Date: Wed, 13 Feb 2019 11:44:54 +0900 Subject: [PATCH] added send money recipt lanauages --- .../Extension/UIViewControllerExtension.swift | 10 +++++----- .../View/SendMoneyPaymentModeViewController.swift | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/GMERemittance/Extension/UIViewControllerExtension.swift b/GMERemittance/Extension/UIViewControllerExtension.swift index 74ec95dd..34537ff7 100644 --- a/GMERemittance/Extension/UIViewControllerExtension.swift +++ b/GMERemittance/Extension/UIViewControllerExtension.swift @@ -50,7 +50,7 @@ extension UIViewController { 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) } - 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) - alertController.addAction(title: "Ok", handler: okAction) + alertController.addAction(title: "ok_text".localized(), handler: okAction) 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) alertController.addAction(title: okTitle,style: OkStyle, handler: okAction) alertController.addAction(title: cancelTitle, style: cancelStyle, handler: cancelAction) 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) alertController.addAction(title: okTitle,style: OkStyle, handler: okAction) self.present(alertController, animated: true, completion: nil) diff --git a/GMERemittance/Module/SendMoney/SendMoneyPaymentMode/User Interface/View/SendMoneyPaymentModeViewController.swift b/GMERemittance/Module/SendMoney/SendMoneyPaymentMode/User Interface/View/SendMoneyPaymentModeViewController.swift index facbcc31..43d8de2b 100644 --- a/GMERemittance/Module/SendMoney/SendMoneyPaymentMode/User Interface/View/SendMoneyPaymentModeViewController.swift +++ b/GMERemittance/Module/SendMoney/SendMoneyPaymentMode/User Interface/View/SendMoneyPaymentModeViewController.swift @@ -157,7 +157,7 @@ class SendMoneyPaymentModeViewController: UIViewController { var callingApi = false var errors = "" if self.selectedPayoutMode == nil { - self.show(error: "please select Payment mode") + self.show(error: "payment_mode_empty_error".localized()) return } @@ -165,13 +165,13 @@ class SendMoneyPaymentModeViewController: UIViewController { let bank = bankTextField.text! if bank.isEmpty { shouldGoNextPage = false - errors = errors + " " + Constants.validationErrorMessageBank + errors = errors + " " + "bank_empty_error".localized() }else { if shouldValidateBranch() { let branch = self.branchTextField.text! if branch.isEmpty { shouldGoNextPage = false - errors = errors + " " + Constants.validationErrorMessageBranch + errors = errors + " " + "branch_empty_error".localized() } } @@ -181,7 +181,7 @@ class SendMoneyPaymentModeViewController: UIViewController { let accountNumber = self.accountTextField.text! if accountNumber.isEmpty { 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! if accountNumber.isEmpty { shouldGoNextPage = false - errors = errors + " " + Constants.validationErrorMessageAccountNumber + errors = errors + " " + "account_number_empty_error".localized() }else { let validationRequest = SendMoneyAccountValidationRequestModel() validationRequest.idType = "1"