From e714659d4a6eacd5c1c53de330eda0070c0388c9 Mon Sep 17 00:00:00 2001 From: Ehud Adler Date: Sat, 29 Sep 2018 23:44:53 -0400 Subject: [PATCH] Switched to constants --- Classes/Issues/IssueManagingContextController.swift | 4 ++-- .../Managing/IssueManagingSectionController.swift | 12 ++++++------ Classes/Views/Constants.swift | 2 ++ 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/Classes/Issues/IssueManagingContextController.swift b/Classes/Issues/IssueManagingContextController.swift index 1fe68cb79..39593e7b7 100644 --- a/Classes/Issues/IssueManagingContextController.swift +++ b/Classes/Issues/IssueManagingContextController.swift @@ -127,10 +127,10 @@ final class IssueManagingContextController: NSObject, ContextMenuDelegate { title = Constants.Strings.reviewers iconName = "reviewer" case .unlock: - title = NSLocalizedString("Unlock", comment: "") + title = Constants.Strings.unlock iconName = "key" case .lock: - title = NSLocalizedString("Lock", comment: "") + title = Constants.Strings.lock iconName = "lock" case .reopen: title = Constants.Strings.reopen diff --git a/Classes/Issues/Managing/IssueManagingSectionController.swift b/Classes/Issues/Managing/IssueManagingSectionController.swift index 312a95710..939007324 100644 --- a/Classes/Issues/Managing/IssueManagingSectionController.swift +++ b/Classes/Issues/Managing/IssueManagingSectionController.swift @@ -19,37 +19,37 @@ ContextMenuDelegate { private enum Action { static let labels = IssueManagingActionModel( key: "tag", - label: NSLocalizedString("Labels", comment: ""), + label: Constants.Strings.labels, imageName: "tag", color: "3f88f7".color ) static let milestone = IssueManagingActionModel( key: "milestone", - label: NSLocalizedString("Milestone", comment: ""), + label: Constants.Strings.milestone, imageName: "milestone", color: "6847ba".color ) static let assignees = IssueManagingActionModel( key: "person", - label: NSLocalizedString("Assignees", comment: ""), + label: Constants.Strings.assignees, imageName: "person", color: "e77230".color ) static let reviewers = IssueManagingActionModel( key: "reviewer", - label: NSLocalizedString("Reviewers", comment: ""), + label: Constants.Strings.reviewers, imageName: "reviewer", color: "50a451".color ) static let lock = IssueManagingActionModel( key: "lock", // share key so lock/unlock just updates cell - label: NSLocalizedString("Lock", comment: ""), + label: Constants.Strings.lock, imageName: "lock", color: Styles.Colors.Gray.dark.color ) static let unlock = IssueManagingActionModel( key: "lock", // share key so lock/unlock just updates cell - label: NSLocalizedString("Unlock", comment: ""), + label: Constants.Strings.unlock, imageName: "key", color: Styles.Colors.Gray.dark.color ) diff --git a/Classes/Views/Constants.swift b/Classes/Views/Constants.swift index 20af57f5c..22baac0a6 100644 --- a/Classes/Views/Constants.swift +++ b/Classes/Views/Constants.swift @@ -32,6 +32,8 @@ enum Constants { static let reopened = NSLocalizedString("Reopened", comment: "") static let unknown = NSLocalizedString("Unknown", comment: "") static let merged = NSLocalizedString("Merged", comment: "") + static let unlock = NSLocalizedString("Unlock", comment: "") + static let lock = NSLocalizedString("Lock", comment: "") static let locked = NSLocalizedString("Locked", comment: "") static let newIssue = NSLocalizedString("New Issue", comment: "") static let bullet = "\u{2022}"