Modification de l'affichage des commentaires
This commit is contained in:
parent
d21ad9d1ea
commit
55264d61ad
@ -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)"
|
||||
|
@ -100,6 +100,8 @@ final class DefinitionTests: XCTestCase {
|
||||
let expectFr = """
|
||||
/// Translation in fr :
|
||||
/// C'est la traduction francaise
|
||||
///
|
||||
/// Comment :
|
||||
/// This is a comment
|
||||
var definition_name: String {
|
||||
NSLocalizedString("definition_name", tableName: kStringsFileName, bundle: Bundle.main, value: "C'est la traduction francaise", comment: "This is a comment")
|
||||
@ -109,6 +111,8 @@ final class DefinitionTests: XCTestCase {
|
||||
let expectEn = """
|
||||
/// Translation in en :
|
||||
/// This is the english translation
|
||||
///
|
||||
/// Comment :
|
||||
/// This is a comment
|
||||
var definition_name: String {
|
||||
NSLocalizedString("definition_name", tableName: kStringsFileName, bundle: Bundle.main, value: "This is the english translation", comment: "This is a comment")
|
||||
@ -118,6 +122,8 @@ final class DefinitionTests: XCTestCase {
|
||||
let expectEnUs = """
|
||||
/// Translation in en-us :
|
||||
/// This is the english us translation
|
||||
///
|
||||
/// Comment :
|
||||
/// This is a comment
|
||||
var definition_name: String {
|
||||
NSLocalizedString("definition_name", tableName: kStringsFileName, bundle: Bundle.main, value: "This is the english us translation", comment: "This is a comment")
|
||||
@ -242,6 +248,8 @@ final class DefinitionTests: XCTestCase {
|
||||
let expectFr = """
|
||||
/// Translation in fr :
|
||||
/// C'est la traduction francaise
|
||||
///
|
||||
/// Comment :
|
||||
/// This is a comment
|
||||
static var definition_name: String {
|
||||
NSLocalizedString("definition_name", tableName: kStringsFileName, bundle: Bundle.main, value: "C'est la traduction francaise", comment: "This is a comment")
|
||||
@ -251,6 +259,8 @@ final class DefinitionTests: XCTestCase {
|
||||
let expectEn = """
|
||||
/// Translation in en :
|
||||
/// This is the english translation
|
||||
///
|
||||
/// Comment :
|
||||
/// This is a comment
|
||||
static var definition_name: String {
|
||||
NSLocalizedString("definition_name", tableName: kStringsFileName, bundle: Bundle.main, value: "This is the english translation", comment: "This is a comment")
|
||||
@ -260,6 +270,8 @@ final class DefinitionTests: XCTestCase {
|
||||
let expectEnUs = """
|
||||
/// Translation in en-us :
|
||||
/// This is the english us translation
|
||||
///
|
||||
/// Comment :
|
||||
/// This is a comment
|
||||
static var definition_name: String {
|
||||
NSLocalizedString("definition_name", tableName: kStringsFileName, bundle: Bundle.main, value: "This is the english us translation", comment: "This is a comment")
|
||||
@ -378,6 +390,8 @@ final class DefinitionTests: XCTestCase {
|
||||
let expectFr = """
|
||||
/// Translation in fr :
|
||||
/// Welcome "%@" !
|
||||
///
|
||||
/// Comment :
|
||||
/// This is a comment
|
||||
var definition_name: String {
|
||||
NSLocalizedString("definition_name", tableName: kStringsFileName, bundle: Bundle.main, value: "Welcome \"%@\" !", comment: "This is a comment")
|
||||
@ -385,6 +399,8 @@ final class DefinitionTests: XCTestCase {
|
||||
|
||||
/// Translation in fr :
|
||||
/// Welcome "%@" !
|
||||
///
|
||||
/// Comment :
|
||||
/// This is a comment
|
||||
func definition_name(arg0: String) -> String {
|
||||
String(format: self.definition_name, arg0)
|
||||
@ -410,6 +426,8 @@ final class DefinitionTests: XCTestCase {
|
||||
let expectFr = """
|
||||
/// Translation in fr :
|
||||
/// Welcome "%@" ! Your age is %d :) Your weight is %f ;-)
|
||||
///
|
||||
/// Comment :
|
||||
/// This is a comment
|
||||
var definition_name: String {
|
||||
NSLocalizedString("definition_name", tableName: kStringsFileName, bundle: Bundle.main, value: "Welcome \"%@\" ! Your age is %d :) Your weight is %f ;-)", comment: "This is a comment")
|
||||
@ -417,6 +435,8 @@ final class DefinitionTests: XCTestCase {
|
||||
|
||||
/// Translation in fr :
|
||||
/// Welcome "%@" ! Your age is %d :) Your weight is %f ;-)
|
||||
///
|
||||
/// Comment :
|
||||
/// This is a comment
|
||||
func definition_name(arg0: String, arg1: Int, arg2: Double) -> String {
|
||||
String(format: self.definition_name, arg0, arg1, arg2)
|
||||
@ -443,6 +463,8 @@ final class DefinitionTests: XCTestCase {
|
||||
let expectFr = """
|
||||
/// Translation in fr :
|
||||
/// Vous %%: %1$@ %2$@ Age: %3$d
|
||||
///
|
||||
/// Comment :
|
||||
/// This is a comment
|
||||
var definition_name: String {
|
||||
NSLocalizedString("definition_name", tableName: kStringsFileName, bundle: Bundle.main, value: "Vous %%: %1$@ %2$@ Age: %3$d", comment: "This is a comment")
|
||||
@ -450,6 +472,8 @@ final class DefinitionTests: XCTestCase {
|
||||
|
||||
/// Translation in fr :
|
||||
/// Vous %%: %1$@ %2$@ Age: %3$d
|
||||
///
|
||||
/// Comment :
|
||||
/// This is a comment
|
||||
func definition_name(arg0: String, arg1: String, arg2: Int) -> String {
|
||||
String(format: self.definition_name, arg0, arg1, arg2)
|
||||
@ -459,6 +483,8 @@ final class DefinitionTests: XCTestCase {
|
||||
let expectEn = """
|
||||
/// Translation in en :
|
||||
/// You %%: %2$@ %1$@ Age: %3$d
|
||||
///
|
||||
/// Comment :
|
||||
/// This is a comment
|
||||
var definition_name: String {
|
||||
NSLocalizedString("definition_name", tableName: kStringsFileName, bundle: Bundle.main, value: "You %%: %2$@ %1$@ Age: %3$d", comment: "This is a comment")
|
||||
@ -466,6 +492,8 @@ final class DefinitionTests: XCTestCase {
|
||||
|
||||
/// Translation in en :
|
||||
/// You %%: %2$@ %1$@ Age: %3$d
|
||||
///
|
||||
/// Comment :
|
||||
/// This is a comment
|
||||
func definition_name(arg0: String, arg1: String, arg2: Int) -> String {
|
||||
String(format: self.definition_name, arg0, arg1, arg2)
|
||||
@ -498,6 +526,8 @@ final class DefinitionTests: XCTestCase {
|
||||
let expectFr = """
|
||||
/// Translation in fr :
|
||||
/// C'est la traduction francaise
|
||||
///
|
||||
/// Comment :
|
||||
/// This is a comment
|
||||
var definition_name: String {
|
||||
"C'est la traduction francaise"
|
||||
@ -507,6 +537,8 @@ final class DefinitionTests: XCTestCase {
|
||||
let expectEn = """
|
||||
/// Translation in en :
|
||||
/// This is the english translation
|
||||
///
|
||||
/// Comment :
|
||||
/// This is a comment
|
||||
var definition_name: String {
|
||||
"This is the english translation"
|
||||
@ -516,6 +548,8 @@ final class DefinitionTests: XCTestCase {
|
||||
let expectEnUs = """
|
||||
/// Translation in en-us :
|
||||
/// This is the english us translation
|
||||
///
|
||||
/// Comment :
|
||||
/// This is a comment
|
||||
var definition_name: String {
|
||||
"This is the english us translation"
|
||||
@ -640,6 +674,8 @@ final class DefinitionTests: XCTestCase {
|
||||
let expectFr = """
|
||||
/// Translation in fr :
|
||||
/// C'est la traduction francaise
|
||||
///
|
||||
/// Comment :
|
||||
/// This is a comment
|
||||
static var definition_name: String {
|
||||
"C'est la traduction francaise"
|
||||
@ -649,6 +685,8 @@ final class DefinitionTests: XCTestCase {
|
||||
let expectEn = """
|
||||
/// Translation in en :
|
||||
/// This is the english translation
|
||||
///
|
||||
/// Comment :
|
||||
/// This is a comment
|
||||
static var definition_name: String {
|
||||
"This is the english translation"
|
||||
@ -658,6 +696,8 @@ final class DefinitionTests: XCTestCase {
|
||||
let expectEnUs = """
|
||||
/// Translation in en-us :
|
||||
/// This is the english us translation
|
||||
///
|
||||
/// Comment :
|
||||
/// This is a comment
|
||||
static var definition_name: String {
|
||||
"This is the english us translation"
|
||||
|
@ -352,6 +352,8 @@ final class StringsFileGeneratorTests: XCTestCase {
|
||||
|
||||
/// Translation in fr :
|
||||
/// Section Un - Definition Un
|
||||
///
|
||||
/// Comment :
|
||||
/// This is a comment
|
||||
var s1_def_one: String {
|
||||
NSLocalizedString("s1_def_one", tableName: kStringsFileName, bundle: Bundle.main, value: "Section Un - Definition Un", comment: "This is a comment")
|
||||
@ -359,6 +361,8 @@ final class StringsFileGeneratorTests: XCTestCase {
|
||||
|
||||
/// Translation in fr :
|
||||
/// Section Un - Definition Deux
|
||||
///
|
||||
/// Comment :
|
||||
/// This is a comment
|
||||
var s1_def_two: String {
|
||||
NSLocalizedString("s1_def_two", tableName: kStringsFileName, bundle: Bundle.main, value: "Section Un - Definition Deux", comment: "This is a comment")
|
||||
@ -368,6 +372,8 @@ final class StringsFileGeneratorTests: XCTestCase {
|
||||
|
||||
/// Translation in fr :
|
||||
/// Section Deux - Definition Un
|
||||
///
|
||||
/// Comment :
|
||||
/// This is a comment
|
||||
var s2_def_one: String {
|
||||
NSLocalizedString("s2_def_one", tableName: kStringsFileName, bundle: Bundle.main, value: "Section Deux - Definition Un", comment: "This is a comment")
|
||||
@ -375,6 +381,8 @@ final class StringsFileGeneratorTests: XCTestCase {
|
||||
|
||||
/// Translation in fr :
|
||||
/// Section Deux - Definition Deux
|
||||
///
|
||||
/// Comment :
|
||||
/// This is a comment
|
||||
var s2_def_two: String {
|
||||
NSLocalizedString("s2_def_two", tableName: kStringsFileName, bundle: Bundle.main, value: "Section Deux - Definition Deux", comment: "This is a comment")
|
||||
@ -553,6 +561,8 @@ final class StringsFileGeneratorTests: XCTestCase {
|
||||
|
||||
/// Translation in fr :
|
||||
/// Section Un - Definition Un
|
||||
///
|
||||
/// Comment :
|
||||
/// This is a comment
|
||||
static var s1_def_one: String {
|
||||
NSLocalizedString("s1_def_one", tableName: kStringsFileName, bundle: Bundle.main, value: "Section Un - Definition Un", comment: "This is a comment")
|
||||
@ -560,6 +570,8 @@ final class StringsFileGeneratorTests: XCTestCase {
|
||||
|
||||
/// Translation in fr :
|
||||
/// Section Un - Definition Deux
|
||||
///
|
||||
/// Comment :
|
||||
/// This is a comment
|
||||
static var s1_def_two: String {
|
||||
NSLocalizedString("s1_def_two", tableName: kStringsFileName, bundle: Bundle.main, value: "Section Un - Definition Deux", comment: "This is a comment")
|
||||
@ -569,6 +581,8 @@ final class StringsFileGeneratorTests: XCTestCase {
|
||||
|
||||
/// Translation in fr :
|
||||
/// Section Deux - Definition Un
|
||||
///
|
||||
/// Comment :
|
||||
/// This is a comment
|
||||
static var s2_def_one: String {
|
||||
NSLocalizedString("s2_def_one", tableName: kStringsFileName, bundle: Bundle.main, value: "Section Deux - Definition Un", comment: "This is a comment")
|
||||
@ -576,6 +590,8 @@ final class StringsFileGeneratorTests: XCTestCase {
|
||||
|
||||
/// Translation in fr :
|
||||
/// Section Deux - Definition Deux
|
||||
///
|
||||
/// Comment :
|
||||
/// This is a comment
|
||||
static var s2_def_two: String {
|
||||
NSLocalizedString("s2_def_two", tableName: kStringsFileName, bundle: Bundle.main, value: "Section Deux - Definition Deux", comment: "This is a comment")
|
||||
|
Loading…
x
Reference in New Issue
Block a user