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

Commit e67f6fc

Browse files
committed
Add a comment property to StringResource
1 parent 326e89b commit e67f6fc

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

1919
/// Locales of the a localizable string
2020
var locales: [String] { get }
21+
22+
/// Comment directly before and/or after the string, if any
23+
var comment: String? { get }
2124
}
2225

2326
public struct StringResource: StringResourceType {
@@ -30,10 +33,14 @@ public struct StringResource: StringResourceType {
3033

3134
/// Locales of the a localizable string
3235
public let locales: [String]
36+
37+
/// Comment directly before and/or after the string, if any
38+
public let comment: String?
3339

34-
public init(key: String, tableName: String, locales: [String]) {
40+
public init(key: String, tableName: String, locales: [String], comment: String?) {
3541
self.key = key
3642
self.tableName = tableName
3743
self.locales = locales
44+
self.comment = comment
3845
}
3946
}

0 commit comments

Comments
 (0)