Browse Source

nepali language added

pull/1/head
gme_2 6 years ago
parent
commit
bf0455938f
  1. 8
      GMERemittance/Module/ResendExchange/Application Logic/Interactor/ResendExchangeInteractor.swift
  2. 10
      GMERemittance/Module/SendMoney/SendMoneyVerification/User Interface/View/SendMoneyVerificationViewController.swift
  3. 9
      GMERemittance/Module/SendMoneyCode/Application Logic/Interactor/SendMoneyCodeInteractor.swift
  4. 5
      GMERemittance/Module/SendMoneyCode/Application Logic/Interactor/SendMoneyCodeInteractorIO.swift
  5. 28
      GMERemittance/Module/SendMoneyCode/Application Logic/Service/SendMoneyCodeService.swift
  6. 30
      GMERemittance/Module/SendMoneyCode/Application Logic/Service/SendMoneyCodeServiceType.swift
  7. 1
      GMERemittance/Module/SendMoneyCode/Module Interface/SendMoneyCodeModuleInterface.swift
  8. 15
      GMERemittance/Module/SendMoneyCode/User Interface/Presenter/SendMoneyCodePresenter.swift
  9. 29
      GMERemittance/Module/SendMoneyCode/User Interface/View/SendMoneyCodeViewController.swift
  10. 4
      GMERemittance/Module/SendMoneyCode/User Interface/View/SendMoneyCodeViewInterface.swift
  11. 21
      ne.lproj/Localizable.strings

8
GMERemittance/Module/ResendExchange/Application Logic/Interactor/ResendExchangeInteractor.swift

