Browse Source

picker title multilanguaged managed

pull/1/head
gme_2 6 years ago
parent
commit
33cc3a41e5
  1. 29
      GMERemittance/Library/CurrencyPicker/CurrencyPickerViewController.swift
  2. 1
      GMERemittance/Library/ItemPickerView/ItemsPicker.storyboard
  3. 26
      GMERemittance/Library/ItemPickerView/ItemsPickerViewController.swift
  4. 16
      GMERemittance/Module/SendMoney/SendMoneyPaymentMode/User Interface/View/BankBranchPicker/BankBranchPickerViewController.swift
  5. 14
      GMERemittance/Module/SendMoney/SendMoneyPaymentMode/User Interface/View/ViewModels/BankPicker/BankPickerViewController.swift

29
GMERemittance/Library/CurrencyPicker/CurrencyPickerViewController.swift

@ -79,7 +79,34 @@ class CurrencyPickerViewController: UIViewController {
}
private func setTitle() {
self.titleLabel.text = (self.type?.rawValue ?? "").capitalized
var text = ""
guard let type = type else {return}
switch type {
case .bank:
text = "select_currency_text".localized()
case .branch:
text = "select_branch_text".localized()
case .country:
text = "select_country_text".localized()
case .currency:
text = "search_currency_text".localized()
case .district:
text = "select_district_text".localized()
case .occupation:
text = "select_occupation_text".localized()
case .relation:
text = "select_relation_text".localized()
case .sourceOfFund:
text = "select_source_of_fund_text"
case .state:
text = "province_placeholder_text".localized()
case .transferReasons:
text = "select_transfer_reason_text".localized()
case .verificationIdTypes:
text = "verification_id_placeholder_text".localized()
}
self.titleLabel.text = text.capitalized
}
private func setupPlaces() {

1
GMERemittance/Library/ItemPickerView/ItemsPicker.storyboard

@ -238,6 +238,7 @@
<viewLayoutGuide key="safeArea" id="3CD-ye-gKy"/>
</view>
<connections>
<outlet property="cancelButton" destination="lZH-8y-Kpf" id="BPI-5G-BUB"/>
<outlet property="mainview" destination="IA2-r7-puo" id="pHW-C8-CNR"/>
<outlet property="noResultFoundLabel" destination="bAs-K2-xyK" id="JiR-4m-mFb"/>
<outlet property="searchTextField" destination="Sm6-Yq-rdj" id="trG-eX-b0i"/>

26
GMERemittance/Library/ItemPickerView/ItemsPickerViewController.swift

@ -9,6 +9,14 @@ import UIKit
class ItemsPickerViewController: UIViewController {
struct StringConstants {
static let searchPlaceholder = "search_currency_text".localized()
static let cancelText = "cancel_text".localized()
static let titleText = "select_currency_text".localized()
static let emptyText = "no_currency_found_text".localized()
}
struct Constants {
static let seperatorColor = "#DFDFDF"
static let tintColor = UIColor.red
@ -23,6 +31,7 @@ class ItemsPickerViewController: UIViewController {
@IBOutlet weak var noResultFoundLabel: UILabel!
@IBOutlet weak var mainview: UIView!
@IBOutlet weak var cancelButton: UIButton!
@ -57,18 +66,19 @@ class ItemsPickerViewController: UIViewController {
}
func configureLanguage() {
// doing doind doingi
self.titleLabel.text = StringConstants.titleText
self.searchTextField.placeholder = StringConstants.searchPlaceholder
self.cancelButton.setTitle(StringConstants.cancelText, for: .normal)
}
private func setNoResultText() {
var text = ""
if let type = self.type {
text = "No matching \(type.rawValue) found for "
} else {
text = "No matching result found for "
}
self.noResultFoundLabel.text = text + "'\(searchText)'"
self.noResultFoundLabel.text = StringConstants.emptyText
}
private func setTitle() {
self.titleLabel.text = "Select " + (self.type?.rawValue ?? "Location").capitalized
self.titleLabel.text = type?.rawValue
}
private func setupPlaces() {

16
GMERemittance/Module/SendMoney/SendMoneyPaymentMode/User Interface/View/BankBranchPicker/BankBranchPickerViewController.swift

@ -12,6 +12,13 @@ import UIKit
class BankBranchPickerViewController: UIViewController {
struct StringConstants {
static let searchPlaceholder = "search_currency_text".localized()
static let cancelText = "cancel_text".localized()
static let titleText = "select_currency_text".localized()
static let emptyText = "no_currency_found_text".localized()
}
struct Constants {
static let seperatorColor = "#DFDFDF"
static let tintColor = UIColor.red
@ -68,13 +75,8 @@ class BankBranchPickerViewController: UIViewController {
private func setNoResultText() {
var text = ""
if let type = self.type {
text = "No matching \(type.rawValue) found for "
} else {
text = "No matching result found for "
}
self.noResultFoundLabel.text = text + "'\(searchText)'"
self.noResultFoundLabel.text = StringConstants.emptyText
}
private func setupTarget() {

14
GMERemittance/Module/SendMoney/SendMoneyPaymentMode/User Interface/View/ViewModels/BankPicker/BankPickerViewController.swift

@ -11,6 +11,10 @@ import UIKit
class BankPickerViewController: UIViewController {
struct StringConstants {
static let emptyText = "no_currency_found_text".localized()
}
struct Constants {
static let seperatorColor = "#DFDFDF"
static let tintColor = UIColor.red
@ -61,17 +65,11 @@ class BankPickerViewController: UIViewController {
private func setNoResultText() {
var text = ""
if let type = self.type {
text = "No matching \(type.rawValue) found for "
} else {
text = "No matching result found for "
}
self.noResultFoundLabel.text = text + "'\(searchText)'"
self.noResultFoundLabel.text = StringConstants.emptyText
}
private func setTitle() {
self.titleLabel.text = "Select " + (self.type?.rawValue ?? "Location").capitalized
self.titleLabel.text = (self.type?.rawValue ?? "").capitalized
}
private func setupPlaces() {

Loading…
Cancel
Save