From 357800a80efb87accff445da8295b0bfbd7db73b Mon Sep 17 00:00:00 2001 From: SomeTroglodyte <63000004+SomeTroglodyte@users.noreply.github.com> Date: Thu, 31 Mar 2022 22:14:35 +0200 Subject: [PATCH] Missing translations cleanup (#6452) --- .../assets/jsons/Civ V - Gods & Kings/Units.json | 4 ++-- .../assets/jsons/translations/German.properties | 16 +++++++++++++--- .../jsons/translations/template.properties | 9 +++++++-- core/src/com/unciv/models/ruleset/Difficulty.kt | 2 +- core/src/com/unciv/models/ruleset/Nation.kt | 6 +++--- .../models/ruleset/unique/UniqueParameterType.kt | 15 ++++++++++++++- core/src/com/unciv/ui/trade/DiplomacyScreen.kt | 6 +++--- .../com/unciv/ui/worldscreen/unit/UnitActions.kt | 1 + 8 files changed, 44 insertions(+), 15 deletions(-) diff --git a/android/assets/jsons/Civ V - Gods & Kings/Units.json b/android/assets/jsons/Civ V - Gods & Kings/Units.json index a6373d9731..247720e1ae 100644 --- a/android/assets/jsons/Civ V - Gods & Kings/Units.json +++ b/android/assets/jsons/Civ V - Gods & Kings/Units.json @@ -1668,10 +1668,10 @@ "[+1] Sight", "Hidden when religion is disabled", "Unbuildable", "Religious Unit" ], "movement": 3 - } + }, /* Spaceship Parts */ - + // Must be transported to the Capital for launch. // Can be destroyed by any hostile military unit walking in their tile. { diff --git a/android/assets/jsons/translations/German.properties b/android/assets/jsons/translations/German.properties index 97aa4e4337..d00f165b72 100644 --- a/android/assets/jsons/translations/German.properties +++ b/android/assets/jsons/translations/German.properties @@ -582,6 +582,7 @@ We have encountered [civName]! = Wir sind auf [civName] getroffen! [cityStateName] has given us [stats] as a token of goodwill for meeting us = [cityStateName] hat uns [stats] als Zeichen des guten Willens für unsere Begegnung übergeben [cityStateName] has given us [stats] as we are the first major civ to meet them = [cityStateName] hat uns [stats] übergeben, da wir die erste bedeutende Zivilisation sind, die sie getroffen haben [cityStateName] has also given us [stats] = [cityStateName] hat uns auch [stats] gegeben +[cityStateName] gave us a [unitName] as a gift! = [cityStateName] hat uns [unitName] geschenkt! Cannot provide unit upkeep for [unitName] - unit has been disbanded! = Der Unterhalt für [unitName] konnte nicht bezahlt werden - Einheit wurde aufgelöst! [cityName] has grown! = [cityName] ist gewachsen! [cityName] is starving! = [cityName] verhungert! @@ -919,7 +920,7 @@ Conduct Trade Mission = Handelsmission durchführen Your trade mission to [civName] has earned you [goldAmount] gold and [influenceAmount] influence! = Deine Handelsmission zu [civName] hat dir [goldAmount] Gold und [influenceAmount] Einfluss eingebracht! Hurry Wonder = Wunder beschleunigen Hurry Construction = Produktion beschleunigen -Hurry Construction (+[productionAmount]) = Produktion beschleunigen (+[productionAmount]) +Hurry Construction (+[productionAmount]⚙) = Produktion beschleunigen (+[productionAmount]⚙) Spread Religion = Religion verbreiten Spread [religionName] = [religionName] verbreiten Remove Heresy = Ketzerei entfernen @@ -937,6 +938,8 @@ Total = Gesamt Stats = Statistiken Policies = Politik Base happiness = Grundzufriedenheit +Traded Luxuries = Luxusressourcen aus Handel +City-State Luxuries = Luxusressourcen von Stadtstaaten Occupied City = Besetzte Städte Buildings = Gebäude Wonders = Wunder @@ -964,6 +967,7 @@ Increase your supply or reduce the amount of units to remove the production pena Name = Name Closest city = Nächstgelegene Stadt Action = Aktion +Upgrade = Aufrüsten Defeated = Besiegt [numberOfCivs] Civilizations in the game = [numberOfCivs] Zivilisationen sind im Spiel Our Civilization: = Unsere Zivilisation: @@ -1128,7 +1132,6 @@ Change map to fit selected ruleset? = Karte ändern, um sie dem neuen Regelsatz # Civilopedia difficulty levels Player settings = Spieler-Einstellungen -Base Happiness = Basiszufriedenheit Extra happiness per luxury = Zusätzliche Zufriedenheit pro Luxusgut Research cost modifier = Forschungskosten-Modifikator Unit cost modifier = Einheitenkosten-Modifikator @@ -1165,6 +1168,7 @@ Granted by [param] = Von [param] erteilt Granted by: = Erteilt von: [bonus] with [tech] = [bonus] mit [tech] Difficulty levels = Schwierigkeitsgrade +The possible rewards are: = Mögliche Belohnungen: # Policies @@ -1193,6 +1197,7 @@ Religions and Beliefs = Religionen und Glaubenssätze Majority Religion: [name] = Hauptreligion: [name] + [amount] pressure = + [amount] Druck Holy city of: [religionName] = Heilige Stadt von: [religionName] +Followers = Anhänger Pressure = Druck # Religion overview screen @@ -1368,13 +1373,14 @@ non-air = nicht-fliegend relevant = relevante Nuclear Weapon = Atomwaffe City = Stadt +Barbarian = Barbaren +Great Person = Große Persönlichkeit Air = Luft land units = Landeinheiten water units = Wassereinheiten air units = Lufteinheiten military units = militärische submarine units = U-Boot Einheiten -Barbarian = Barbaren ######### City filters ########### @@ -1448,6 +1454,10 @@ Great = Große founding = gründen enhancing = verbessern +######### Religious Action Filters ########### + +Remove Foreign religions from your own cities = Häretiker gnadenlos ausmerzen + ######### Unique Specials ########### all healing effects doubled = alle Heilungseffekte verdoppelt diff --git a/android/assets/jsons/translations/template.properties b/android/assets/jsons/translations/template.properties index 5e3e5d9346..6d305537f7 100644 --- a/android/assets/jsons/translations/template.properties +++ b/android/assets/jsons/translations/template.properties @@ -587,6 +587,7 @@ We have encountered [civName]! = [cityStateName] has given us [stats] as a token of goodwill for meeting us = [cityStateName] has given us [stats] as we are the first major civ to meet them = [cityStateName] has also given us [stats] = +[cityStateName] gave us a [unitName] as a gift! = Cannot provide unit upkeep for [unitName] - unit has been disbanded! = [cityName] has grown! = [cityName] is starving! = @@ -925,7 +926,7 @@ Conduct Trade Mission = Your trade mission to [civName] has earned you [goldAmount] gold and [influenceAmount] influence! = Hurry Wonder = Hurry Construction = -Hurry Construction (+[productionAmount]) = +Hurry Construction (+[productionAmount]⚙) = Spread Religion = Spread [religionName] = Remove Heresy = @@ -943,6 +944,8 @@ Total = Stats = Policies = Base happiness = +Traded Luxuries = +City-State Luxuries = Occupied City = Buildings = Wonders = @@ -970,6 +973,7 @@ Increase your supply or reduce the amount of units to remove the production pena Name = Closest city = Action = +Upgrade = Defeated = [numberOfCivs] Civilizations in the game = Our Civilization: = @@ -1136,7 +1140,6 @@ Change map to fit selected ruleset? = # Civilopedia difficulty levels Player settings = -Base Happiness = Extra happiness per luxury = Research cost modifier = Unit cost modifier = @@ -1173,6 +1176,7 @@ Granted by [param] = Granted by: = [bonus] with [tech] = Difficulty levels = +The possible rewards are: = # Policies @@ -1201,6 +1205,7 @@ Religions and Beliefs = Majority Religion: [name] = + [amount] pressure = Holy city of: [religionName] = +Followers = Pressure = # Religion overview screen diff --git a/core/src/com/unciv/models/ruleset/Difficulty.kt b/core/src/com/unciv/models/ruleset/Difficulty.kt index c6a86cfe8c..db6740e382 100644 --- a/core/src/com/unciv/models/ruleset/Difficulty.kt +++ b/core/src/com/unciv/models/ruleset/Difficulty.kt @@ -47,7 +47,7 @@ class Difficulty: INamed, ICivilopediaText { override fun getCivilopediaTextLines(ruleset: Ruleset): List { val lines = ArrayList() lines += FormattedLine("Player settings", header = 3) - lines += FormattedLine("{Base Happiness}: $baseHappiness ${Fonts.happiness}", indent = 1) + lines += FormattedLine("{Base happiness}: $baseHappiness ${Fonts.happiness}", indent = 1) lines += FormattedLine("{Extra happiness per luxury}: ${extraHappinessPerLuxury.toInt()} ${Fonts.happiness}", indent = 1) lines += FormattedLine("{Research cost modifier}: ${researchCostModifier.toPercent()}% ${Fonts.science}", indent = 1) lines += FormattedLine("{Unit cost modifier}: ${unitCostModifier.toPercent()}% ${Fonts.production}", indent = 1) diff --git a/core/src/com/unciv/models/ruleset/Nation.kt b/core/src/com/unciv/models/ruleset/Nation.kt index 379a4f9240..79e5392b7b 100644 --- a/core/src/com/unciv/models/ruleset/Nation.kt +++ b/core/src/com/unciv/models/ruleset/Nation.kt @@ -144,7 +144,7 @@ class Nation : RulesetObject() { private fun getCityStateInfo(ruleset: Ruleset): List { val textList = ArrayList() - textList += FormattedLine("{Type}: [$cityStateType]", header = 4, color = cityStateType!!.color) + textList += FormattedLine("{Type}: {$cityStateType}", header = 4, color = cityStateType!!.color) val era = if (UncivGame.isCurrentInitialized() && UncivGame.Current.isGameInfoInitialized()) UncivGame.Current.gameInfo.currentPlayerCiv.getEra() @@ -155,7 +155,7 @@ class Nation : RulesetObject() { val friendBonus = era.friendBonus[cityStateType!!.name] if (friendBonus != null && friendBonus.isNotEmpty()) { textList += FormattedLine() - textList += FormattedLine("{When Friends}: ") + textList += FormattedLine("{When Friends:} ") friendBonus.forEach { textList += FormattedLine(Unique(it), indent = 1) if (it == "Provides a unique luxury") showResources = true @@ -165,7 +165,7 @@ class Nation : RulesetObject() { val allyBonus = era.allyBonus[cityStateType!!.name] if (allyBonus != null && allyBonus.isNotEmpty()) { textList += FormattedLine() - textList += FormattedLine("{When Allies}: ") + textList += FormattedLine("{When Allies:} ") allyBonus.forEach { textList += FormattedLine(Unique(it), indent = 1) if (it == "Provides a unique luxury") showResources = true diff --git a/core/src/com/unciv/models/ruleset/unique/UniqueParameterType.kt b/core/src/com/unciv/models/ruleset/unique/UniqueParameterType.kt index f17a936436..b45e0d75e4 100644 --- a/core/src/com/unciv/models/ruleset/unique/UniqueParameterType.kt +++ b/core/src/com/unciv/models/ruleset/unique/UniqueParameterType.kt @@ -89,6 +89,8 @@ enum class UniqueParameterType( "relevant", "Nuclear Weapon", "City", + "Barbarian", + "Great Person", // These are up for debate "Air", "land units", @@ -96,7 +98,6 @@ enum class UniqueParameterType( "air units", "military units", "submarine units", - "Barbarian" // Note: this can't handle combinations of parameters (e.g. [{Military} {Water}]) ) @@ -381,6 +382,7 @@ enum class UniqueParameterType( }, FoundingOrEnhancing("foundingOrEnhancing", "Prophet Action Filters") { + // Used in FreeExtraBeliefs, FreeExtraAnyBeliefs private val knownValues = setOf("founding", "enhancing") override fun getErrorSeverity(parameterText: String, ruleset: Ruleset): UniqueType.UniqueComplianceErrorSeverity? = when (parameterText) { @@ -390,6 +392,17 @@ enum class UniqueParameterType( override fun getTranslationWriterStringsForOutput() = knownValues }, + //TODO the Unique "Can [] [] times" that should use this isn't typed yet + ReligiousAction("religiousAction", "Religious Action Filters") { + private val knownValues = setOf(Constants.spreadReligionAbilityCount, Constants.removeHeresyAbilityCount) + override fun getErrorSeverity(parameterText: String, ruleset: Ruleset): + UniqueType.UniqueComplianceErrorSeverity? = when (parameterText) { + in knownValues -> null + else -> UniqueType.UniqueComplianceErrorSeverity.RulesetInvariant + } + override fun getTranslationWriterStringsForOutput() = knownValues + }, + Technology("tech") { override fun getErrorSeverity(parameterText: String, ruleset: Ruleset): UniqueType.UniqueComplianceErrorSeverity? = when (parameterText) { diff --git a/core/src/com/unciv/ui/trade/DiplomacyScreen.kt b/core/src/com/unciv/ui/trade/DiplomacyScreen.kt index 5272e2ae51..5f02dabb3b 100644 --- a/core/src/com/unciv/ui/trade/DiplomacyScreen.kt +++ b/core/src/com/unciv/ui/trade/DiplomacyScreen.kt @@ -208,7 +208,7 @@ class DiplomacyScreen( val protectors = otherCiv.getProtectorCivs() if (protectors.isNotEmpty()) { - val protectorString = "{Protected by}: " + protectors.joinToString(", ") { it.civName } + val protectorString = "{Protected by}: " + protectors.joinToString(", ") { it.civName.tr() } diplomacyTable.add(protectorString.toLabel()).row() } @@ -225,12 +225,12 @@ class DiplomacyScreen( val eraInfo = viewingCiv.getEra() - var friendBonusText = "{When Friends}: ".tr() + var friendBonusText = "{When Friends:} ".tr() val friendBonusObjects = eraInfo.getCityStateBonuses(otherCiv.cityStateType, RelationshipLevel.Friend) val friendBonusStrings = getAdjustedBonuses(friendBonusObjects) friendBonusText += friendBonusStrings.joinToString(separator = ", ") { it.tr() } - var allyBonusText = "{When Allies}: ".tr() + var allyBonusText = "{When Allies:} ".tr() val allyBonusObjects = eraInfo.getCityStateBonuses(otherCiv.cityStateType, RelationshipLevel.Ally) val allyBonusStrings = getAdjustedBonuses(allyBonusObjects) allyBonusText += allyBonusStrings.joinToString(separator = ", ") { it.tr() } diff --git a/core/src/com/unciv/ui/worldscreen/unit/UnitActions.kt b/core/src/com/unciv/ui/worldscreen/unit/UnitActions.kt index 093c6a4f23..7faf34b0ad 100644 --- a/core/src/com/unciv/ui/worldscreen/unit/UnitActions.kt +++ b/core/src/com/unciv/ui/worldscreen/unit/UnitActions.kt @@ -482,6 +482,7 @@ object UnitActions { (300 + 30 * tile.getCity()!!.population.population) * unit.civInfo.gameInfo.gameParameters.gameSpeed.modifier, cityConstructions.getRemainingWork(cityConstructions.currentConstructionFromQueue).toFloat() - 1 ).toInt() + if (productionPointsToAdd <= 0) continue actionList += UnitAction(UnitActionType.HurryBuilding, title = "Hurry Construction (+[$productionPointsToAdd]⚙)",