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

Commit 720a6ef

Browse files
committed
Merge branch 'master' into swift3
2 parents 81dacb1 + 2f189a1 commit 720a6ef

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

Diff for: Library/Core/StringResource.swift

+15-1
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,14 @@ 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 }
24+
25+
/// Comment directly before and/or after the string, if any
26+
var comment: String? { get }
2127
}
2228

2329
public struct StringResource: StringResourceType {
@@ -28,12 +34,20 @@ public struct StringResource: StringResourceType {
2834
/// File in containing the string
2935
public let tableName: String
3036

37+
/// Bundle this string is in
38+
public let bundle: NSBundle
39+
3140
/// Locales of the a localizable string
3241
public let locales: [String]
42+
43+
/// Comment directly before and/or after the string, if any
44+
public let comment: String?
3345

34-
public init(key: String, tableName: String, locales: [String]) {
46+
public init(key: String, tableName: String, bundle: NSBundle, locales: [String], comment: String?) {
3547
self.key = key
3648
self.tableName = tableName
49+
self.bundle = bundle
3750
self.locales = locales
51+
self.comment = comment
3852
}
3953
}

0 commit comments

Comments
 (0)