Change typography
parent
fbf8379f4a
commit
39de56a91b
|
@ -335,7 +335,7 @@ fun selectFile(extensions: Set<String>, onFileSelected: (String) -> Unit) {
|
||||||
fun exportToCSV(glossary: Glossary, csvFilePath: String) {
|
fun exportToCSV(glossary: Glossary, csvFilePath: String) {
|
||||||
val glossary = loadDatasFromFile(glossary.jsonFilePath)
|
val glossary = loadDatasFromFile(glossary.jsonFilePath)
|
||||||
val csvContent = buildString {
|
val csvContent = buildString {
|
||||||
appendLine("Mot;Description;Contexte principal;Contexte 2;Lié à;Synonyme;Antonyme;")
|
appendLine("Mot;Description;Contexte principal;Contexte secondaire;Lié à;Synonyme;Antonyme;")
|
||||||
glossary.forEach { entry ->
|
glossary.forEach { entry ->
|
||||||
appendLine(
|
appendLine(
|
||||||
"${entry.name};${entry.description};${entry.mainContext};" +
|
"${entry.name};${entry.description};${entry.mainContext};" +
|
||||||
|
@ -393,7 +393,7 @@ fun importCSVFile(glossary : Glossary, filePath: String) {
|
||||||
name = mot["Mot"]!!,
|
name = mot["Mot"]!!,
|
||||||
description = mot["Description"]!!,
|
description = mot["Description"]!!,
|
||||||
mainContext = mot["Contexte principal"]!!,
|
mainContext = mot["Contexte principal"]!!,
|
||||||
secondaryContext = mot["Contexte 2"]!!,
|
secondaryContext = mot["Contexte secondaire"]!!,
|
||||||
relatedTo = mot["Lié à"]!!,
|
relatedTo = mot["Lié à"]!!,
|
||||||
synonymous = mot["Synonyme"]!!,
|
synonymous = mot["Synonyme"]!!,
|
||||||
antonym = mot["Antonyme"]!!
|
antonym = mot["Antonyme"]!!
|
||||||
|
@ -462,7 +462,7 @@ private fun importXLSXFile(glossary: Glossary, cheminFichier: String) {
|
||||||
name = line["Mot"] ?: "",
|
name = line["Mot"] ?: "",
|
||||||
description = line["Description"] ?: "",
|
description = line["Description"] ?: "",
|
||||||
mainContext = line["Contexte principal"] ?: "",
|
mainContext = line["Contexte principal"] ?: "",
|
||||||
secondaryContext = line["Contexte 2"] ?: "",
|
secondaryContext = line["Contexte secondaire"] ?: "",
|
||||||
relatedTo = line["Lié à"] ?: "",
|
relatedTo = line["Lié à"] ?: "",
|
||||||
synonymous = line["Synonyme"] ?: "",
|
synonymous = line["Synonyme"] ?: "",
|
||||||
antonym = line["Antonyme"] ?: ""
|
antonym = line["Antonyme"] ?: ""
|
||||||
|
@ -484,7 +484,7 @@ fun verifyRequiredFields(mot: Map<String, String>): Boolean {
|
||||||
"Mot",
|
"Mot",
|
||||||
"Description",
|
"Description",
|
||||||
"Contexte principal",
|
"Contexte principal",
|
||||||
"Contexte 2",
|
"Contexte secondaire",
|
||||||
"Lié à",
|
"Lié à",
|
||||||
"Synonyme",
|
"Synonyme",
|
||||||
"Antonyme"
|
"Antonyme"
|
||||||
|
|
Loading…
Reference in New Issue