Modification de l'affichage des commentaires
Some checks failed
gitea-openium/resgen.swift/pipeline/head There was a failure building this commit
gitea-openium/resgen.swift/pipeline/pr-master There was a failure building this commit

This commit is contained in:
2024-04-11 11:18:57 +02:00
parent d21ad9d1ea
commit 55264d61ad
3 changed files with 65 additions and 0 deletions

View File

@ -91,6 +91,8 @@ class Definition {
"""
/// Translation in \(lang) :
/// \(translation)
///
/// Comment :
/// \(comment)
\(isStatic ? "static ": "")var \(name): String {
NSLocalizedString("\(name)", tableName: kStringsFileName, bundle: Bundle.main, value: "\(translation)", comment: "\(comment)")
@ -117,6 +119,8 @@ class Definition {
/// Translation in \(lang) :
/// \(translation)
///
/// Comment :
/// \(comment)
\(isStatic ? "static ": "")func \(name)(\(inputParameters.joined(separator: ", "))) -> String {
String(format: \(isStatic ? "Self" : "self").\(name), \(translationArguments.joined(separator: ", ")))
@ -207,7 +211,10 @@ class Definition {
return """
/// Translation in \(lang) :
/// \(translation)
///
/// Comment :
/// \(comment)
var \(name): String {
"\(translation)"
}
@ -234,6 +241,8 @@ class Definition {
return """
/// Translation in \(lang) :
/// \(translation)
///
/// Comment :
/// \(comment)
static var \(name): String {
"\(translation)"