TXSourceString
public final class TXSourceString : NSObject
Publicly exposed class that holds all the information for the translation units that will be pushed to CDS.
This class mirrors the internal SourceString struct and offers a flat structure of the required and optional properties of the struct while also being able to be used both by Swift and Objective-C applications.
-
The key that was generated by the
txGenerateKey()
methodDeclaration
Swift
public let key: String
-
The source string
Declaration
Swift
public let sourceString: String
-
An optional developer comment
Declaration
Swift
public let developerComment: String?
-
A list of relative file paths where this string is located.
Declaration
Swift
public let occurrences: [String]
-
A list of tags accompanying this source string
Declaration
Swift
public let tags: [String]?
-
A limit provided by the developer that should be respected by translators when translating the source string, 0 means no limit.
Declaration
Swift
public let characterLimit: Int
-
A list of strings providing more context to the source string
Declaration
Swift
public let context: [String]?
-
Public and designated constructor.
Declaration
Swift
@objc public init(key: String, sourceString: String, occurrences: [String], characterLimit: Int, developerComment: String? = nil, tags: [String]? = nil, context: [String]? = nil)
Parameters
key
The key that was generated by the
txGenerateKey()
methodsourceString
The source string
occurrences
A list of relative file paths where this string is located.
characterLimit
A limit provided by the developer that should be respected by translators when translating the source string, 0 means no limit.
developerComment
An optional developer comment
tags
A list of tags accompanying this source string
context
A list of strings providing more context to the source string
-
Description of the source string used for debugging purposes
Declaration
Swift
public override var debugDescription: String { get }