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

Commit 2f189a1

Browse files
authored
Merge pull request #19 from mac-cain13/nolanw-localizable-strings-comments
Add a comment property to StringResource
2 parents bae7331 + c17f509 commit 2f189a1

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
@@ -21,6 +21,9 @@ public protocol StringResourceType {
2121

2222
/// Locales of the a localizable string
2323
var locales: [String] { get }
24+
25+
/// Comment directly before and/or after the string, if any
26+
var comment: String? { get }
2427
}
2528

2629
public struct StringResource: StringResourceType {
@@ -36,11 +39,15 @@ public struct StringResource: StringResourceType {
3639

3740
/// Locales of the a localizable string
3841
public let locales: [String]
42+
43+
/// Comment directly before and/or after the string, if any
44+
public let comment: String?
3945

40-
public init(key: String, tableName: String, bundle: NSBundle, locales: [String]) {
46+
public init(key: String, tableName: String, bundle: NSBundle, locales: [String], comment: String?) {
4147
self.key = key
4248
self.tableName = tableName
4349
self.bundle = bundle
4450
self.locales = locales
51+
self.comment = comment
4552
}
4653
}

0 commit comments

Comments
 (0)