Extensions // Add .localized() support for certain string types.
This commit is contained in:
parent
c2b3dbe655
commit
7b1892bd8d
|
@ -8,7 +8,13 @@
|
|||
|
||||
import Cocoa
|
||||
|
||||
// MARK: NSRect Extension
|
||||
// MARK: - NSMutableString extension
|
||||
|
||||
extension NSMutableString {
|
||||
public var localized: String { NSLocalizedString(description, comment: "") }
|
||||
}
|
||||
|
||||
// MARK: - NSRect Extension
|
||||
|
||||
extension NSRect {
|
||||
public static var seniorTheBeast: NSRect {
|
||||
|
|
|
@ -8,6 +8,12 @@
|
|||
|
||||
import Foundation
|
||||
|
||||
// MARK: - String.localized extension
|
||||
|
||||
extension StringLiteralType {
|
||||
public var localized: String { NSLocalizedString(description, comment: "") }
|
||||
}
|
||||
|
||||
// MARK: - Root Extensions
|
||||
|
||||
// Extend the RangeReplaceableCollection to allow it clean duplicated characters.
|
||||
|
|
Loading…
Reference in New Issue