Skip to content

Commit

Permalink
String.trans_promptSuccessfullyAddedSkill:to:
Browse files Browse the repository at this point in the history
  • Loading branch information
nixzhu committed Aug 12, 2016
1 parent 2569ac4 commit 526d37a
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 5 deletions.
4 changes: 4 additions & 0 deletions Yep/Extensions/String+Trans.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,9 @@ extension String {
static var trans_promptAcceptFriendRequestFailed: String {
return NSLocalizedString("prompt.accept_friend_request_failed", comment: "")
}

static func trans_promptSuccessfullyAddedSkill(skill: String, to set: String) -> String {
return String(format: NSLocalizedString("prompt.added_skill%@_to_set%@_successfully", comment: ""), skill, set)
}
}

5 changes: 3 additions & 2 deletions Yep/ViewControllers/Feeds/FeedsViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -510,8 +510,9 @@ final class FeedsViewController: BaseViewController {
defaultFailureHandler(reason: reason, errorMessage: errorMessage)

}, completion: { [weak self] _ in

YepAlert.alert(title: NSLocalizedString("Success", comment: ""), message: String(format: NSLocalizedString("Added %@ to %@ successfully!", comment: ""), skillLocalName, skillSet.name), dismissTitle: NSLocalizedString("OK", comment: ""), inViewController: self, withDismissAction: nil)

let message = String.trans_promptSuccessfullyAddedSkill(skillLocalName, to: skillSet.name)
YepAlert.alert(title: NSLocalizedString("Success", comment: ""), message: message, dismissTitle: NSLocalizedString("OK", comment: ""), inViewController: self, withDismissAction: nil)

SafeDispatch.async {
self?.navigationItem.rightBarButtonItem = nil
Expand Down
3 changes: 2 additions & 1 deletion Yep/ViewControllers/SkillHome/SkillHomeViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,8 @@ final class SkillHomeViewController: BaseViewController {

}, completion: { [weak self] _ in

YepAlert.alert(title: NSLocalizedString("Success", comment: ""), message: String(format: NSLocalizedString("Added %@ to %@ successfully!", comment: ""), skillLocalName, skillSet.name), dismissTitle: NSLocalizedString("OK", comment: ""), inViewController: self, withDismissAction: nil)
let message = String.trans_promptSuccessfullyAddedSkill(skillLocalName, to: skillSet.name)
YepAlert.alert(title: NSLocalizedString("Success", comment: ""), message: message, dismissTitle: NSLocalizedString("OK", comment: ""), inViewController: self, withDismissAction: nil)

SafeDispatch.async {
self?.navigationItem.rightBarButtonItem = nil
Expand Down
2 changes: 1 addition & 1 deletion Yep/en.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"title.add_skills" = "Add Skills";
"button.add_skill_to_me" = "Add to Me";
"button.add" = "Add";
"Added %@ to %@ successfully!" = "Added %1$@ to %2$@ successfully!";
"prompt.added_skill%@_to_set%@_successfully" = "Added %1$@ to %2$@ successfully!";
"Advertising" = "Advertising";
"Albums" = "Albums";
"All messages read." = "All messages read.";
Expand Down
2 changes: 1 addition & 1 deletion Yep/zh-Hans.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"title.add_skills" = "添加技能";
"button.add_skill_to_me" = "添加此技能";
"button.add" = "添加";
"Added %@ to %@ successfully!" = "已成功将“%1$@”添加到“%2$@”!";
"prompt.added_skill%@_to_set%@_successfully" = "已成功将“%1$@”添加到“%2$@”!";
"Advertising" = "广告";
"Albums" = "相册";
"All messages read." = "没有未读消息";
Expand Down

0 comments on commit 526d37a

Please sign in to comment.