diff --git a/core/src/com/unciv/logic/city/CityConstructions.kt b/core/src/com/unciv/logic/city/CityConstructions.kt index c549a236aa..a3ed8e6e20 100644 --- a/core/src/com/unciv/logic/city/CityConstructions.kt +++ b/core/src/com/unciv/logic/city/CityConstructions.kt @@ -127,7 +127,7 @@ class CityConstructions : IsPartOfGameInfoSerialization { fun getCityProductionTextForCityButton(): String { val currentConstructionSnapshot = currentConstructionFromQueue // See below - var result = currentConstructionSnapshot.tr() + var result = currentConstructionSnapshot.tr(true) if (currentConstructionSnapshot.isNotEmpty()) { val construction = PerpetualConstruction.perpetualConstructionsMap[currentConstructionSnapshot] result += construction?.getProductionTooltip(city) diff --git a/core/src/com/unciv/logic/civilization/managers/QuestManager.kt b/core/src/com/unciv/logic/civilization/managers/QuestManager.kt index 93cba2fd30..1e509c2fe6 100644 --- a/core/src/com/unciv/logic/civilization/managers/QuestManager.kt +++ b/core/src/com/unciv/logic/civilization/managers/QuestManager.kt @@ -25,7 +25,6 @@ import com.unciv.models.ruleset.unique.UniqueType import com.unciv.models.ruleset.unit.BaseUnit import com.unciv.models.translations.fillPlaceholders import com.unciv.models.translations.getPlaceholderParameters -import com.unciv.models.translations.tr import com.unciv.ui.components.extensions.randomWeighted import com.unciv.ui.components.extensions.toPercent import kotlin.math.max @@ -460,7 +459,7 @@ class QuestManager : IsPartOfGameInfoSerialization { NotificationCategory.Diplomacy, civInfo.civName, "OtherIcons/Quest") } else { assignee.addNotification( - "The [${assignedQuest.questName}] quest for [${civInfo.civName}] has ended. It was won by [${winners.joinToString { it.assignee.tr() }}].", + "The [${assignedQuest.questName}] quest for [${civInfo.civName}] has ended. It was won by [${winners.joinToString { "{${it.assignee}}" }}].", civInfo.getCapital()!!.location, NotificationCategory.Diplomacy, civInfo.civName, "OtherIcons/Quest") } diff --git a/core/src/com/unciv/logic/civilization/managers/TechManager.kt b/core/src/com/unciv/logic/civilization/managers/TechManager.kt index f1cc2869c3..3cd21ad71d 100644 --- a/core/src/com/unciv/logic/civilization/managers/TechManager.kt +++ b/core/src/com/unciv/logic/civilization/managers/TechManager.kt @@ -307,7 +307,7 @@ class TechManager : IsPartOfGameInfoSerialization { if (!civInfo.isSpectator()) civInfo.addNotification("Research of [$techName] has completed!", TechAction(techName), NotificationCategory.General, - NotificationIcon.Science, techName) + NotificationIcon.Science) if (isNewTech) civInfo.popupAlerts.add(PopupAlert(AlertType.TechResearched, techName)) diff --git a/core/src/com/unciv/ui/screens/cityscreen/CityConstructionsTable.kt b/core/src/com/unciv/ui/screens/cityscreen/CityConstructionsTable.kt index 36432e2766..16fd7b23c1 100644 --- a/core/src/com/unciv/ui/screens/cityscreen/CityConstructionsTable.kt +++ b/core/src/com/unciv/ui/screens/cityscreen/CityConstructionsTable.kt @@ -313,7 +313,7 @@ class CityConstructionsTable(private val cityScreen: CityScreen) { val isFirstConstructionOfItsKind = cityConstructions.isFirstConstructionOfItsKind(constructionQueueIndex, constructionName) - var text = constructionName.tr() + + var text = constructionName.tr(true) + if (constructionName in PerpetualConstruction.perpetualConstructionsMap) "\n∞" else cityConstructions.getTurnsToConstructionString(constructionName, isFirstConstructionOfItsKind) @@ -386,7 +386,7 @@ class CityConstructionsTable(private val cityScreen: CityScreen) { val resourceTable = Table().apply { isTransform = false } val textColor = if (constructionButtonDTO.rejectionReason == null) Color.WHITE else Color.RED - constructionTable.add(construction.name.toLabel(fontColor = textColor).apply { wrap=true }) + constructionTable.add(construction.name.toLabel(fontColor = textColor, hideIcons = true).apply { wrap=true }) .width(cityScreen.stage.width/5).expandX().left().row() resourceTable.add(constructionButtonDTO.buttonText.toLabel()).expandX().left() diff --git a/core/src/com/unciv/ui/screens/cityscreen/CityStatsTable.kt b/core/src/com/unciv/ui/screens/cityscreen/CityStatsTable.kt index ffcd6f9593..bd8defc3b4 100644 --- a/core/src/com/unciv/ui/screens/cityscreen/CityStatsTable.kt +++ b/core/src/com/unciv/ui/screens/cityscreen/CityStatsTable.kt @@ -8,16 +8,14 @@ import com.badlogic.gdx.scenes.scene2d.ui.Table import com.badlogic.gdx.utils.Align import com.unciv.Constants import com.unciv.UncivGame +import com.unciv.logic.city.City import com.unciv.logic.city.CityFlags import com.unciv.logic.city.CityFocus -import com.unciv.logic.city.City import com.unciv.models.ruleset.Building import com.unciv.models.ruleset.unique.UniqueType import com.unciv.models.stats.Stat import com.unciv.models.translations.tr -import com.unciv.ui.screens.civilopediascreen.CivilopediaScreen -import com.unciv.ui.images.ImageGetter -import com.unciv.ui.screens.basescreen.BaseScreen +import com.unciv.ui.components.ColorMarkupLabel import com.unciv.ui.components.ExpanderTab import com.unciv.ui.components.Fonts import com.unciv.ui.components.extensions.addSeparator @@ -29,6 +27,9 @@ import com.unciv.ui.components.extensions.surroundWithCircle import com.unciv.ui.components.extensions.toGroup import com.unciv.ui.components.extensions.toLabel import com.unciv.ui.components.extensions.toTextButton +import com.unciv.ui.images.ImageGetter +import com.unciv.ui.screens.basescreen.BaseScreen +import com.unciv.ui.screens.civilopediascreen.CivilopediaScreen import kotlin.math.ceil import kotlin.math.round import com.unciv.ui.components.AutoScrollPane as ScrollPane @@ -184,7 +185,7 @@ class CityStatsTable(val cityScreen: CityScreen): Table() { "We Love The King Day for another [${cityInfo.getFlag(CityFlags.WeLoveTheKing)}] turns".toLabel(Color.LIME) cityInfo.demandedResource.isNotEmpty() -> ImageGetter.getResourcePortrait(cityInfo.demandedResource, 20f) to - "Demanding [${cityInfo.demandedResource}]".toLabel(Color.CORAL) + ColorMarkupLabel("Demanding [${cityInfo.demandedResource}]",Color.CORAL) else -> null to null } if (wltkLabel != null) { @@ -351,7 +352,7 @@ class CityStatsTable(val cityScreen: CityScreen): Table() { info.add(ImageGetter.getUnitIcon(greatPersonName, Color.GOLD).toGroup(20f)) .left().padBottom(4f).padRight(5f) - info.add("{$greatPersonName} (+$gppPerTurn)".toLabel()).left().padBottom(4f).expandX().row() + info.add("{$greatPersonName} (+$gppPerTurn)".toLabel(hideIcons = true)).left().padBottom(4f).expandX().row() val gppCurrent = city.civ.greatPeople.greatPersonPointsCounter[greatPersonName] val gppNeeded = city.civ.greatPeople.getPointsRequiredForGreatPerson() diff --git a/core/src/com/unciv/ui/screens/pickerscreens/ImprovementPickerScreen.kt b/core/src/com/unciv/ui/screens/pickerscreens/ImprovementPickerScreen.kt index 121b222bba..6c832abf1f 100644 --- a/core/src/com/unciv/ui/screens/pickerscreens/ImprovementPickerScreen.kt +++ b/core/src/com/unciv/ui/screens/pickerscreens/ImprovementPickerScreen.kt @@ -119,7 +119,7 @@ class ImprovementPickerScreen( if (isSuperseded) shortcutKey = null } - var labelText = improvement.name.tr() + var labelText = improvement.name.tr(true) val turnsToBuild = if (tile.improvementInProgress == improvement.name) tile.turnsToImprovement else improvement.getTurnsToBuild(currentPlayerCiv, unit) diff --git a/core/src/com/unciv/ui/screens/pickerscreens/PromotionPickerScreen.kt b/core/src/com/unciv/ui/screens/pickerscreens/PromotionPickerScreen.kt index fd4093deff..c814ae657c 100644 --- a/core/src/com/unciv/ui/screens/pickerscreens/PromotionPickerScreen.kt +++ b/core/src/com/unciv/ui/screens/pickerscreens/PromotionPickerScreen.kt @@ -14,10 +14,7 @@ import com.unciv.models.TutorialTrigger import com.unciv.models.UncivSound import com.unciv.models.ruleset.unit.Promotion import com.unciv.models.translations.tr -import com.unciv.ui.images.ImageGetter -import com.unciv.ui.screens.basescreen.BaseScreen import com.unciv.ui.components.BorderedTable -import com.unciv.ui.screens.basescreen.RecreateOnResize import com.unciv.ui.components.extensions.colorFromRGB import com.unciv.ui.components.extensions.darken import com.unciv.ui.components.extensions.isEnabled @@ -26,6 +23,9 @@ import com.unciv.ui.components.extensions.onDoubleClick import com.unciv.ui.components.extensions.setFontColor import com.unciv.ui.components.extensions.toLabel import com.unciv.ui.components.extensions.toTextButton +import com.unciv.ui.images.ImageGetter +import com.unciv.ui.screens.basescreen.BaseScreen +import com.unciv.ui.screens.basescreen.RecreateOnResize import java.lang.Integer.max import kotlin.math.abs @@ -89,7 +89,7 @@ private class PromotionButton( ) { var isSelected = false - val label = node.promotion.name.toLabel().apply { + val label = node.promotion.name.toLabel(hideIcons = true).apply { wrap = false setAlignment(Align.left) setEllipsis(true) diff --git a/core/src/com/unciv/ui/screens/victoryscreen/VictoryScreenCivGroup.kt b/core/src/com/unciv/ui/screens/victoryscreen/VictoryScreenCivGroup.kt index 674e5987c2..9d6d3f1478 100644 --- a/core/src/com/unciv/ui/screens/victoryscreen/VictoryScreenCivGroup.kt +++ b/core/src/com/unciv/ui/screens/victoryscreen/VictoryScreenCivGroup.kt @@ -84,7 +84,7 @@ internal class VictoryScreenCivGroup( } background = BaseScreen.skinStrings.getUiBackground("VictoryScreen/CivGroup", BaseScreen.skinStrings.roundedEdgeRectangleShape, backgroundColor) - val label = labelText.toLabel(labelColor) + val label = labelText.toLabel(labelColor, hideIcons = true) label.setAlignment(Align.center) add(label).padLeft(10f) diff --git a/core/src/com/unciv/ui/screens/worldscreen/bottombar/BattleTable.kt b/core/src/com/unciv/ui/screens/worldscreen/bottombar/BattleTable.kt index fbccc3708d..2426ec0b1a 100644 --- a/core/src/com/unciv/ui/screens/worldscreen/bottombar/BattleTable.kt +++ b/core/src/com/unciv/ui/screens/worldscreen/bottombar/BattleTable.kt @@ -144,13 +144,13 @@ class BattleTable(val worldScreen: WorldScreen): Table() { clear() val attackerNameWrapper = Table() - val attackerLabel = attacker.getName().toLabel() + val attackerLabel = attacker.getName().toLabel(hideIcons = true) attackerNameWrapper.add(getIcon(attacker)).padRight(5f) attackerNameWrapper.add(attackerLabel) add(attackerNameWrapper) val defenderNameWrapper = Table() - val defenderLabel = Label(defender.getName().tr(), skin) + val defenderLabel = Label(defender.getName().tr(hideIcons = true), skin) defenderNameWrapper.add(getIcon(defender)).padRight(5f) defenderNameWrapper.add(defenderLabel)