@@ -16,8 +16,14 @@ public protocol StringResourceType {
16
16
/// File in containing the string
17
17
var tableName : String { get }
18
18
19
+ /// Bundle this string is in
20
+ var bundle : NSBundle { get }
21
+
19
22
/// Locales of the a localizable string
20
23
var locales : [ String ] { get }
24
+
25
+ /// Comment directly before and/or after the string, if any
26
+ var comment : String ? { get }
21
27
}
22
28
23
29
public struct StringResource : StringResourceType {
@@ -28,12 +34,20 @@ public struct StringResource: StringResourceType {
28
34
/// File in containing the string
29
35
public let tableName : String
30
36
37
+ /// Bundle this string is in
38
+ public let bundle : NSBundle
39
+
31
40
/// Locales of the a localizable string
32
41
public let locales : [ String ]
42
+
43
+ /// Comment directly before and/or after the string, if any
44
+ public let comment : String ?
33
45
34
- public init ( key: String , tableName: String , locales: [ String ] ) {
46
+ public init ( key: String , tableName: String , bundle : NSBundle , locales: [ String ] , comment : String ? ) {
35
47
self . key = key
36
48
self . tableName = tableName
49
+ self . bundle = bundle
37
50
self . locales = locales
51
+ self . comment = comment
38
52
}
39
53
}
0 commit comments