Skip to content
This repository was archived by the owner on Sep 19, 2024. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion Library/Core/StringResource.swift
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ public protocol StringResourceType {

/// Locales of the a localizable string
var locales: [String] { get }

/// Comment directly before and/or after the string, if any
var comment: String? { get }
}

public struct StringResource: StringResourceType {
Expand All @@ -36,11 +39,15 @@ public struct StringResource: StringResourceType {

/// Locales of the a localizable string
public let locales: [String]

/// Comment directly before and/or after the string, if any
public let comment: String?

public init(key: String, tableName: String, bundle: NSBundle, locales: [String]) {
public init(key: String, tableName: String, bundle: NSBundle, locales: [String], comment: String?) {
self.key = key
self.tableName = tableName
self.bundle = bundle
self.locales = locales
self.comment = comment
}
}