From 31cc103a88c0e05453f99d062672f9043ce1ddab Mon Sep 17 00:00:00 2001 From: gme_2 Date: Mon, 25 Feb 2019 18:34:19 +0900 Subject: [PATCH] language added for russia --- .../View/SplashScreenViewController.swift | 74 ++++++++++--------- GMERemittance/Utility/AppConstants.swift | 3 +- ru-RU.lproj/Localizable.strings | 13 ++++ th.lproj/Localizable.strings | 2 +- 4 files changed, 55 insertions(+), 37 deletions(-) diff --git a/GMERemittance/Module/SplashScreen/User Interface/View/SplashScreenViewController.swift b/GMERemittance/Module/SplashScreen/User Interface/View/SplashScreenViewController.swift index 7a29427a..805f3c2c 100644 --- a/GMERemittance/Module/SplashScreen/User Interface/View/SplashScreenViewController.swift +++ b/GMERemittance/Module/SplashScreen/User Interface/View/SplashScreenViewController.swift @@ -15,11 +15,11 @@ import DTTJailbreakDetection class SplashScreenViewController: UIViewController { struct StringConstants { - let descriptionFirst = "hassle_free_transfer_text".localized() - let descriptionSecond = "connect_local_community_text".localized() - let descriptionThird = "earn_reward_point_text".localized() - let loginText = "login_text".localized() - let newUserText = "new_user_text".localized() + let descriptionFirst = "hassle_free_transfer_text".localized() + let descriptionSecond = "connect_local_community_text".localized() + let descriptionThird = "earn_reward_point_text".localized() + let loginText = "login_text".localized() + let newUserText = "new_user_text".localized() } // MARK: IBOutlets @@ -53,7 +53,7 @@ class SplashScreenViewController: UIViewController { let imageThird = UIImage(named: "ic_splashThirdScreen") var languageIndex = 0 - + var languages: [SendMoneyCountryViewModel] = [] var selectedLanguage: SendMoneyCountryViewModel? { didSet { @@ -63,27 +63,31 @@ class SplashScreenViewController: UIViewController { if code == "lk" { Localize.setCurrentLanguage("si") }else - - if code == "kh" { - Localize.setCurrentLanguage("km") - }else - - if code == "kr" { - Localize.setCurrentLanguage("ko") - }else - - if code == "mm" { - Localize.setCurrentLanguage("my") - }else - if code == "bd" { - Localize.setCurrentLanguage("bn") - } - else + if code == "kh" { + Localize.setCurrentLanguage("km") + }else - if code == "np" { - Localize.setCurrentLanguage("ne") - } + if code == "kr" { + Localize.setCurrentLanguage("ko") + }else + + if code == "mm" { + Localize.setCurrentLanguage("my") + }else + + if code == "bd" { + Localize.setCurrentLanguage("bn") + } + else + + if code == "np" { + Localize.setCurrentLanguage("ne") + } + + if code == "ru" { + Localize.setCurrentLanguage("ru-RU") + } else { Localize.setCurrentLanguage(code) } @@ -95,7 +99,7 @@ class SplashScreenViewController: UIViewController { var presenter: SplashScreenModuleInterface? - + // MARK: VC's Life cycle override func viewDidLoad() { @@ -167,13 +171,13 @@ class SplashScreenViewController: UIViewController { self.languageBackGroundView.clipsToBounds = true self.languageBackGroundView.layer.addShadow(offset: CGSize.init(width: 2, height: 2)) NotificationCenter.default.addObserver(self, selector: #selector(setText), name: NSNotification.Name(LCLLanguageChangeNotification), object: nil) - + configureTimer() setupLanguages() configureLanguage() } - + @objc func setText() { self.buttonLogin.setTitle("login_text".localized(), for: .normal) self.buttonSignUp.setTitle("new_user_text".localized(), for: .normal) @@ -181,8 +185,8 @@ class SplashScreenViewController: UIViewController { setImageandLabels() } - func setupLanguages() { - + func setupLanguages() { + self.languages = Utility.getLanguages() } @@ -233,12 +237,12 @@ class SplashScreenViewController: UIViewController { imageViewHomeLogo.image = imageFirst labelHomeDescription.text = StringConstants().descriptionFirst case 1: - + imageViewDotCenter.image = imageDotSelected imageViewHomeLogo.image = imageSecond labelHomeDescription.text = StringConstants().descriptionSecond case 2: - + imageViewDotRight.image = imageDotSelected imageViewHomeLogo.image = imageThird labelHomeDescription.text = StringConstants().descriptionThird @@ -258,7 +262,7 @@ class SplashScreenViewController: UIViewController { self.view.backgroundColor = AppConstants.themeRedColor self.buttonSignUp.backgroundColor = AppConstants.themeDarkRedColor self.buttonLogin.backgroundColor = AppConstants.themeBlueColor -// self.buttonSignUp.backgroundColor = AppConstants.themeBlueColor + // self.buttonSignUp.backgroundColor = AppConstants.themeBlueColor } private func setupTimer() { @@ -304,8 +308,8 @@ class SplashScreenViewController: UIViewController { viewcontroller.type = PickerTitle.country self.present(viewcontroller, animated: true, completion: nil) } - - + + func countrySelected(models: [SendMoneyCountryViewModel]) { self.selectedLanguage = models.first } diff --git a/GMERemittance/Utility/AppConstants.swift b/GMERemittance/Utility/AppConstants.swift index cba53ad5..c77d6102 100644 --- a/GMERemittance/Utility/AppConstants.swift +++ b/GMERemittance/Utility/AppConstants.swift @@ -307,7 +307,8 @@ extension Utility { let russian = SendMoneyCountryViewModel() russian.name = "russian_langugae_text".localized() - russian.id = "russian_langugae_text" + russian.id = "русский" + russian.title = "русский" russian.code = "ru" let vietnam = SendMoneyCountryViewModel() diff --git a/ru-RU.lproj/Localizable.strings b/ru-RU.lproj/Localizable.strings index 05a53136..02013b7b 100644 --- a/ru-RU.lproj/Localizable.strings +++ b/ru-RU.lproj/Localizable.strings @@ -372,3 +372,16 @@ "language_text" = "язык"; +"korean_language_text" = "한국어"; +"cambodia_lanugage_text" = "ភាសាខ្មែរ"; +"srilanka_lanugage_text" = "සිංහල"; +"myanmar_language_text" = "မြန်မာ"; +"russian_langugae_text" = "русский"; +"vietnam_language_text" = "Tiếng Việt"; +"thailand_language_text" = "ไทย"; +"indonesia_language_text" = "bahasa Indonesia"; +"mongolia_language_text" = "Монгол хэл дээр"; +"nepali_language_text" = "नेपाली"; +"bengali_language_text" = "বাংলা"; +"uzbek_language_text" = "O'zbek"; +"english_language_text" = "English"; diff --git a/th.lproj/Localizable.strings b/th.lproj/Localizable.strings index 81b87880..0292c768 100644 --- a/th.lproj/Localizable.strings +++ b/th.lproj/Localizable.strings @@ -5,7 +5,7 @@ "earn_reward_point_text" = "สะสมคะแนนแลกของรางวัลมากมาย"; "login_title_text" = "ยินดีต้อนรับสู่ Global Money Express"; -"login_subtitle_text" = "เข้าสู่ระบบด้วยอีเมล์หรือหมายเลขโทรศัพท์"; +"login_subtitle_text" = "เข้าสู่ระบบด้วยอีเมล์"; "login_user_id_text" = "ชื่อผู้ใช้งาน"; "user_Id_placeholder_text" = "ลงทะเบียนด้วยอีเมล์หรือหมายเลขโทรศัพท์มือถือ"; "password_text" = "รหัสผ่าน";