Skip to content

Commit bae7331

Browse files
authored
Merge pull request mac-cain13#13 from mac-cain13/string-bundle
Add bundle to string resource
2 parents 326e89b + 05d8947 commit bae7331

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

Library/Core/StringResource.swift

+8-1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ public protocol StringResourceType {
1616
/// File in containing the string
1717
var tableName: String { get }
1818

19+
/// Bundle this string is in
20+
var bundle: NSBundle { get }
21+
1922
/// Locales of the a localizable string
2023
var locales: [String] { get }
2124
}
@@ -28,12 +31,16 @@ public struct StringResource: StringResourceType {
2831
/// File in containing the string
2932
public let tableName: String
3033

34+
/// Bundle this string is in
35+
public let bundle: NSBundle
36+
3137
/// Locales of the a localizable string
3238
public let locales: [String]
3339

34-
public init(key: String, tableName: String, locales: [String]) {
40+
public init(key: String, tableName: String, bundle: NSBundle, locales: [String]) {
3541
self.key = key
3642
self.tableName = tableName
43+
self.bundle = bundle
3744
self.locales = locales
3845
}
3946
}

0 commit comments

Comments
 (0)