Skip to content
This repository was archived by the owner on Sep 19, 2024. It is now read-only.

Commit 05d8947

Browse files
committed
Add bundle to string resource
1 parent 326e89b commit 05d8947

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

Diff for: 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)