Skip to content

Commit

Permalink
all A
Browse files Browse the repository at this point in the history
  • Loading branch information
nixzhu committed Aug 12, 2016
1 parent 06d1407 commit b0a49dd
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 17 deletions.
8 changes: 8 additions & 0 deletions Yep/Extensions/String+Trans.swift
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,14 @@ extension String {
static func trans_promptSuccessfullyAddedSkill(skill: String, to set: String) -> String {
return String(format: NSLocalizedString("prompt.added_skill%@_to_set%@_successfully", comment: ""), skill, set)
}

static var trans_promptAlsoDeleteThisFeed: String {
return NSLocalizedString("prompt.also_delete_this_feed", comment: "")
}

static var trans_titleAvailableFriends: String {
return NSLocalizedString("title.available_friends", comment: "")
}
}

extension String {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ extension ConversationViewController {
// 若是创建者,再询问是否删除 Feed
if isMyFeed {

YepAlert.confirmOrCancel(title: NSLocalizedString("Delete", comment: ""), message: NSLocalizedString("Also delete this feed?", comment: ""), confirmTitle: NSLocalizedString("Delete", comment: ""), cancelTitle: NSLocalizedString("Not now", comment: ""), inViewController: self, withConfirmAction: {
YepAlert.confirmOrCancel(title: NSLocalizedString("Delete", comment: ""), message: String.trans_promptAlsoDeleteThisFeed, confirmTitle: NSLocalizedString("Delete", comment: ""), cancelTitle: NSLocalizedString("Not now", comment: ""), inViewController: self, withConfirmAction: {

doDeleteConversation(afterLeaveGroup: { [weak self] in
deleteFeedWithFeedID(feedID, failureHandler: nil, completion: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ extension FeedConversationsViewController: UITableViewDataSource, UITableViewDel

if feedCreatorID == YepUserDefaults.userID.value {

YepAlert.confirmOrCancel(title: NSLocalizedString("Delete", comment: ""), message: NSLocalizedString("Also delete this feed?", comment: ""), confirmTitle: NSLocalizedString("Delete", comment: ""), cancelTitle: NSLocalizedString("Not now", comment: ""), inViewController: self, withConfirmAction: {
YepAlert.confirmOrCancel(title: NSLocalizedString("Delete", comment: ""), message: String.trans_promptAlsoDeleteThisFeed, confirmTitle: NSLocalizedString("Delete", comment: ""), cancelTitle: NSLocalizedString("Not now", comment: ""), inViewController: self, withConfirmAction: {

doDeleteConversation()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ final class FriendsInContactsViewController: BaseViewController {
override func viewDidLoad() {
super.viewDidLoad()

title = NSLocalizedString("Available Friends", comment: "")
title = String.trans_titleAvailableFriends
}

override func viewWillAppear(animated: Bool) {
Expand Down
5 changes: 2 additions & 3 deletions Yep/ViewControllers/NewFeed/NewFeedViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -1087,12 +1087,11 @@ extension NewFeedViewController: UICollectionViewDataSource, UICollectionViewDel

pickAlertController.addAction(cameraAction)

let albumAction: UIAlertAction = UIAlertAction(title: NSLocalizedString("Albums", comment: ""), style: .Default) { [weak self] _ in
let albumAction: UIAlertAction = UIAlertAction(title: NSLocalizedString("title.albums", comment: ""), style: .Default) { [weak self] _ in

proposeToAccess(.Photos, agreed: { [weak self] in
proposeToAccess(.Photos, agreed: { [weak self] in
self?.performSegueWithIdentifier("showPickPhotos", sender: nil)


}, rejected: { [weak self] in
self?.alertCanNotAccessCameraRoll()
})
Expand Down
9 changes: 4 additions & 5 deletions Yep/en.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,10 @@
"button.add" = "Add";
"prompt.added_skill%@_to_set%@_successfully" = "Added %1$@ to %2$@ successfully!";
"report.advertising" = "Advertising";
"Albums" = "Albums";
"All messages read." = "All messages read.";
"Also delete this feed?" = "Also delete this feed?";
"Available Friends" = "Available Friends";
"Avatar" = "Avatar";
"title.albums" = "Albums";
"placeholder.all_messages_read" = "All messages read.";
"prompt.also_delete_this_feed" = "Also delete this feed?";
"title.available_friends" = "Available Friends";
"Back" = "Back";
"Begin chat just now" = "Begin chat just now";
"Block" = "Block";
Expand Down
9 changes: 4 additions & 5 deletions Yep/zh-Hans.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,10 @@
"button.add" = "添加";
"prompt.added_skill%@_to_set%@_successfully" = "已成功将“%1$@”添加到“%2$@”!";
"report.advertising" = "广告";
"Albums" = "相册";
"All messages read." = "没有未读消息";
"Also delete this feed?" = "同时删除此话题?";
"Available Friends" = "已有好友";
"Avatar" = "头像";
"title.albums" = "相册";
"placeholder.all_messages_read" = "没有未读消息";
"prompt.also_delete_this_feed" = "同时删除此话题?";
"title.available_friends" = "已有好友";
"Back" = "返回";
"Begin chat just now" = "刚刚开始聊天";
"Block" = "屏蔽";
Expand Down
2 changes: 1 addition & 1 deletion YepKit/Persistence/Models.swift
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ public enum MessageMediaType: Int, CustomStringConvertible {
case .SocialWork:
return NSLocalizedString("placeholder.socialWork", comment: "")
default:
return NSLocalizedString("All messages read.", comment: "")
return NSLocalizedString("placeholder.all_messages_read", comment: "")
}
}
}
Expand Down

0 comments on commit b0a49dd

Please sign in to comment.