metatext/Extensions/ProfileCollection+Extensions.swift

28 lines
899 B
Swift
Raw Normal View History

2020-09-22 06:53:11 +00:00
// Copyright © 2020 Metabolist. All rights reserved.
import Foundation
import ViewModels
2020-09-27 02:03:53 +00:00
extension ProfileCollection {
2021-01-31 01:43:48 +00:00
func title(statusWord: AppPreferences.StatusWord) -> String {
2020-09-22 06:53:11 +00:00
switch self {
case .statuses:
2021-01-31 01:43:48 +00:00
switch statusWord {
case .toot:
return NSLocalizedString("account.statuses.toot", comment: "")
case .post:
return NSLocalizedString("account.statuses.post", comment: "")
}
2020-09-22 06:53:11 +00:00
case .statusesAndReplies:
2021-01-31 01:43:48 +00:00
switch statusWord {
case .toot:
return NSLocalizedString("account.statuses-and-replies.toot", comment: "")
default:
return NSLocalizedString("account.statuses-and-replies.post", comment: "")
}
2020-09-22 06:53:11 +00:00
case .media:
return NSLocalizedString("account.media", comment: "")
}
}
}