|
@@ -112,7 +112,7 @@ class INVideoExportController: BFBaseViewController {
|
|
|
|
|
|
lazy var saveToPhotoBtn: UIButton = {
|
|
|
let btn = UIButton()
|
|
|
- btn.setTitle(" 保存到相册", for: .normal)
|
|
|
+ btn.setTitle(" \("compose_save".BFLocale)", for: .normal)
|
|
|
btn.setTitleColor(.white, for: .normal)
|
|
|
btn.titleLabel?.font = UIFont.boldSystemFont(ofSize: 16)
|
|
|
btn.setImage(UIImage(named: "export_btn"), for: .normal)
|
|
@@ -142,14 +142,14 @@ class INVideoExportController: BFBaseViewController {
|
|
|
errbackV.isHidden = true
|
|
|
|
|
|
let titleL = UILabel()
|
|
|
- titleL.text = "合成失败"
|
|
|
+ titleL.text = "compose_fail_compose".BFLocale
|
|
|
titleL.font = UIFont.systemFont(ofSize: 36)
|
|
|
titleL.textColor = .white
|
|
|
titleL.textAlignment = .center
|
|
|
errbackV.addSubview(titleL)
|
|
|
|
|
|
let subTitleL = UILabel()
|
|
|
- subTitleL.text = "请重新尝试"
|
|
|
+ subTitleL.text = "compose_retry4".BFLocale
|
|
|
subTitleL.tag = 33000
|
|
|
subTitleL.font = UIFont.systemFont(ofSize: 24)
|
|
|
subTitleL.textColor = UIColor.hexColor(hexadecimal: "#A6A6A6")
|
|
@@ -160,7 +160,7 @@ class INVideoExportController: BFBaseViewController {
|
|
|
|
|
|
let retryBtn = UIButton()
|
|
|
retryBtn.backgroundColor = ThemeStyleColor
|
|
|
- retryBtn.setTitle("重试", for: .normal)
|
|
|
+ retryBtn.setTitle("compose_retry".BFLocale, for: .normal)
|
|
|
retryBtn.tag = 33001
|
|
|
retryBtn.setTitleColor(.white, for: .normal)
|
|
|
retryBtn.addCorner(corner:5)
|
|
@@ -269,17 +269,17 @@ class INVideoExportController: BFBaseViewController {
|
|
|
if let l = sself.errorView.viewWithTag(33000) as? UILabel, let err = error as NSError?,let b = sself.errorView.viewWithTag(33001) as? UIButton {
|
|
|
switch err.code {
|
|
|
case ExportError.FileNotExist.rawValue :
|
|
|
- l.text = "原视频/图片文件被删除"
|
|
|
- b.setTitle("重新制作", for: .normal)
|
|
|
+ l.text = "compose_fail_delete".BFLocale
|
|
|
+ b.setTitle("compose_retry2".BFLocale, for: .normal)
|
|
|
case ExportError.DiskNoSpace.rawValue :
|
|
|
- l.text = "存储空间不足:" + (err.userInfo["msg"] as! String)
|
|
|
- b.setTitle("重试", for: .normal)
|
|
|
+ l.text = "compose_fail_storage".BFLocale + (err.userInfo["msg"] as! String)
|
|
|
+ b.setTitle("compose_retry".BFLocale, for: .normal)
|
|
|
case ExportError.VoiceLost.rawValue :
|
|
|
- l.text = "手机录音文件丢失"
|
|
|
- b.setTitle("重试", for: .normal)
|
|
|
+ l.text = "compose_fail_records".BFLocale
|
|
|
+ b.setTitle("compose_retry".BFLocale, for: .normal)
|
|
|
default:
|
|
|
- l.text = "请重新尝试"
|
|
|
- b.setTitle("重试", for: .normal)
|
|
|
+ l.text = "compose_retry4".BFLocale
|
|
|
+ b.setTitle("compose_retry".BFLocale, for: .normal)
|
|
|
}
|
|
|
l.sizeToFit()
|
|
|
}
|
|
@@ -368,7 +368,7 @@ class INVideoExportController: BFBaseViewController {
|
|
|
|
|
|
override func backBtnClick() {
|
|
|
if isExporting {
|
|
|
- whetherCancelExport (msg: "正在合成中,是否取消?"){
|
|
|
+ whetherCancelExport (msg: "savemode_changes".BFLocale){
|
|
|
self.export.cancelExport()
|
|
|
super.backBtnClick()
|
|
|
}
|
|
@@ -558,7 +558,7 @@ class INVideoExportController: BFBaseViewController {
|
|
|
}
|
|
|
// MARK: - 按钮事件
|
|
|
@objc func retryAction(sender:UIButton){
|
|
|
- if sender.currentTitle == "重新制作" {
|
|
|
+ if sender.currentTitle == "compose_retry2".BFLocale {
|
|
|
export.cancelExport()
|
|
|
navigationController?.popToRootViewController(animated: true)
|
|
|
} else {
|
|
@@ -569,7 +569,7 @@ class INVideoExportController: BFBaseViewController {
|
|
|
|
|
|
func exportNow() {
|
|
|
if isExporting {
|
|
|
- cShowHUB(superView: nil, msg: "正在合成中。。。")
|
|
|
+ cShowHUB(superView: nil, msg: "compose_loading".BFLocale)
|
|
|
return
|
|
|
}
|
|
|
isExporting = true
|
|
@@ -608,7 +608,7 @@ class INVideoExportController: BFBaseViewController {
|
|
|
|
|
|
@objc func saveToPhotoNow() {
|
|
|
if (saveAllBtn.isSelected && hasSaveAll) || saveOnlyBtn.isSelected && hasSaveOnly {
|
|
|
- cShowHUB(superView: nil, msg: "已保存过了")
|
|
|
+ cShowHUB(superView: nil, msg: "compose_tips_saved".BFLocale)
|
|
|
return
|
|
|
}
|
|
|
if let url = (avplayer.currentItem?.asset as? AVURLAsset)?.url {
|
|
@@ -620,7 +620,7 @@ class INVideoExportController: BFBaseViewController {
|
|
|
}
|
|
|
if isFinished {
|
|
|
DispatchQueue.main.async {
|
|
|
- cShowHUB(superView: nil, msg: "保存成功", style: 1)
|
|
|
+ cShowHUB(superView: nil, msg: "compose_tips_successfully".BFLocale, style: 1)
|
|
|
}
|
|
|
if sself.saveAllBtn.isSelected {
|
|
|
sself.hasSaveAll = true
|
|
@@ -717,12 +717,12 @@ class INVideoExportController: BFBaseViewController {
|
|
|
if (!hasSaveOnly && !saveOnlyUlr.absoluteString.contains("aaa"))
|
|
|
|| (!hasSaveAll && !saveAllUlr.absoluteString.contains("aaa")) {
|
|
|
|
|
|
- let alertController = UIAlertController(title: "你还未保存视频哦,是否确定离开?",
|
|
|
+ let alertController = UIAlertController(title: "compose_tips_changes".BFLocale,
|
|
|
message: "", preferredStyle: .alert)
|
|
|
- let cancelAction = UIAlertAction(title: "取消", style: .default){_ in
|
|
|
+ let cancelAction = UIAlertAction(title: "option_cancel".BFLocale, style: .default){_ in
|
|
|
|
|
|
}
|
|
|
- let okAction = UIAlertAction(title: "确定离开", style: .default) {[weak self] action in
|
|
|
+ let okAction = UIAlertAction(title: "option_confirm".BFLocale, style: .default) {[weak self] action in
|
|
|
guard let sself = self else {
|
|
|
return
|
|
|
}
|
|
@@ -785,10 +785,10 @@ class INVideoExportController: BFBaseViewController {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- func whetherCancelExport(msg:String = "正在合成中,是否切换?", comfirm: (() -> Void)?) {
|
|
|
+ func whetherCancelExport(msg:String = "savemode_changes2".BFLocale, comfirm: (() -> Void)?) {
|
|
|
let alertController = UIAlertController(title: msg,
|
|
|
message: "", preferredStyle: .alert)
|
|
|
- let cancelAction = UIAlertAction(title: "取消", style: .default, handler: nil)
|
|
|
+ let cancelAction = UIAlertAction(title: "option_cancel".BFLocale, style: .default, handler: nil)
|
|
|
let okAction = UIAlertAction(title: "确定", style: .default) {[weak self] action in
|
|
|
guard let sself = self else {
|
|
|
return
|