From 8a376de6c38b17253e313da9eb2ab6a3b6631e16 Mon Sep 17 00:00:00 2001 From: yairm210 Date: Mon, 2 Dec 2024 18:19:56 +0200 Subject: [PATCH] Resolved #12544 - multiline unique descriptions hidden in doc --- android/assets/jsons/translations/template.properties | 1 - desktop/src/com/unciv/app/desktop/UniqueDocsWriter.kt | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/android/assets/jsons/translations/template.properties b/android/assets/jsons/translations/template.properties index e301250c55..932b9a6780 100644 --- a/android/assets/jsons/translations/template.properties +++ b/android/assets/jsons/translations/template.properties @@ -269,7 +269,6 @@ City-States grow wary of your aggression. The resting point for Influence has de [cityState] is deeply grateful for your assistance in the war against [civName]! = [cityState] no longer needs your assistance against [civName]. = [cityState] cancelled the quests they had given you because you demanded tribute from them. = -[cityState] cancelled the quests they had given you because you demanded tribute from them. = War against [civName] = We need you to help us defend against [civName]. Killing [amount] of their military units would slow their offensive. = Currently you have killed [amount] of their military units. = diff --git a/desktop/src/com/unciv/app/desktop/UniqueDocsWriter.kt b/desktop/src/com/unciv/app/desktop/UniqueDocsWriter.kt index d25c177cb8..5cf16ffc09 100644 --- a/desktop/src/com/unciv/app/desktop/UniqueDocsWriter.kt +++ b/desktop/src/com/unciv/app/desktop/UniqueDocsWriter.kt @@ -77,7 +77,7 @@ class UniqueDocsWriter { else uniqueType.text lines += "??? example \"$uniqueText\"" // collapsable material mkdocs block, see https://squidfunk.github.io/mkdocs-material/reference/admonitions/?h=%3F%3F%3F#collapsible-blocks if (uniqueType.docDescription != null) - lines += "\t${uniqueType.docDescription}" + lines += "\t${uniqueType.docDescription!!.replace("\n","\n\t")}" if (uniqueType.parameterTypeMap.isNotEmpty()) { // This one will give examples for _each_ filter in a "tileFilter/specialist/buildingFilter" kind of parameter e.g. "Farm/Merchant/Library": // `val paramExamples = uniqueType.parameterTypeMap.map { it.joinToString("/") { pt -> pt.docExample } }.toTypedArray()`