mirror of
https://github.com/zhigang1992/GitHawk.git
synced 2026-06-03 14:45:40 +08:00
29 lines
675 B
Swift
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: "")
|
|
}
|
|
}
|
|
}
|