Skip to content
This repository was archived by the owner on Sep 20, 2023. It is now read-only.

Commit 3193097

Browse files
Huddiernystrom
authored andcommitted
Switched to constants (#2207)
1 parent 1029698 commit 3193097

File tree

3 files changed

+10
-8
lines changed

3 files changed

+10
-8
lines changed

Classes/Issues/IssueManagingContextController.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,10 +127,10 @@ final class IssueManagingContextController: NSObject, ContextMenuDelegate {
127127
title = Constants.Strings.reviewers
128128
iconName = "reviewer"
129129
case .unlock:
130-
title = NSLocalizedString("Unlock", comment: "")
130+
title = Constants.Strings.unlock
131131
iconName = "key"
132132
case .lock:
133-
title = NSLocalizedString("Lock", comment: "")
133+
title = Constants.Strings.lock
134134
iconName = "lock"
135135
case .reopen:
136136
title = Constants.Strings.reopen

Classes/Issues/Managing/IssueManagingSectionController.swift

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,37 +19,37 @@ ContextMenuDelegate {
1919
private enum Action {
2020
static let labels = IssueManagingActionModel(
2121
key: "tag",
22-
label: NSLocalizedString("Labels", comment: ""),
22+
label: Constants.Strings.labels,
2323
imageName: "tag",
2424
color: "3f88f7".color
2525
)
2626
static let milestone = IssueManagingActionModel(
2727
key: "milestone",
28-
label: NSLocalizedString("Milestone", comment: ""),
28+
label: Constants.Strings.milestone,
2929
imageName: "milestone",
3030
color: "6847ba".color
3131
)
3232
static let assignees = IssueManagingActionModel(
3333
key: "person",
34-
label: NSLocalizedString("Assignees", comment: ""),
34+
label: Constants.Strings.assignees,
3535
imageName: "person",
3636
color: "e77230".color
3737
)
3838
static let reviewers = IssueManagingActionModel(
3939
key: "reviewer",
40-
label: NSLocalizedString("Reviewers", comment: ""),
40+
label: Constants.Strings.reviewers,
4141
imageName: "reviewer",
4242
color: "50a451".color
4343
)
4444
static let lock = IssueManagingActionModel(
4545
key: "lock", // share key so lock/unlock just updates cell
46-
label: NSLocalizedString("Lock", comment: ""),
46+
label: Constants.Strings.lock,
4747
imageName: "lock",
4848
color: Styles.Colors.Gray.dark.color
4949
)
5050
static let unlock = IssueManagingActionModel(
5151
key: "lock", // share key so lock/unlock just updates cell
52-
label: NSLocalizedString("Unlock", comment: ""),
52+
label: Constants.Strings.unlock,
5353
imageName: "key",
5454
color: Styles.Colors.Gray.dark.color
5555
)

Classes/Views/Constants.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ enum Constants {
3232
static let reopened = NSLocalizedString("Reopened", comment: "")
3333
static let unknown = NSLocalizedString("Unknown", comment: "")
3434
static let merged = NSLocalizedString("Merged", comment: "")
35+
static let unlock = NSLocalizedString("Unlock", comment: "")
36+
static let lock = NSLocalizedString("Lock", comment: "")
3537
static let locked = NSLocalizedString("Locked", comment: "")
3638
static let newIssue = NSLocalizedString("New Issue", comment: "")
3739
static let bullet = "\u{2022}"

0 commit comments

Comments
 (0)