xcstrings #10
@ -85,13 +85,12 @@ class Definition {
|
||||
}
|
||||
|
||||
private func getBaseProperty(lang: String, translation: String, isStatic: Bool, comment: String?) -> String {
|
||||
|
||||
"""
|
||||
/// Translation in \(lang) :
|
||||
/// \(translation)
|
||||
///
|
||||
/// Comment :
|
||||
/// \((comment ?? "").isEmpty ? "No comment" : comment!)
|
||||
/// \(comment?.isEmpty == false ? comment! : "No comment")
|
||||
\(isStatic ? "static ": "")var \(name): String {
|
||||
NSLocalizedString("\(name)", tableName: kStringsFileName, bundle: Bundle.main, value: "\(translation)", comment: "\(comment ?? "")")
|
||||
}
|
||||
@ -107,7 +106,7 @@ class Definition {
|
||||
/// \(translation)
|
||||
///
|
||||
/// Comment :
|
||||
/// \((comment ?? "").isEmpty ? "No comment" : comment!)
|
||||
/// \(comment?.isEmpty == false ? comment! : "No comment")
|
||||
\(isStatic ? "static ": "")func \(name)(\(inputParameters.joined(separator: ", "))) -> String {
|
||||
String(format: \(isStatic ? "Self" : "self").\(name), \(translationArguments.joined(separator: ", ")))
|
||||
}
|
||||
@ -186,7 +185,7 @@ class Definition {
|
||||
/// \(translation)
|
||||
///
|
||||
/// Comment :
|
||||
/// \((comment ?? "").isEmpty ? "No comment" : comment!)
|
||||
/// \(comment?.isEmpty == false ? comment! : "No comment")
|
||||
|
||||
var \(name): String {
|
||||
"\(translation)"
|
||||
@ -206,7 +205,7 @@ class Definition {
|
||||
/// \(translation)
|
||||
///
|
||||
/// Comment :
|
||||
/// \((comment ?? "").isEmpty ? "No comment" : comment!)
|
||||
/// \(comment?.isEmpty == false ? comment! : "No comment")
|
||||
static var \(name): String {
|
||||
"\(translation)"
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user