多语言
This commit is contained in:
parent
fa0db110b6
commit
5f3deeb52d
@ -42,10 +42,10 @@ extension AppDelegate {
|
||||
view.show()
|
||||
|
||||
// let alert = UIAlertController(title: nil, message: "kAlertMessage_03".localized, preferredStyle: .alert)
|
||||
// alert.addAction(UIAlertAction(title: "Affirm".localized, style: .default, handler: { _ in
|
||||
// alert.addAction(UIAlertAction(title: "movia_affirm".localized, style: .default, handler: { _ in
|
||||
// SPAPPTool.openApnsSetting()
|
||||
// }))
|
||||
// alert.addAction(UIAlertAction(title: "Cancel".localized, style: .cancel))
|
||||
// alert.addAction(UIAlertAction(title: "movia_Cancel".localized, style: .cancel))
|
||||
//
|
||||
//
|
||||
// SPAPPTool.topViewController()?.present(alert, animated: true)
|
||||
|
@ -21,7 +21,7 @@ extension AppDelegate {
|
||||
|
||||
registAdjust()
|
||||
///设置刷新控件的语言
|
||||
MJRefreshConfig.default.languageCode = "en"
|
||||
MJRefreshConfig.default.languageCode = SPLocalizedManager.shared.mjLocalizedKey
|
||||
}
|
||||
|
||||
|
||||
|
@ -99,6 +99,8 @@ extension SceneDelegate {
|
||||
|
||||
///语言切换
|
||||
@objc private func localizedDidChange() {
|
||||
MJRefreshConfig.default.languageCode = SPLocalizedManager.shared.mjLocalizedKey
|
||||
|
||||
let tabBarController = SPTabBarController()
|
||||
SPAPPTool.mainTabBarController = tabBarController
|
||||
|
||||
|
@ -20,15 +20,15 @@ class SPTabBarController: UITabBarController {
|
||||
super.viewDidLoad()
|
||||
self.view.backgroundColor = .backgroundColor()
|
||||
|
||||
let nav1 = createNavigationController(viewController: SPHomeViewController(), title: "Home".localized, image: UIImage(named: "tabbar_icon_01"), selectedImage: UIImage(named: "tabbar_icon_01_selected"))
|
||||
let nav1 = createNavigationController(viewController: SPHomeViewController(), title: "movia_home".localized, image: UIImage(named: "tabbar_icon_01"), selectedImage: UIImage(named: "tabbar_icon_01_selected"))
|
||||
|
||||
let nav2 = createNavigationController(viewController: SPExplorePageController(), title: "For You".localized, image: UIImage(named: "tabbar_icon_02"), selectedImage: UIImage(named: "tabbar_icon_02_selected"))
|
||||
let nav2 = createNavigationController(viewController: SPExplorePageController(), title: "movia_for_you".localized, image: UIImage(named: "tabbar_icon_02"), selectedImage: UIImage(named: "tabbar_icon_02_selected"))
|
||||
|
||||
let nav3 = createNavigationController(viewController: SPMyListViewController(), title: "My list".localized, image: UIImage(named: "tabbar_icon_04"), selectedImage: UIImage(named: "tabbar_icon_04_selected"))
|
||||
let nav3 = createNavigationController(viewController: SPMyListViewController(), title: "movia_my_list".localized, image: UIImage(named: "tabbar_icon_04"), selectedImage: UIImage(named: "tabbar_icon_04_selected"))
|
||||
|
||||
let nav4 = createNavigationController(viewController: SPRewardsViewController(), title: "Rewards".localized, image: UIImage(named: "tabbar_icon_04"), selectedImage: UIImage(named: "tabbar_icon_04_selected"))
|
||||
|
||||
let nav5 = createNavigationController(viewController: SPMineViewController(), title: "Profile".localized, image: UIImage(named: "tabbar_icon_05"), selectedImage: UIImage(named: "tabbar_icon_05_selected"))
|
||||
let nav5 = createNavigationController(viewController: SPMineViewController(), title: "movia_profile".localized, image: UIImage(named: "tabbar_icon_05"), selectedImage: UIImage(named: "tabbar_icon_05_selected"))
|
||||
|
||||
self.viewControllers = [nav1, nav2, nav3, nav4, nav5]
|
||||
|
||||
|
@ -76,7 +76,7 @@ class SPNetwork: NSObject {
|
||||
var res = SPNetworkResponse<T>()
|
||||
res.code = -1
|
||||
if parameters.isToast {
|
||||
SPToast.show(text: "Error".localized)
|
||||
SPToast.show(text: "movia_error".localized)
|
||||
}
|
||||
completion?(res)
|
||||
} else {
|
||||
@ -128,7 +128,7 @@ class SPNetwork: NSObject {
|
||||
var res = SPNetworkResponse<T>()
|
||||
res.code = -1
|
||||
if parameters.isToast {
|
||||
SPToast.show(text: "Error".localized)
|
||||
SPToast.show(text: "movia_error".localized)
|
||||
}
|
||||
completion?(res)
|
||||
}
|
||||
@ -162,7 +162,7 @@ class SPNetwork: NSObject {
|
||||
} else {
|
||||
var response = SPNetworkResponse<T>()
|
||||
response.code = -1
|
||||
response.msg = "Error".localized
|
||||
response.msg = "movia_error".localized
|
||||
return response
|
||||
}
|
||||
}
|
||||
|
@ -17,7 +17,7 @@ class SPCampaignWebViewController: SPWebViewController {
|
||||
if urlStr == SPFeedBackListWebUrl {
|
||||
self.title = "Feedback History".localized
|
||||
} else if urlStr == SPFeedBackHomeWebUrl {
|
||||
self.title = "Feedback".localized
|
||||
self.title = "movia_profile_Feedback".localized
|
||||
} else if urlStr == SPFeedBackDetailWebUrl {
|
||||
self.title = "Feedback Details".localized
|
||||
} else if urlStr == SPRewardsWebUrl {
|
||||
|
@ -52,7 +52,7 @@ class SPWebViewController: SPViewController {
|
||||
let str: String = urlString
|
||||
|
||||
guard let url = URL(string: str) else { return }
|
||||
let request = URLRequest(url: url, cachePolicy: .reloadIgnoringLocalCacheData, timeoutInterval: 30)
|
||||
let request = URLRequest(url: url, timeoutInterval: 30)
|
||||
|
||||
self.webView.load(request)
|
||||
}
|
||||
|
@ -13,7 +13,7 @@ class SPAllShortViewController: SPViewController {
|
||||
private lazy var allCategoryModel: SPCategoryModel = {
|
||||
let model = SPCategoryModel()
|
||||
model.id = "0"
|
||||
model.name = "All".localized
|
||||
model.name = "movia_all".localized
|
||||
return model
|
||||
}()
|
||||
private lazy var categoryArr: [SPCategoryModel] = [self.allCategoryModel]
|
||||
|
@ -11,7 +11,7 @@ import UIKit
|
||||
class SPExplorePageController: SPViewController {
|
||||
|
||||
private lazy var titles: [String] = {
|
||||
let arr = ["Shorts".localized, "All".localized]
|
||||
let arr = ["movia_shorts".localized, "movia_all".localized]
|
||||
return arr
|
||||
}()
|
||||
|
||||
|
@ -52,7 +52,7 @@ class SPExplorePlayerControlView: SPPlayerControlView {
|
||||
|
||||
private lazy var allEpisodeButton: UIButton = {
|
||||
let button = JXButton(type: .custom)
|
||||
button.setTitle("Full Episodes".localized, for: .normal)
|
||||
button.setTitle("movia_full_episodes".localized, for: .normal)
|
||||
button.setTitleColor(.colorEC3324(), for: .normal)
|
||||
button.setImage(UIImage(named: "arrow_right_icon_01"), for: .normal)
|
||||
button.jx_font = .fontMedium(ofSize: 12)
|
||||
@ -74,8 +74,9 @@ class SPExplorePlayerControlView: SPPlayerControlView {
|
||||
}
|
||||
|
||||
private func updateEpisodeLabel() {
|
||||
let totalEpisode = String(format: "EP%@".localized, "\(self.shortModel?.episode_total ?? 0)")
|
||||
let currentEpisode = String(format: "EP%@".localized, self.videoInfo?.episode ?? "0")
|
||||
// let totalEpisode = String(format: "movia_text_episcode_ios".localized, "\(self.shortModel?.episode_total ?? 0)")
|
||||
let totalEpisode = "\(self.shortModel?.episode_total ?? 0)"
|
||||
let currentEpisode = String(format: "movia_text_episcode_ios".localized, self.videoInfo?.episode ?? "0")
|
||||
let episodeStr = "\(currentEpisode)/\(totalEpisode)"
|
||||
let range = NSRange(location: episodeStr.length() - totalEpisode.length(), length: totalEpisode.length())
|
||||
|
||||
|
@ -14,15 +14,16 @@ class SPHomePageController: SPViewController {
|
||||
///是否在请求中
|
||||
private var isRequesting = false
|
||||
|
||||
private lazy var categoryArr: [SPHomeCategoryModel] = {
|
||||
let arr = [
|
||||
SPHomeCategoryModel(category_name: "Hot Picks".localized, category_id: nil, viewController: SPHomeViewController()),
|
||||
SPHomeCategoryModel(category_name: "Top 10".localized, category_id: nil, viewController: nil),
|
||||
SPHomeCategoryModel(category_name: "Fresh Drops".localized, category_id: nil, viewController: nil),
|
||||
SPHomeCategoryModel(category_name: "Free".localized, category_id: nil, viewController: nil),
|
||||
]
|
||||
return arr
|
||||
}()
|
||||
private lazy var categoryArr: [SPHomeCategoryModel] = []
|
||||
// {
|
||||
// let arr = [
|
||||
// SPHomeCategoryModel(category_name: "Hot Picks".localized, category_id: nil, viewController: SPHomeViewController()),
|
||||
// SPHomeCategoryModel(category_name: "Top 10".localized, category_id: nil, viewController: nil),
|
||||
// SPHomeCategoryModel(category_name: "Fresh Drops".localized, category_id: nil, viewController: nil),
|
||||
// SPHomeCategoryModel(category_name: "Free".localized, category_id: nil, viewController: nil),
|
||||
// ]
|
||||
// return arr
|
||||
// }()
|
||||
|
||||
private lazy var searchButton: SPHomeSearchButton = {
|
||||
let button = SPHomeSearchButton()
|
||||
|
@ -42,7 +42,7 @@ class SPHomeDataItemView: UIView {
|
||||
|
||||
private lazy var moreButton: UIButton = {
|
||||
let button = UIButton(type: .custom)
|
||||
button.setTitle("More".localized, for: .normal)
|
||||
button.setTitle("movia_more".localized, for: .normal)
|
||||
button.setTitleColor(.colorF564B6(), for: .normal)
|
||||
button.titleLabel?.font = .fontLight(ofSize: 12)
|
||||
return button
|
||||
|
@ -62,7 +62,7 @@ class SPHomeExploreView: SPHomeDataItemView {
|
||||
|
||||
override init(frame: CGRect) {
|
||||
super.init(frame: frame)
|
||||
titleLabel.text = "Explore For You".localized
|
||||
titleLabel.text = "movia_explore_for_you".localized
|
||||
iconImageView.image = UIImage(named: "mark_icon_01")
|
||||
|
||||
_setupUI()
|
||||
|
@ -108,7 +108,7 @@ class SPHomeHeaderView: UICollectionReusableView {
|
||||
|
||||
private lazy var titleView: SPHomeDataItemView = {
|
||||
let view = SPHomeDataItemView()
|
||||
view.titleLabel.text = "More for you!".localized
|
||||
view.titleLabel.text = "movia_more_for_you".localized
|
||||
return view
|
||||
}()
|
||||
|
||||
|
@ -25,7 +25,7 @@ class SPHomeHotSearchView: UIView {
|
||||
let label = UILabel()
|
||||
label.font = .fontMedium(ofSize: 16)
|
||||
label.textColor = .colorFFFFFF()
|
||||
label.text = "Top Search".localized
|
||||
label.text = "movia_top_search".localized
|
||||
return label
|
||||
}()
|
||||
|
||||
|
@ -46,7 +46,7 @@ class SPHomeHotView: SPHomeDataItemView {
|
||||
|
||||
override init(frame: CGRect) {
|
||||
super.init(frame: frame)
|
||||
self.titleLabel.text = "Editor's Hotlist".localized
|
||||
self.titleLabel.text = "movia_editors_hotlist".localized
|
||||
_setupUI()
|
||||
}
|
||||
|
||||
|
@ -42,7 +42,7 @@ class SPHomePlayHistoryView: SPHomeDataItemView {
|
||||
|
||||
override init(frame: CGRect) {
|
||||
super.init(frame: frame)
|
||||
self.titleLabel.text = "Continue watching".localized
|
||||
self.titleLabel.text = "movia_continue_watching".localized
|
||||
|
||||
_setupUI()
|
||||
|
||||
|
@ -23,7 +23,7 @@ class SPHomeSearchButton: UIControl {
|
||||
let label = UILabel()
|
||||
label.font = .fontRegular(ofSize: 12)
|
||||
label.textColor = .colorFFFFFF(alpha: 0.52)
|
||||
label.text = "Love Me Like You Do It".localized
|
||||
label.text = "movia_search_tips".localized
|
||||
return label
|
||||
}()
|
||||
|
||||
|
@ -30,7 +30,7 @@ class SPHomeSearchHistoryView: UIView {
|
||||
let label = UILabel()
|
||||
label.font = .fontBold(ofSize: 16)
|
||||
label.textColor = .colorE7F5FF()
|
||||
label.text = "Historical search".localized
|
||||
label.text = "movia_Historical_search".localized
|
||||
return label
|
||||
}()
|
||||
|
||||
|
@ -43,7 +43,7 @@ class SPHomeShortsForYouView: SPHomeDataItemView {
|
||||
|
||||
override init(frame: CGRect) {
|
||||
super.init(frame: frame)
|
||||
self.titleLabel.text = "Shorts for You".localized
|
||||
self.titleLabel.text = "movia_shorts_for_you".localized
|
||||
|
||||
_setupUI()
|
||||
}
|
||||
|
@ -64,7 +64,7 @@ class SPHomeTrendingView: SPHomeDataItemView {
|
||||
override init(frame: CGRect) {
|
||||
super.init(frame: frame)
|
||||
|
||||
self.titleLabel.text = "Trending Now".localized
|
||||
self.titleLabel.text = "movia_trending_now".localized
|
||||
|
||||
_setupUI()
|
||||
}
|
||||
|
@ -42,8 +42,8 @@ class SPLoginViewController: SPViewController {
|
||||
|
||||
private lazy var agreementLabel: YYLabel = {
|
||||
let agreementStr = "kLoginAgreementText".localized
|
||||
let userAgreementStr = "User Agreement".localized
|
||||
let privacyPolicy = "Privacy Policy".localized
|
||||
let userAgreementStr = "movia_profile_User_Agreement".localized
|
||||
let privacyPolicy = "movia_profile_Privacy_Policy".localized
|
||||
let range1 = agreementStr.ocString().range(of: userAgreementStr)
|
||||
let range2 = agreementStr.ocString().range(of: privacyPolicy)
|
||||
|
||||
|
@ -11,9 +11,9 @@ class SPAboutUsViewController: SPViewController {
|
||||
|
||||
private lazy var dataArr: [SPMineItem] = {
|
||||
let arr = [
|
||||
SPMineItem(type: .userAgreement, title: "User Agreement".localized),
|
||||
SPMineItem(type: .privacyPolicy, title: "Privacy Policy".localized),
|
||||
SPMineItem(type: .informationProtection, title: "Child Personal Information Protection Rules".localized),
|
||||
SPMineItem(type: .userAgreement, title: "movia_profile_User_Agreement".localized),
|
||||
SPMineItem(type: .privacyPolicy, title: "movia_profile_Privacy_Policy".localized),
|
||||
SPMineItem(type: .informationProtection, title: "movia_child_protection_text".localized),
|
||||
SPMineItem(type: .civizatioConvention, title: "Youth Civilization Convention".localized),
|
||||
SPMineItem(type: .informationSharing, title: "List of Third-Party Sharing of Personal Information".localized),
|
||||
SPMineItem(type: .persoInforDisclosure, title: "Explicit List of Personal Information Collection".localized),
|
||||
@ -37,7 +37,7 @@ class SPAboutUsViewController: SPViewController {
|
||||
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
self.title = "About Us".localized
|
||||
self.title = "movia_profile_About_Us".localized
|
||||
setBackgroundView(isShowGradient: false, bgImage: nil)
|
||||
_setupUI()
|
||||
}
|
||||
|
@ -29,7 +29,7 @@ class SPLanguageViewController: SPViewController {
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
self.edgesForExtendedLayout = .top
|
||||
self.title = "Language".localized
|
||||
self.title = "movia_profile_Language".localized
|
||||
|
||||
requestDataList()
|
||||
|
||||
|
@ -11,12 +11,12 @@ class SPMineViewController: SPViewController {
|
||||
|
||||
private lazy var dataArr: [SPMineItem] = {
|
||||
let arr = [
|
||||
SPMineItem(type: .language, iconImage: UIImage(named: "language_icon_01"), title: "Language".localized),
|
||||
SPMineItem(type: .feedBack, iconImage: UIImage(named: "feed_back_icon_01"), title: "FeedBack".localized),
|
||||
SPMineItem(type: .privacyPolicy, iconImage: UIImage(named: "privacy_policy_icon_01"), title: "Privacy Policy".localized),
|
||||
SPMineItem(type: .userAgreement, iconImage: UIImage(named: "user_agreement_icon_01"), title: "User Agreement".localized),
|
||||
SPMineItem(type: .aboutUs, iconImage: UIImage(named: "about_us_icon_01"), title: "About Us".localized),
|
||||
SPMineItem(type: .settings, iconImage: UIImage(named: "settings_icon_01"), title: "Settings".localized),
|
||||
SPMineItem(type: .language, iconImage: UIImage(named: "language_icon_01"), title: "movia_profile_Language".localized),
|
||||
SPMineItem(type: .feedBack, iconImage: UIImage(named: "feed_back_icon_01"), title: "movia_profile_Feedback".localized),
|
||||
SPMineItem(type: .privacyPolicy, iconImage: UIImage(named: "privacy_policy_icon_01"), title: "movia_profile_Privacy_Policy".localized),
|
||||
SPMineItem(type: .userAgreement, iconImage: UIImage(named: "user_agreement_icon_01"), title: "movia_profile_User_Agreement".localized),
|
||||
SPMineItem(type: .aboutUs, iconImage: UIImage(named: "about_us_icon_01"), title: "movia_profile_About_Us".localized),
|
||||
SPMineItem(type: .settings, iconImage: UIImage(named: "settings_icon_01"), title: "movia_profile_Setting".localized),
|
||||
]
|
||||
return arr
|
||||
}()
|
||||
|
@ -32,7 +32,7 @@ class SPSettingsViewController: SPViewController {
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
self.setBackgroundView(isShowGradient: false, bgImage: nil)
|
||||
self.title = "Settings".localized
|
||||
self.title = "movia_profile_Setting".localized
|
||||
|
||||
SPAppCacheManager.manager.getAllCache { [weak self] value in
|
||||
guard let self = self else { return }
|
||||
@ -129,14 +129,14 @@ extension SPSettingsViewController {
|
||||
///退出登录
|
||||
private func logout() {
|
||||
let alert = UIAlertController(title: nil, message: "Confirm logout?".localized, preferredStyle: .alert)
|
||||
alert.addAction(UIAlertAction(title: "Affirm".localized, style: .default, handler: { _ in
|
||||
alert.addAction(UIAlertAction(title: "movia_affirm".localized, style: .default, handler: { _ in
|
||||
SPLoginManager.manager.logout { [weak self] isFinish in
|
||||
guard let self = self else { return }
|
||||
self.dataArr = self.createDataArr()
|
||||
}
|
||||
}))
|
||||
|
||||
alert.addAction(UIAlertAction(title: "Cancel".localized, style: .cancel))
|
||||
alert.addAction(UIAlertAction(title: "movia_Cancel".localized, style: .cancel))
|
||||
|
||||
self.present(alert, animated: true)
|
||||
}
|
||||
@ -146,7 +146,7 @@ extension SPSettingsViewController {
|
||||
|
||||
var arr = [
|
||||
SPMineItem(type: .clearCache, title: "Clear Cache".localized, subtitle: SPAppCacheManager.cacheToString(cache: cache)),
|
||||
SPMineItem(type: .aboutUs, title: "About Us".localized),
|
||||
SPMineItem(type: .aboutUs, title: "movia_profile_About_Us".localized),
|
||||
]
|
||||
|
||||
if SPLoginManager.manager.isLogin {
|
||||
|
@ -87,7 +87,7 @@ class SPMineHeaderView: UIView {
|
||||
|
||||
private lazy var copyButton: UIButton = {
|
||||
let button = UIButton(type: .custom)
|
||||
button.setTitle("Copy".localized, for: .normal)
|
||||
button.setTitle("movia_copy".localized, for: .normal)
|
||||
button.setTitleColor(.colorFFFFFF(), for: .normal)
|
||||
button.titleLabel?.font = .fontRegular(ofSize: 12)
|
||||
button.setBackgroundImage(UIImage(color: .color58484B(alpha: 0.56)), for: .normal)
|
||||
|
@ -33,7 +33,7 @@ class SPMinePlayHistoryView: UIView {
|
||||
let label = UILabel()
|
||||
label.font = .fontMedium(ofSize: 16)
|
||||
label.textColor = .colorFFFFFF()
|
||||
label.text = "Watch History".localized
|
||||
label.text = "movia_watch_history".localized
|
||||
return label
|
||||
}()
|
||||
|
||||
|
@ -75,8 +75,8 @@ class SPMyListChildViewController: SPViewController {
|
||||
let count = self.selectedCount
|
||||
|
||||
deleteButton.isEnabled = count > 0
|
||||
let text = String(format: "Delet (%@)".localized, "\(selectedCount)")
|
||||
deleteButton.setTitle(text, for: .normal)
|
||||
// let text = String(format: "Delet (%@)".localized, "\(selectedCount)")
|
||||
// deleteButton.setTitle(text, for: .normal)
|
||||
}
|
||||
|
||||
@objc func handelDeleteButton() {
|
||||
|
@ -10,7 +10,7 @@ import UIKit
|
||||
class SPMyListViewController: SPViewController {
|
||||
|
||||
|
||||
private lazy var titles = ["Watch list".localized, "Recently viewed".localized]
|
||||
private lazy var titles = ["movia_watch_list".localized, "movia_recently_viewed".localized]
|
||||
|
||||
private lazy var viewControllers: [SPMyListChildViewController] = {
|
||||
let vc1 = SPCollectListViewController()
|
||||
@ -81,7 +81,7 @@ class SPMyListViewController: SPViewController {
|
||||
|
||||
private lazy var cancelButton: UIButton = {
|
||||
let button = UIButton(type: .custom)
|
||||
// button.setTitle("Cancel".localized, for: .normal)
|
||||
// button.setTitle("movia_Cancel".localized, for: .normal)
|
||||
button.setImage(UIImage(named: "cancel_icon_01"), for: .normal)
|
||||
// button.setTitleColor(.colorFFFFFF(alpha: 0.9), for: .normal)
|
||||
// button.titleLabel?.font = .fontRegular(ofSize: 15)
|
||||
@ -93,7 +93,7 @@ class SPMyListViewController: SPViewController {
|
||||
///全选按钮
|
||||
private lazy var allSelectedButton: UIButton = {
|
||||
let button = JXButton(type: .custom)
|
||||
button.setTitle("Select All".localized, for: .normal)
|
||||
// button.setTitle("Select All".localized, for: .normal)
|
||||
button.setTitleColor(.colorFFFFFF(alpha: 0.9), for: .normal)
|
||||
button.setImage(UIImage(named: "check_icon_01"), for: .normal)
|
||||
button.setImage(UIImage(named: "check_icon_01_selected"), for: .selected)
|
||||
|
@ -14,7 +14,7 @@ class SPPlayHistoryCell: SPCollectionViewCell {
|
||||
coverImageView.sp_setImage(url: model?.image_url)
|
||||
titleLabel.text = model?.name
|
||||
|
||||
let episode = String(format: "EP.%@".localized, model?.current_episode ?? "")
|
||||
let episode = String(format: "movia_text_episcode_ios".localized, model?.current_episode ?? "")
|
||||
let totalEpisode = "/\(model?.episode_total ?? 0)"
|
||||
let range = NSRange(location: episode.length(), length: totalEpisode.length())
|
||||
|
||||
|
@ -102,13 +102,13 @@ class SPPlayerControlView: UIView {
|
||||
|
||||
///收藏按钮
|
||||
private lazy var collectButton: UIButton = {
|
||||
let button = createFeatureButton(title: "Save".localized, selectedTitle: "Added".localized, image: UIImage(named: "collect_icon_01"), selectedImage: UIImage(named: "collect_icon_01_selected"))
|
||||
let button = createFeatureButton(title: "movia_save".localized, selectedTitle: "movia_added".localized, image: UIImage(named: "collect_icon_01"), selectedImage: UIImage(named: "collect_icon_01_selected"))
|
||||
button.addTarget(self, action: #selector(handleCollectButton), for: .touchUpInside)
|
||||
return button
|
||||
}()
|
||||
|
||||
private lazy var episodeButton: UIButton = {
|
||||
let button = createFeatureButton(title: "Series".localized, image: UIImage(named: "episode_icon_02"))
|
||||
let button = createFeatureButton(title: "movia_series".localized, image: UIImage(named: "episode_icon_02"))
|
||||
button.addTarget(self, action: #selector(handleEpisodeButton), for: .touchUpInside)
|
||||
return button
|
||||
}()
|
||||
|
@ -55,9 +55,9 @@ class SPStoreViewController: SPViewController {
|
||||
}()
|
||||
|
||||
private lazy var agreementLabel: YYLabel = {
|
||||
let text1 = "Terms of Service".localized
|
||||
let text2 = "Privacy Policy".localized
|
||||
let text3 = "Renewal Agreement".localized
|
||||
let text1 = "movia_terms_of_service".localized
|
||||
let text2 = "movia_profile_Privacy_Policy".localized
|
||||
let text3 = "movia_renewal_agreement".localized
|
||||
let text = "\(text1) | \(text2)\n\(text3)"
|
||||
let range1 = text.ocString().range(of: text1)
|
||||
let range2 = text.ocString().range(of: text2)
|
||||
|
@ -14,7 +14,7 @@ class SPWalletViewController: SPViewController {
|
||||
SPMineItem(type: .consumptionRecords, iconImage: UIImage(named: "records_icon_01"), title: "Consumption records".localized),
|
||||
SPMineItem(type: .orderRecord, iconImage: UIImage(named: "records_icon_02"), title: "Purchase records".localized),
|
||||
SPMineItem(type: .rewardCoins, iconImage: UIImage(named: "coin_icon_03"), title: "Reward Coins".localized),
|
||||
SPMineItem(type: .feedBack, iconImage: UIImage(named: "feed_back_icon_03"), title: "FeedBack".localized),
|
||||
SPMineItem(type: .feedBack, iconImage: UIImage(named: "feed_back_icon_03"), title: "movia_profile_Feedback".localized),
|
||||
]
|
||||
return arr
|
||||
}()
|
||||
|
@ -81,7 +81,7 @@ extension SPAPPTool {
|
||||
if let text = text {
|
||||
let copy = UIPasteboard.general
|
||||
copy.string = text
|
||||
SPToast.show(text: "Succeed".localized)
|
||||
SPToast.show(text: "movia_succeed".localized)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -107,14 +107,13 @@ class SPIAPManager: NSObject {
|
||||
SPLoginManager.manager.userInfo?.is_vip = true
|
||||
|
||||
if isLoding {
|
||||
SPToast.show(text: "success".localized)
|
||||
SPToast.show(text: "movia_success".localized)
|
||||
}
|
||||
completer?(true)
|
||||
if buyType == .vip {
|
||||
NotificationCenter.default.post(name: SPIAPManager.buyVipFinishNotification, object: nil)
|
||||
}
|
||||
} else {
|
||||
// SPToast.show(text: "failure".localized)
|
||||
completer?(false)
|
||||
}
|
||||
}
|
||||
@ -157,7 +156,7 @@ extension SPIAPManager: JXIAPManagerDelegate {
|
||||
if model.status == "success" {
|
||||
SPLoginManager.manager.userInfo?.is_vip = true
|
||||
|
||||
SPToast.show(text: "success".localized)
|
||||
SPToast.show(text: "movia_success".localized)
|
||||
self.completionHandler?(true)
|
||||
if buyType == .vip {
|
||||
NotificationCenter.default.post(name: SPIAPManager.buyVipFinishNotification, object: nil)
|
||||
|
@ -37,6 +37,16 @@ class SPLocalizedManager: NSObject {
|
||||
}
|
||||
}
|
||||
|
||||
var mjLocalizedKey: String {
|
||||
let key = currentLocalizedKey
|
||||
if key == "zh" {
|
||||
return "zh-Hans"
|
||||
} else if key == "zh_hk" {
|
||||
return "zh-Hant"
|
||||
}
|
||||
return key
|
||||
}
|
||||
|
||||
// 判断是否跟随系统
|
||||
var isFollowingSystem: Bool {
|
||||
return UserDefaults.standard.string(forKey: LocalizedUserDefaultsKey) == nil
|
||||
|
@ -6,53 +6,51 @@
|
||||
英语
|
||||
*/
|
||||
|
||||
"Home" = "Home";
|
||||
"success" = "success";
|
||||
"failure" = "failure";
|
||||
"For You" = "For You";
|
||||
"Error" = "Error";
|
||||
"Profile" = "Profile";
|
||||
"Hot Picks" = "Hot Picks";
|
||||
"Top 10" = "Top 10";
|
||||
"Fresh Drops" = "Fresh Drops";
|
||||
"Free" = "Free";
|
||||
"Trending Now" = "Trending Now";
|
||||
"Editor's Hotlist" = "Editor's Hotlist";
|
||||
"Shorts for You" = "Shorts for You";
|
||||
"Series" = "Series";
|
||||
"Save" = "Save";
|
||||
"Added" = "Added";
|
||||
"FeedBack" = "FeedBack";
|
||||
"Settings" = "Settings";
|
||||
"Language" = "Language";
|
||||
"Privacy Policy" = "Privacy Policy";
|
||||
"Terms of Service" = "Terms of Service";
|
||||
"Renewal Agreement" = "Renewal Agreement";
|
||||
"User Agreement" = "User Agreement";
|
||||
"About Us" = "About Us";
|
||||
"My list" = "My list";
|
||||
"Watch list" = "Watch list";
|
||||
"Recently viewed" = "Recently viewed";
|
||||
"Affirm" = "Affirm";
|
||||
"Cancel" = "Cancel";
|
||||
"Select All" = "Select All";
|
||||
"Delet (%@)" = "Delet (%@)";
|
||||
"Love Me Like You Do It" = "Love Me Like You Do It";
|
||||
"Explore For You" = "Explore For You";
|
||||
"Continue watching" = "Continue watching";
|
||||
"More for you!" = "More for you!";
|
||||
"More" = "More";
|
||||
"Historical search" = "Historical search";
|
||||
"Top Search" = "Top Search";
|
||||
"EP%@" = "EP%@";
|
||||
"Full Episodes" = "Full Episodes";
|
||||
"All" = "All";
|
||||
"Shorts" = "Shorts";
|
||||
"EP.%@" = "EP.%@";
|
||||
"Copy" = "Copy";
|
||||
"Succeed" = "Succeed";
|
||||
"Watch History" = "Watch History";
|
||||
"Child Personal Information Protection Rules" = "Child Personal Information Protection Rules";
|
||||
"movia_home" = "Home";
|
||||
"movia_success" = "Success";
|
||||
"movia_for_you" = "For You";
|
||||
"movia_error" = "Error";
|
||||
"movia_profile" = "Profile";
|
||||
//"Hot Picks" = "Hot Picks";
|
||||
//"Top 10" = "Top 10";
|
||||
//"Fresh Drops" = "Fresh Drops";
|
||||
//"Free" = "Free";
|
||||
"movia_trending_now" = "Trending Now";
|
||||
"movia_editors_hotlist" = "Editor's Hotlist";
|
||||
"movia_shorts_for_you" = "Shorts for You";
|
||||
"movia_series" = "Series";
|
||||
"movia_save" = "Save";
|
||||
"movia_added" = "Added";
|
||||
"movia_profile_Feedback" = "Feedback";
|
||||
"movia_profile_Setting" = "Settings";
|
||||
"movia_profile_Language" = "Language";
|
||||
"movia_profile_Privacy_Policy" = "Privacy Policy";
|
||||
"movia_terms_of_service" = "Terms of Service";
|
||||
"movia_renewal_agreement" = "Renewal Agreement";
|
||||
"movia_profile_User_Agreement" = "User Agreement";
|
||||
"movia_profile_About_Us" = "About Us";
|
||||
"movia_my_list" = "My List";
|
||||
"movia_watch_list" = "Watch list";
|
||||
"movia_recently_viewed" = "Recently viewed";
|
||||
"movia_affirm" = "Affirm";
|
||||
"movia_Cancel" = "Cancel";
|
||||
//"Select All" = "Select All";
|
||||
//"Delet (%@)" = "Delet (%@)";
|
||||
"movia_search_tips" = "Please enter keywords for search.";
|
||||
"movia_explore_for_you" = "Explore For You";
|
||||
"movia_continue_watching" = "Continue watching";
|
||||
"movia_more_for_you" = "More for you!";
|
||||
"movia_more" = "More";
|
||||
"movia_Historical_search" = "Historical search";
|
||||
"movia_top_search" = "Top Search";
|
||||
"movia_text_episcode_ios" = "EP.%@";
|
||||
"movia_full_episodes" = "Full Episodes";
|
||||
"movia_all" = "All";
|
||||
"movia_shorts" = "Shorts";
|
||||
"movia_copy" = "Copy";
|
||||
"movia_succeed" = "Succeed";
|
||||
"movia_watch_history" = "Watch History";
|
||||
"movia_child_protection_text" = "Child Personal Information Protection Rules";
|
||||
"Youth Civilization Convention" = "Youth Civilization Convention";
|
||||
"List of Third-Party Sharing of Personal Information" = "List of Third-Party Sharing of Personal Information";
|
||||
"Explicit List of Personal Information Collection" = "Explicit List of Personal Information Collection";
|
||||
|
Loading…
x
Reference in New Issue
Block a user