Skip to content

Commit

Permalink
killer B
Browse files Browse the repository at this point in the history
  • Loading branch information
nixzhu committed Aug 12, 2016
1 parent b0a49dd commit 552c968
Show file tree
Hide file tree
Showing 11 changed files with 50 additions and 22 deletions.
28 changes: 28 additions & 0 deletions Yep/Extensions/String+Trans.swift
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,34 @@ extension String {
static var trans_titleAvailableFriends: String {
return NSLocalizedString("title.available_friends", comment: "")
}

static var trans_buttonBack: String {
return NSLocalizedString("button.back", comment: "")
}

static var trans_infoBeginChatJustNow: String {
return NSLocalizedString("info.begin_chat_just_now", comment: "")
}

static var trans_titleBlock: String {
return NSLocalizedString("title.block", comment: "")
}

static var trans_titleBlockedCreators: String {
return NSLocalizedString("title.blocked_creators", comment: "")
}

static var trans_titleBlockedUsers: String {
return NSLocalizedString("title.blocked_users", comment: "")
}

static var trans_subtitleBuildWorldTogether: String {
return NSLocalizedString("subtitle.build_world_together", comment: "")
}

static var trans_promptTapNextAgreeTerms: String {
return NSLocalizedString("prompt.tap_next_agree_terms", comment: "")
}
}

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

title = NSLocalizedString("Blocked Users", comment: "")
title = String.trans_titleBlockedUsers

activityIndicator.startAnimating()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ final class ConversationMoreViewManager {

private func makeBlockItem(blocked blocked: Bool) -> ActionSheetView.Item {
return .Default(
title: blocked ? NSLocalizedString("Unblock", comment: "") : NSLocalizedString("Block", comment: ""),
title: blocked ? NSLocalizedString("Unblock", comment: "") : String.trans_titleBlock,
titleColor: UIColor.redColor(),
action: { [weak self] in
self?.toggleBlockAction?()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@ extension ConversationViewController {
} else if let friend = strongSelf.conversation.withFriend {
titleView.stateInfoLabel.text = String(format:NSLocalizedString("Last seen %@", comment: ""), NSDate(timeIntervalSince1970: friend.lastSignInUnixTime).timeAgo.lowercaseString)
} else {
titleView.stateInfoLabel.text = NSLocalizedString("Begin chat just now", comment: "")
titleView.stateInfoLabel.text = String.trans_infoBeginChatJustNow
}

titleView.stateInfoLabel.textColor = UIColor.grayColor()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ final class CreatorsOfBlockedFeedsViewController: BaseViewController {
override func viewDidLoad() {
super.viewDidLoad()

title = NSLocalizedString("Blocked Creators", comment: "")
title = String.trans_titleBlockedCreators

activityIndicator.startAnimating()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ extension NotificationsViewController: UITableViewDataSource, UITableViewDelegat
case .BlackList:

let cell: SettingsMoreCell = tableView.dequeueReusableCell()
cell.annotationLabel.text = NSLocalizedString("Blocked Users", comment: "")
cell.annotationLabel.text = String.trans_titleBlockedUsers
return cell

case .CreatorsOfBlockedFeeds:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ final class RegisterPickNameViewController: BaseViewController {

pickNamePromptLabel.text = NSLocalizedString("What's your name?", comment: "")

let text = NSLocalizedString("By tapping Next you agree to our terms.", comment: "")
let text = String.trans_promptTapNextAgreeTerms
let textAttributes: [String: AnyObject] = [
NSFontAttributeName: UIFont.systemFontOfSize(14),
NSForegroundColorAttributeName: UIColor.grayColor(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ final class RegisterSelectSkillsViewController: UIViewController {

@IBOutlet weak var backButton: UIButton! {
didSet {
backButton.setTitle(NSLocalizedString("Back", comment: ""), forState: .Normal)
backButton.setTitle(String.trans_buttonBack, forState: .Normal)
backButton.alpha = 0
}
}
Expand Down
2 changes: 1 addition & 1 deletion Yep/ViewControllers/Show/ShowStepMeetViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ final class ShowStepMeetViewController: ShowStepViewController {
super.viewDidLoad()

titleLabel.text = NSLocalizedString("Meet", comment: "")
subTitleLabel.text = NSLocalizedString("Build world together", comment: "")
subTitleLabel.text = String.trans_subtitleBuildWorldTogether
}

override func viewDidAppear(animated: Bool) {
Expand Down
14 changes: 7 additions & 7 deletions Yep/en.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@
"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";
"Blocked Creators" = "Blocked Creators";
"Blocked Users" = "Blocked Users";
"Build world together" = "Build world together";
"By tapping Next you agree to our terms." = "By tapping Next you agree to our terms.";
"button.back" = "Back";
"info.begin_chat_just_now" = "Begin chat just now";
"title.block" = "Block";
"title.blocked_creators" = "Blocked Creators";
"title.blocked_users" = "Blocked Users";
"subtitle.build_world_together" = "Build world together";
"prompt.tap_next_agree_terms" = "By tapping Next you agree to our terms.";
"Call me" = "Call me";
"Calling" = "Calling";
"Camera" = "Camera";
Expand Down
14 changes: 7 additions & 7 deletions Yep/zh-Hans.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@
"placeholder.all_messages_read" = "没有未读消息";
"prompt.also_delete_this_feed" = "同时删除此话题?";
"title.available_friends" = "已有好友";
"Back" = "返回";
"Begin chat just now" = "刚刚开始聊天";
"Block" = "屏蔽";
"Blocked Creators" = "被屏蔽的创建者";
"Blocked Users" = "被屏蔽的用户";
"Build world together" = "共建世界";
"By tapping Next you agree to our terms." = "点击下一步表示您同意我们的条款。";
"button.back" = "返回";
"info.begin_chat_just_now" = "刚刚开始聊天";
"title.block" = "屏蔽";
"title.blocked_creators" = "被屏蔽的创建者";
"title.blocked_users" = "被屏蔽的用户";
"subtitle.build_world_together" = "共建世界";
"prompt.tap_next_agree_terms" = "点击下一步表示您同意我们的条款。";
"Call me" = "呼叫我";
"Calling" = "正在呼叫";
"Camera" = "拍摄";
Expand Down

0 comments on commit 552c968

Please sign in to comment.