Files
GitHawk/Classes/Notifications/NotificationType.swift
2017-07-12 09:51:52 +02:00

29 lines
675 B
Swift

//
// NotificationType.swift
// Freetime
//
// Created by Ryan Nystrom on 5/13/17.
// Copyright © 2017 Ryan Nystrom. All rights reserved.
//
import Foundation
// https://github.com/octokit/octokit.objc/blob/master/OctoKit/OCTNotification.m#L63-L65
enum NotificationType: String {
case issue = "Issue"
case pullRequest = "PullRequest"
case commit = "Commit"
}
extension NotificationType {
var localizedString: String {
switch self {
case .issue, .commit:
return NSLocalizedString(self.rawValue, comment: "")
case .pullRequest:
return NSLocalizedString("Pull request", comment: "")
}
}
}