Affichage du commentaire même si nil ou empty

This commit is contained in:
2024-04-11 14:20:54 +02:00
parent 55264d61ad
commit 5d4e461933
3 changed files with 120 additions and 70 deletions

View File

@ -155,6 +155,9 @@ final class DefinitionTests: XCTestCase {
let expectFr = """
/// Translation in fr :
/// C'est la traduction francaise
///
/// Comment :
/// No comment
var definition_name: String {
NSLocalizedString("definition_name", tableName: kStringsFileName, bundle: Bundle.main, value: "C'est la traduction francaise", comment: "")
}
@ -163,6 +166,9 @@ final class DefinitionTests: XCTestCase {
let expectEn = """
/// Translation in en :
/// This is the english translation
///
/// Comment :
/// No comment
var definition_name: String {
NSLocalizedString("definition_name", tableName: kStringsFileName, bundle: Bundle.main, value: "This is the english translation", comment: "")
}
@ -171,6 +177,9 @@ final class DefinitionTests: XCTestCase {
let expectEnUs = """
/// Translation in en-us :
/// This is the english us translation
///
/// Comment :
/// No comment
var definition_name: String {
NSLocalizedString("definition_name", tableName: kStringsFileName, bundle: Bundle.main, value: "This is the english us translation", comment: "")
}
@ -200,6 +209,9 @@ final class DefinitionTests: XCTestCase {
let expectFr = """
/// Translation in fr :
/// C'est la traduction francaise
///
/// Comment :
/// No comment
var definition_name: String {
NSLocalizedString("definition_name", tableName: kStringsFileName, bundle: Bundle.main, value: "C'est la traduction francaise", comment: "")
}
@ -208,6 +220,9 @@ final class DefinitionTests: XCTestCase {
let expectEn = """
/// Translation in en :
/// This is the english translation
///
/// Comment :
/// No comment
var definition_name: String {
NSLocalizedString("definition_name", tableName: kStringsFileName, bundle: Bundle.main, value: "This is the english translation", comment: "")
}
@ -216,6 +231,9 @@ final class DefinitionTests: XCTestCase {
let expectEnUs = """
/// Translation in en-us :
/// This is the english us translation
///
/// Comment :
/// No comment
var definition_name: String {
NSLocalizedString("definition_name", tableName: kStringsFileName, bundle: Bundle.main, value: "This is the english us translation", comment: "")
}
@ -303,6 +321,9 @@ final class DefinitionTests: XCTestCase {
let expectFr = """
/// Translation in fr :
/// C'est la traduction francaise
///
/// Comment :
/// No comment
static var definition_name: String {
NSLocalizedString("definition_name", tableName: kStringsFileName, bundle: Bundle.main, value: "C'est la traduction francaise", comment: "")
}
@ -311,6 +332,9 @@ final class DefinitionTests: XCTestCase {
let expectEn = """
/// Translation in en :
/// This is the english translation
///
/// Comment :
/// No comment
static var definition_name: String {
NSLocalizedString("definition_name", tableName: kStringsFileName, bundle: Bundle.main, value: "This is the english translation", comment: "")
}
@ -319,6 +343,9 @@ final class DefinitionTests: XCTestCase {
let expectEnUs = """
/// Translation in en-us :
/// This is the english us translation
///
/// Comment :
/// No comment
static var definition_name: String {
NSLocalizedString("definition_name", tableName: kStringsFileName, bundle: Bundle.main, value: "This is the english us translation", comment: "")
}
@ -348,6 +375,9 @@ final class DefinitionTests: XCTestCase {
let expectFr = """
/// Translation in fr :
/// C'est la traduction francaise
///
/// Comment :
/// No comment
static var definition_name: String {
NSLocalizedString("definition_name", tableName: kStringsFileName, bundle: Bundle.main, value: "C'est la traduction francaise", comment: "")
}
@ -356,6 +386,9 @@ final class DefinitionTests: XCTestCase {
let expectEn = """
/// Translation in en :
/// This is the english translation
///
/// Comment :
/// No comment
static var definition_name: String {
NSLocalizedString("definition_name", tableName: kStringsFileName, bundle: Bundle.main, value: "This is the english translation", comment: "")
}
@ -364,6 +397,9 @@ final class DefinitionTests: XCTestCase {
let expectEnUs = """
/// Translation in en-us :
/// This is the english us translation
///
/// Comment :
/// No comment
static var definition_name: String {
NSLocalizedString("definition_name", tableName: kStringsFileName, bundle: Bundle.main, value: "This is the english us translation", comment: "")
}
@ -581,6 +617,9 @@ final class DefinitionTests: XCTestCase {
let expectFr = """
/// Translation in fr :
/// C'est la traduction francaise
///
/// Comment :
/// No comment
var definition_name: String {
"C'est la traduction francaise"
}
@ -589,6 +628,9 @@ final class DefinitionTests: XCTestCase {
let expectEn = """
/// Translation in en :
/// This is the english translation
///
/// Comment :
/// No comment
var definition_name: String {
"This is the english translation"
}
@ -597,6 +639,9 @@ final class DefinitionTests: XCTestCase {
let expectEnUs = """
/// Translation in en-us :
/// This is the english us translation
///
/// Comment :
/// No comment
var definition_name: String {
"This is the english us translation"
}
@ -626,6 +671,9 @@ final class DefinitionTests: XCTestCase {
let expectFr = """
/// Translation in fr :
/// C'est la traduction francaise
///
/// Comment :
/// No comment
var definition_name: String {
"C'est la traduction francaise"
}
@ -634,6 +682,9 @@ final class DefinitionTests: XCTestCase {
let expectEn = """
/// Translation in en :
/// This is the english translation
///
/// Comment :
/// No comment
var definition_name: String {
"This is the english translation"
}
@ -642,6 +693,9 @@ final class DefinitionTests: XCTestCase {
let expectEnUs = """
/// Translation in en-us :
/// This is the english us translation
///
/// Comment :
/// No comment
var definition_name: String {
"This is the english us translation"
}
@ -729,6 +783,9 @@ final class DefinitionTests: XCTestCase {
let expectFr = """
/// Translation in fr :
/// C'est la traduction francaise
///
/// Comment :
/// No comment
static var definition_name: String {
"C'est la traduction francaise"
}
@ -737,6 +794,9 @@ final class DefinitionTests: XCTestCase {
let expectEn = """
/// Translation in en :
/// This is the english translation
///
/// Comment :
/// No comment
static var definition_name: String {
"This is the english translation"
}
@ -745,6 +805,9 @@ final class DefinitionTests: XCTestCase {
let expectEnUs = """
/// Translation in en-us :
/// This is the english us translation
///
/// Comment :
/// No comment
static var definition_name: String {
"This is the english us translation"
}
@ -774,6 +837,9 @@ final class DefinitionTests: XCTestCase {
let expectFr = """
/// Translation in fr :
/// C'est la traduction francaise
///
/// Comment :
/// No comment
static var definition_name: String {
"C'est la traduction francaise"
}
@ -782,6 +848,9 @@ final class DefinitionTests: XCTestCase {
let expectEn = """
/// Translation in en :
/// This is the english translation
///
/// Comment :
/// No comment
static var definition_name: String {
"This is the english translation"
}
@ -790,6 +859,9 @@ final class DefinitionTests: XCTestCase {
let expectEnUs = """
/// Translation in en-us :
/// This is the english us translation
///
/// Comment :
/// No comment
static var definition_name: String {
"This is the english us translation"
}

View File

@ -252,12 +252,18 @@ final class StringsFileGeneratorTests: XCTestCase {
/// Translation in fr :
/// Section Un - Definition Un
///
/// Comment :
/// No comment
var s1_def_one: String {
NSLocalizedString("s1_def_one", tableName: kStringsFileName, bundle: Bundle.main, value: "Section Un - Definition Un", comment: "")
}
/// Translation in fr :
/// Section Un - Definition Deux
///
/// Comment :
/// No comment
var s1_def_two: String {
NSLocalizedString("s1_def_two", tableName: kStringsFileName, bundle: Bundle.main, value: "Section Un - Definition Deux", comment: "")
}
@ -266,12 +272,18 @@ final class StringsFileGeneratorTests: XCTestCase {
/// Translation in fr :
/// Section Deux - Definition Un
///
/// Comment :
/// No comment
var s2_def_one: String {
NSLocalizedString("s2_def_one", tableName: kStringsFileName, bundle: Bundle.main, value: "Section Deux - Definition Un", comment: "")
}
/// Translation in fr :
/// Section Deux - Definition Deux
///
/// Comment :
/// No comment
var s2_def_two: String {
NSLocalizedString("s2_def_two", tableName: kStringsFileName, bundle: Bundle.main, value: "Section Deux - Definition Deux", comment: "")
}
@ -461,12 +473,18 @@ final class StringsFileGeneratorTests: XCTestCase {
/// Translation in fr :
/// Section Un - Definition Un
///
/// Comment :
/// No comment
static var s1_def_one: String {
NSLocalizedString("s1_def_one", tableName: kStringsFileName, bundle: Bundle.main, value: "Section Un - Definition Un", comment: "")
}
/// Translation in fr :
/// Section Un - Definition Deux
///
/// Comment :
/// No comment
static var s1_def_two: String {
NSLocalizedString("s1_def_two", tableName: kStringsFileName, bundle: Bundle.main, value: "Section Un - Definition Deux", comment: "")
}
@ -475,12 +493,18 @@ final class StringsFileGeneratorTests: XCTestCase {
/// Translation in fr :
/// Section Deux - Definition Un
///
/// Comment :
/// No comment
static var s2_def_one: String {
NSLocalizedString("s2_def_one", tableName: kStringsFileName, bundle: Bundle.main, value: "Section Deux - Definition Un", comment: "")
}
/// Translation in fr :
/// Section Deux - Definition Deux
///
/// Comment :
/// No comment
static var s2_def_two: String {
NSLocalizedString("s2_def_two", tableName: kStringsFileName, bundle: Bundle.main, value: "Section Deux - Definition Deux", comment: "")
}