diff --git a/Yep/Extensions/String+Trans.swift b/Yep/Extensions/String+Trans.swift index e34bb016d..75a4accde 100644 --- a/Yep/Extensions/String+Trans.swift +++ b/Yep/Extensions/String+Trans.swift @@ -66,6 +66,15 @@ extension String { return NSLocalizedString("button.calling", comment: "") } + static var trans_titleCamera: String { + return NSLocalizedString("title.camera", comment: "") + } + + static var trans_promptCancelRecommendedFeedFailed: String { + return NSLocalizedString("prompt.cancel_recommended_feed_failed", comment: "") + } + + } extension String { diff --git a/Yep/ViewControllers/Feeds/FeedsViewController.swift b/Yep/ViewControllers/Feeds/FeedsViewController.swift index 3db05d27b..ee267fb6e 100644 --- a/Yep/ViewControllers/Feeds/FeedsViewController.swift +++ b/Yep/ViewControllers/Feeds/FeedsViewController.swift @@ -1712,7 +1712,7 @@ extension FeedsViewController: UITableViewDataSource, UITableViewDelegate { if feed.recommended { cancelRecommendedFeedWithFeedID(feed.id, failureHandler: { [weak self] reason, errorMessage in - let message = errorMessage ?? NSLocalizedString("Cancel recommended feed failed!", comment: "") + let message = errorMessage ?? String.trans_promptCancelRecommendedFeedFailed YepAlert.alertSorry(message: message, inViewController: self) }, completion: { [weak self] in diff --git a/Yep/ViewControllers/NewFeed/NewFeedViewController.swift b/Yep/ViewControllers/NewFeed/NewFeedViewController.swift index 45a4548c1..fdcaa8b9c 100644 --- a/Yep/ViewControllers/NewFeed/NewFeedViewController.swift +++ b/Yep/ViewControllers/NewFeed/NewFeedViewController.swift @@ -1066,7 +1066,7 @@ extension NewFeedViewController: UICollectionViewDataSource, UICollectionViewDel let pickAlertController = UIAlertController(title: NSLocalizedString("Choose Source", comment: ""), message: nil, preferredStyle: .ActionSheet) - let cameraAction: UIAlertAction = UIAlertAction(title: NSLocalizedString("Camera", comment: ""), style: .Default) { _ in + let cameraAction: UIAlertAction = UIAlertAction(title: String.trans_titleCamera, style: .Default) { _ in proposeToAccess(.Camera, agreed: { [weak self] in diff --git a/Yep/en.lproj/Localizable.strings b/Yep/en.lproj/Localizable.strings index 5f9ad9626..4d3074df6 100644 --- a/Yep/en.lproj/Localizable.strings +++ b/Yep/en.lproj/Localizable.strings @@ -23,8 +23,8 @@ "prompt.tap_next_agree_terms" = "By tapping Next you agree to our terms."; "button.call_me" = "Call me"; "button.calling" = "Calling"; -"Camera" = "Camera"; -"Cancel recommended feed failed!" = "Cancel recommended feed failed!"; +"title.camera" = "Camera"; +"prompt.cancel_recommended_feed_failed" = "Cancel recommended feed failed!"; "Cancel" = "Cancel"; "Cancel\nRecommended" = "Cancel\nRecommended"; "Catch Inc." = "Catch Inc."; diff --git a/Yep/zh-Hans.lproj/Localizable.strings b/Yep/zh-Hans.lproj/Localizable.strings index 88b34dcf3..4890830a5 100644 --- a/Yep/zh-Hans.lproj/Localizable.strings +++ b/Yep/zh-Hans.lproj/Localizable.strings @@ -23,8 +23,8 @@ "prompt.tap_next_agree_terms" = "点击下一步表示您同意我们的条款。"; "button.call_me" = "呼叫我"; "button.calling" = "正在呼叫"; -"Camera" = "拍摄"; -"Cancel recommended feed failed!" = "取消推荐话题失败!"; +"title.camera" = "拍摄"; +"prompt.cancel_recommended_feed_failed" = "取消推荐话题失败!"; "Cancel" = "取消"; "Cancel\nRecommended" = "取消\n推荐"; "Catch Inc." = "Catch Inc.";