Make "Help" button clearer and translatable, random nation indicators and labels translatable. (#6013)

* Make unknown nation placeholder translatable.

* Make MultiplayerScreen help button clearer and translatable.

* Use `Constants.spectator` more.

* Make random/unknown nation icon translatable.
This commit is contained in:
will-ca 2022-01-23 00:39:28 -08:00 committed by GitHub
parent 7e4a2944c3
commit fe67dfa1c4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 19 additions and 7 deletions

View File

@ -344,6 +344,10 @@ Cultural =
Diplomatic = Diplomatic =
Time = Time =
# Used for random nation indicator in empire selector and unknown nation icons in various overview screens.
# Should be a single character, or at least visually square.
? =
Map Shape = Map Shape =
Hexagonal = Hexagonal =
Rectangular = Rectangular =
@ -429,6 +433,7 @@ Anything above 40 may work very slowly on Android! =
# Multiplayer # Multiplayer
Help =
Username = Username =
Multiplayer = Multiplayer =
Could not download game! = Could not download game! =
@ -752,6 +757,8 @@ We Love The King Day =
[year] BC = [year] BC =
[year] AD = [year] AD =
Civilopedia = Civilopedia =
# Display name of unknown nations.
??? =
Start new game = Start new game =
Save game = Save game =

View File

@ -37,6 +37,7 @@ object Constants {
const val researchAgreement = "Research Agreement" const val researchAgreement = "Research Agreement"
const val openBorders = "Open Borders" const val openBorders = "Open Borders"
const val random = "Random" const val random = "Random"
const val unknownNationName = "???"
const val fort = "Fort" const val fort = "Fort"
const val citadel = "Citadel" const val citadel = "Citadel"

View File

@ -1,5 +1,6 @@
package com.unciv.models.simulation package com.unciv.models.simulation
import com.unciv.Constants
import com.unciv.logic.GameInfo import com.unciv.logic.GameInfo
import com.unciv.logic.GameStarter import com.unciv.logic.GameStarter
import com.unciv.models.ruleset.VictoryType import com.unciv.models.ruleset.VictoryType
@ -17,7 +18,7 @@ class Simulation(
private val maxTurns: Int = 1000 private val maxTurns: Int = 1000
) { ) {
private val maxSimulations = threadsNumber * simulationsPerThread private val maxSimulations = threadsNumber * simulationsPerThread
val civilizations = newGameInfo.civilizations.filter { it.civName != "Spectator" }.map { it.civName } val civilizations = newGameInfo.civilizations.filter { it.civName != Constants.spectator }.map { it.civName }
private var startTime: Long = 0 private var startTime: Long = 0
private var endTime: Long = 0 private var endTime: Long = 0
var steps = ArrayList<SimulationStep>() var steps = ArrayList<SimulationStep>()

View File

@ -40,7 +40,7 @@ class MultiplayerScreen(previousScreen: BaseScreen) : PickerScreen() {
//Help Button Setup //Help Button Setup
val tab = Table() val tab = Table()
val helpButton = "?".toTextButton() val helpButton = "Help".toTextButton()
helpButton.onClick { helpButton.onClick {
val helpPopup = Popup(this) val helpPopup = Popup(this)
helpPopup.addGoodSizedLabel("To create a multiplayer game, check the 'multiplayer' toggle in the New Game screen, and for each human player insert that player's user ID.").row() helpPopup.addGoodSizedLabel("To create a multiplayer game, check the 'multiplayer' toggle in the New Game screen, and for each human player insert that player's user ID.").row()

View File

@ -134,7 +134,7 @@ class EmpireOverviewScreen(private var viewingPlayer:CivilizationInfo, defaultPa
} else { } else {
civGroup.add(ImageGetter.getRandomNationIndicator(30f)) civGroup.add(ImageGetter.getRandomNationIndicator(30f))
backgroundColor = Color.DARK_GRAY backgroundColor = Color.DARK_GRAY
labelText = "???" labelText = Constants.unknownNationName
} }
civGroup.background = ImageGetter.getRoundedEdgeRectangle(backgroundColor) civGroup.background = ImageGetter.getRoundedEdgeRectangle(backgroundColor)

View File

@ -2,6 +2,7 @@ package com.unciv.ui.overviewscreen
import com.badlogic.gdx.scenes.scene2d.ui.Button import com.badlogic.gdx.scenes.scene2d.ui.Button
import com.badlogic.gdx.scenes.scene2d.ui.Table import com.badlogic.gdx.scenes.scene2d.ui.Table
import com.unciv.Constants
import com.unciv.UncivGame import com.unciv.UncivGame
import com.unciv.logic.civilization.CivilizationInfo import com.unciv.logic.civilization.CivilizationInfo
import com.unciv.logic.civilization.ReligionState import com.unciv.logic.civilization.ReligionState
@ -111,7 +112,7 @@ class ReligionOverviewTable(
val foundingCivName = val foundingCivName =
if (viewingPlayer.knows(religion.foundingCivName) || viewingPlayer.civName == religion.foundingCivName) if (viewingPlayer.knows(religion.foundingCivName) || viewingPlayer.civName == religion.foundingCivName)
religion.foundingCivName religion.foundingCivName
else "???" else Constants.unknownNationName
statsTable.add(foundingCivName.toLabel()).right().pad(5f).row() statsTable.add(foundingCivName.toLabel()).right().pad(5f).row()
if (religion.isMajorReligion()) { if (religion.isMajorReligion()) {
val holyCity = gameInfo.getCities().firstOrNull { it.religion.religionThisIsTheHolyCityOf == religion.name } val holyCity = gameInfo.getCities().firstOrNull { it.religion.religionThisIsTheHolyCityOf == religion.name }
@ -120,7 +121,7 @@ class ReligionOverviewTable(
val cityName = val cityName =
if (viewingPlayer.exploredTiles.contains(holyCity.getCenterTile().position)) if (viewingPlayer.exploredTiles.contains(holyCity.getCenterTile().position))
holyCity.name holyCity.name
else "???" else Constants.unknownNationName
statsTable.add(cityName.toLabel()).right().pad(5f).row() statsTable.add(cityName.toLabel()).right().pad(5f).row()
} }
} }

View File

@ -4,6 +4,7 @@ import com.badlogic.gdx.graphics.Color
import com.badlogic.gdx.scenes.scene2d.ui.Table import com.badlogic.gdx.scenes.scene2d.ui.Table
import com.badlogic.gdx.scenes.scene2d.ui.TextButton import com.badlogic.gdx.scenes.scene2d.ui.TextButton
import com.badlogic.gdx.utils.Align import com.badlogic.gdx.utils.Align
import com.unciv.Constants
import com.unciv.logic.civilization.CivilizationInfo import com.unciv.logic.civilization.CivilizationInfo
import com.unciv.models.ruleset.Policy import com.unciv.models.ruleset.Policy
import com.unciv.models.ruleset.VictoryType import com.unciv.models.ruleset.VictoryType
@ -158,7 +159,7 @@ class VictoryScreen(val worldScreen: WorldScreen) : PickerScreen() {
if (civ.isCurrentPlayer() || !civ.isMajorCiv()) continue if (civ.isCurrentPlayer() || !civ.isMajorCiv()) continue
val civName = val civName =
if (playerCivInfo.diplomacy.containsKey(civ.civName)) civ.civName if (playerCivInfo.diplomacy.containsKey(civ.civName)) civ.civName
else "???" else Constants.unknownNationName
table.add(getMilestone("Destroy [$civName]", civ.isDefeated())).row() table.add(getMilestone("Destroy [$civName]", civ.isDefeated())).row()
} }
return table return table

View File

@ -1,5 +1,6 @@
package com.unciv.app.desktop package com.unciv.app.desktop
import com.unciv.Constants
import com.unciv.UncivGame import com.unciv.UncivGame
import com.unciv.UncivGameParameters import com.unciv.UncivGameParameters
import com.unciv.logic.GameStarter import com.unciv.logic.GameStarter
@ -79,7 +80,7 @@ internal object ConsoleLauncher {
}) })
add(Player().apply { add(Player().apply {
playerType = PlayerType.Human playerType = PlayerType.Human
chosenCiv = "Spectator" chosenCiv = Constants.spectator
}) })
} }
} }