@ -58,7 +58,7 @@ extension ResendExchangeInteractor: ResendExchangeInteractorInput {
func calculate(senderAmt: String, senderCurrency: String, recieverAmt: String, recieverCurrency: String, recieverCountryName: String, recieverCountryId: String, paymentMethod: String, paymentMethodId: String, calcBy: String, senderCountryId: String, payoutPartner: String, userId: String, bankId: String) { func calculate(senderAmt: String, senderCurrency: String, recieverAmt: String, recieverCurrency: String, recieverCountryName: String, recieverCountryId: String, paymentMethod: String, paymentMethodId: String, calcBy: String, senderCountryId: String, payoutPartner: String, userId: String, bankId: String) {
let param: [String: String] =
var param: [String: String] =
[ [
ApiConstants.senderAmount : senderAmt, ApiConstants.senderAmount : senderAmt,
ApiConstants.senderCurrency : senderCurrency, ApiConstants.senderCurrency : senderCurrency,
@ -70,11 +70,15 @@ extension ResendExchangeInteractor: ResendExchangeInteractorInput {
ApiConstants.paymentMethodId: paymentMethodId, ApiConstants.paymentMethodId: paymentMethodId,
ApiConstants.calcBy : calcBy, ApiConstants.calcBy : calcBy,
ApiConstants.senderCountryId : senderCountryId, ApiConstants.senderCountryId : senderCountryId,
ApiConstants.payOutPartner : payoutPartner,
// ApiConstants.payOutPartner : payoutPartner,
ApiConstants.userId : userId, ApiConstants.userId : userId,
ApiConstants.bankId : bankId ApiConstants.bankId : bankId
] ]
if !payoutPartner.isEmpty {
param[ApiConstants.payOutPartner] = payoutPartner
}
self.service.calculate(params: param, success: { (model) in self.service.calculate(params: param, success: { (model) in
guard let model = model else {return} guard let model = model else {return}
self.output?.show(model: model) self.output?.show(model: model)

10
GMERemittance/Module/SendMoney/SendMoneyVerification/User Interface/View/SendMoneyVerificationViewController.swift

@ -231,7 +231,7 @@ class SendMoneyVerificationViewController: UITableViewController {
} }
func otpEntered(otp: String) { func otpEntered(otp: String) {
self.encryptedNumber = otp
self.password = otp
} }
// start keyboard // start keyboard
@ -316,11 +316,17 @@ extension SendMoneyVerificationViewController: SendMoneyVerificationViewInterfac
} }
func showLoading() { func showLoading() {
self.hudDelegate?.showLoading()
if let _ = hudDelegate {
self.hudDelegate?.showLoading()
}else {
self.showProgressHud()
}
} }
func hideLoading() { func hideLoading() {
self.hudDelegate?.hideLoading() self.hudDelegate?.hideLoading()
self.hideProgressHud()
} }
} }

9
GMERemittance/Module/SendMoneyCode/Application Logic/Interactor/SendMoneyCodeInteractor.swift

@ -27,5 +27,12 @@ class SendMoneyCodeInteractor {
// MARK: SendMoneyCode interactor input interface // MARK: SendMoneyCode interactor input interface
extension SendMoneyCodeInteractor: SendMoneyCodeInteractorInput { extension SendMoneyCodeInteractor: SendMoneyCodeInteractorInput {
func viewIsReady() {
let customerId = Utility.getMyUserName()
self.service.requestOtp(customerId: customerId, success: { (message) in
self.output?.show(message: message)
}) { (error) in
self.output?.show(error: error)
}
}
} }

5
GMERemittance/Module/SendMoneyCode/Application Logic/Interactor/SendMoneyCodeInteractorIO.swift

@ -7,9 +7,10 @@
// //
protocol SendMoneyCodeInteractorInput: class { protocol SendMoneyCodeInteractorInput: class {
func viewIsReady()
} }
protocol SendMoneyCodeInteractorOutput: class { protocol SendMoneyCodeInteractorOutput: class {
func show(message: String)
func show(error: Error)
} }

28
GMERemittance/Module/SendMoneyCode/Application Logic/Service/SendMoneyCodeService.swift

@ -7,7 +7,6 @@
// //
import Foundation import Foundation
import Alamofire
class SendMoneyCodeService: SendMoneyCodeServiceType { class SendMoneyCodeService: SendMoneyCodeServiceType {
@ -18,30 +17,3 @@ class SendMoneyCodeService: SendMoneyCodeServiceType {
// MARK: Data management // MARK: Data management
} }
protocol OtpCodeRequestApiService: ApiServiceType {
func requestOtp(customerId: String, success: @escaping (String) -> (), failure: @escaping (Error) -> ())
}
extension OtpCodeRequestApiService {
func requestOtp(customerId: String, success: @escaping (String) -> (), failure: @escaping (Error) -> ()) {
let url = baseUrl + "v2/kftc/GetOTP/\(customerId)"
auth.request(method: .post, url: url, params: nil, encoding: JSONEncoding.default, success: { (response: SuccessMessageContainer) in
if (response.errorCode ?? "") == "1" {
let error = NSError.init(domain: "Network", code: 0, userInfo: [NSLocalizedDescriptionKey : response.message ?? ""])
failure(error)
}else {
let model = response.message
success(model ?? "")
}
}) { (error) in
failure(error)
}
}
}
//api/v2/kftc/GetOTP/saroj.chalise@gmail.com

30
GMERemittance/Module/SendMoneyCode/Application Logic/Service/SendMoneyCodeServiceType.swift

@ -7,7 +7,35 @@
// //
import Foundation import Foundation
import Alamofire
protocol SendMoneyCodeServiceType: class {
protocol SendMoneyCodeServiceType: class, OtpCodeRequestApiService {
} }
protocol OtpCodeRequestApiService: ApiServiceType {
func requestOtp(customerId: String, success: @escaping (String) -> (), failure: @escaping (Error) -> ())
}
extension OtpCodeRequestApiService {
func requestOtp(customerId: String, success: @escaping (String) -> (), failure: @escaping (Error) -> ()) {
let url = baseUrl + "v2/kftc/GetOTP/\(customerId)"
auth.request(method: .post, url: url, params: nil, encoding: JSONEncoding.default, success: { (response: SuccessMessageContainer) in
if (response.errorCode ?? "") == "1" {
let error = NSError.init(domain: "Network", code: 0, userInfo: [NSLocalizedDescriptionKey : response.message ?? ""])
failure(error)
}else {
let model = response.message
success(model ?? "")
}
}) { (error) in
failure(error)
}
}
}

1
GMERemittance/Module/SendMoneyCode/Module Interface/SendMoneyCodeModuleInterface.swift

@ -8,4 +8,5 @@
protocol SendMoneyCodeModuleInterface: class { protocol SendMoneyCodeModuleInterface: class {
func viewIsReady()
} }

15
GMERemittance/Module/SendMoneyCode/User Interface/Presenter/SendMoneyCodePresenter.swift

@ -22,11 +22,22 @@ class SendMoneyCodePresenter {
// MARK: SendMoneyCode module interface // MARK: SendMoneyCode module interface
extension SendMoneyCodePresenter: SendMoneyCodeModuleInterface { extension SendMoneyCodePresenter: SendMoneyCodeModuleInterface {
func viewIsReady() {
self.view?.showLoading()
interactor?.viewIsReady()
}
} }
// MARK: SendMoneyCode interactor output interface // MARK: SendMoneyCode interactor output interface
extension SendMoneyCodePresenter: SendMoneyCodeInteractorOutput { extension SendMoneyCodePresenter: SendMoneyCodeInteractorOutput {
func show(error: Error) {
self.view?.hideLoading()
self.view?.show(error: error.localizedDescription)
}
func show(message: String) {
self.view?.hideLoading()
self.view?.show(message: message)
}
} }

29
GMERemittance/Module/SendMoneyCode/User Interface/View/SendMoneyCodeViewController.swift

@ -191,15 +191,9 @@ class SendMoneyCodeViewController: UIViewController {
private func requestOtpCode() { private func requestOtpCode() {
// request otp // request otp
let customerId = Utility.getMyUserName()
self.showProgressHud()
self.requestOtp(customerId: customerId, success: { (message) in
self.hideProgressHud()
self.startTimer()
}) { (error) in
self.hideProgressHud()
self.alert(message: error.localizedDescription)
}
self.presenter?.viewIsReady()
self.startTimer()
} }
private func startTimer() { private func startTimer() {
@ -215,12 +209,27 @@ class SendMoneyCodeViewController: UIViewController {
private func requestOtpCodeRetryCount() { private func requestOtpCodeRetryCount() {
let _default = UserDefaults.standard let _default = UserDefaults.standard
// _default.set(PennyTestStatusCode.requested.rawValue, forKey: AppConstants.pennyTestStatusCode)\
} }
} }
// MARK: SendMoneyCodeViewInterface // MARK: SendMoneyCodeViewInterface
extension SendMoneyCodeViewController: SendMoneyCodeViewInterface { extension SendMoneyCodeViewController: SendMoneyCodeViewInterface {
func showLoading() {
self.showProgressHud()
}
func hideLoading() {
self.hideProgressHud()
}
func show(message: String) {
self.alert(message: message)
}
func show(error: String) {
self.alert(message: error)
}
} }

4
GMERemittance/Module/SendMoneyCode/User Interface/View/SendMoneyCodeViewInterface.swift

@ -7,4 +7,8 @@
// //
protocol SendMoneyCodeViewInterface: class { protocol SendMoneyCodeViewInterface: class {
func showLoading()
func hideLoading()
func show(message: String)
func show(error: String)
} }

21
ne.lproj/Localizable.strings

@ -392,3 +392,24 @@
"bengali_language_text" = "বাংলা"; "bengali_language_text" = "বাংলা";
"uzbek_language_text" = "O'zbek"; "uzbek_language_text" = "O'zbek";
"english_language_text" = "English"; "english_language_text" = "English";
"resend_money_text" = "पैसा पुन: पठाउनुहोस";
"resend_search_hint_text" = "GME नम्बर / पाउनेको नाम / बैंकको नाम ";
"support_description_text" = "हामी यहाँ सधैं हजुरहरुको मद्दतका लागि छौ ";
"your_request_text" = "यहाँ अनुरोध गर्नुहोस";
"subject_text" = "बिषय ";
"request_for_cancellation_text" = "रद्द गर्नको लागि अनुरोध ";
"request_for_amendment_text" = "संशोधन अनुरोध ";
"no_subject_error_text" = "कृपया एक विषय लेख्नुहोस";
"no_message_body_text" = "सन्देश लेख्नुहोस";
"no_control_id_error_text" = "GME नम्बर फेला परेन";
"no_transaction_id_error_text" = "कारोबर आईडी फेला परेन";
"account_no_validation_error_text" = "अवैध खाता नम्बर (केवल संख्या र अक्षरहरूलेख्न अनुमति दिइएको छ)";
"resend_code_text" = "फेरि प्रयास गर्नुहोस";
Loading…
Cancel
Save