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