Fix current list of un-translatables (#7057)

* Fix current list of un-translatables

* Fix current list of un-translatables - revert tr() change and tweak map editor map parameter display
This commit is contained in:
SomeTroglodyte 2022-06-06 06:43:28 +02:00 committed by GitHub
parent 13da7c1b9e
commit bbe74854b4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 21 additions and 19 deletions

View File

@ -4583,7 +4583,7 @@ Desert Folklore = Wüsten-Folklore
Faith Healers = Glaubensheiler Faith Healers = Glaubensheiler
[mapUnitFilter] Units adjacent to this city heal [amount] HP per turn when healing = Während Heilen, erhalten [mapUnitFilter] Einheiten, die benachbart zu dieser Stadt sind, [amount] LP pro Runde [mapUnitFilter] Units adjacent to this city heal [amount] HP per turn when healing = Während Heilen, erhalten [mapUnitFilter] Einheiten, die benachbart zu dieser Stadt sind, [amount] LP pro Runde
Fertility Rites = Fruchtbarkeitsraten Fertility Rites = Fruchtbarkeitsriten
God of Craftsman = Gott der Handwerker God of Craftsman = Gott der Handwerker
in cities with at least [amount] [populationFilter] = in Städten mit mindestens [amount] [populationFilter] in cities with at least [amount] [populationFilter] = in Städten mit mindestens [amount] [populationFilter]

View File

@ -572,6 +572,7 @@ You have to write a name for your friend! =
You have to write an ID for your friend! = You have to write an ID for your friend! =
You cannot add your own player ID in your friend list! = You cannot add your own player ID in your friend list! =
To add a friend, ask him to send you his player ID.\nClick the 'Add friend' button.\nInsert his player ID and a name for him.\nThen click the 'Add friend' button again.\n\nAfter that you will see him in your friends list.\n\nA new button will appear when creating a new\nmultiplayer game, which allows you to select your friend. = To add a friend, ask him to send you his player ID.\nClick the 'Add friend' button.\nInsert his player ID and a name for him.\nThen click the 'Add friend' button again.\n\nAfter that you will see him in your friends list.\n\nA new button will appear when creating a new\nmultiplayer game, which allows you to select your friend. =
Please input Player ID! =
Set current user = Set current user =
Player ID from clipboard = Player ID from clipboard =
Player ID from friends list = Player ID from friends list =

View File

@ -70,7 +70,7 @@ class MapSizeNew {
this.radius = getEquivalentHexagonalRadius(width, height) this.radius = getEquivalentHexagonalRadius(width, height)
} }
fun clone() = MapSizeNew().also { fun clone() = MapSizeNew().also {
it.name = name it.name = name
it.radius = radius it.radius = radius
it.width = width it.width = width
@ -236,14 +236,16 @@ class MapParameters {
override fun toString() = sequence { override fun toString() = sequence {
if (name.isNotEmpty()) yield("\"$name\" ") if (name.isNotEmpty()) yield("\"$name\" ")
yield("(") yield("(")
if (mapSize.name != MapSize.custom) yield(mapSize.name + " ") if (mapSize.name != MapSize.custom) yield("{${mapSize.name}} ")
if (worldWrap) yield("{wrapped} ") if (worldWrap) yield("{World Wrap} ")
yield(shape) yield("{$shape}")
yield(" " + displayMapDimensions() + ")") yield(" " + displayMapDimensions() + ")")
yield(mapResources) if(mapResources != MapResources.default) yield(" {Resource Setting}: {$mapResources}")
if (name.isEmpty()) return@sequence if (name.isEmpty()) return@sequence
yield("\n$type, {Seed} $seed") yield("\n")
yield(", {Map Height}=" + elevationExponent.niceToString(2)) if (type != MapType.custom && type != MapType.empty) yield("{Map Generation Type}: {$type}, ")
yield("{RNG Seed} $seed")
yield(", {Map Elevation}=" + elevationExponent.niceToString(2))
yield(", {Temperature extremeness}=" + temperatureExtremeness.niceToString(2)) yield(", {Temperature extremeness}=" + temperatureExtremeness.niceToString(2))
yield(", {Resource richness}=" + resourceRichness.niceToString(3)) yield(", {Resource richness}=" + resourceRichness.niceToString(3))
yield(", {Vegetation richness}=" + vegetationRichness.niceToString(2)) yield(", {Vegetation richness}=" + vegetationRichness.niceToString(2))
@ -252,7 +254,7 @@ class MapParameters {
yield(", {Biome areas extension}=$tilesPerBiomeArea") yield(", {Biome areas extension}=$tilesPerBiomeArea")
yield(", {Water level}=" + waterThreshold.niceToString(2)) yield(", {Water level}=" + waterThreshold.niceToString(2))
}.joinToString("") }.joinToString("")
fun numberOfTiles() = fun numberOfTiles() =
if (shape == MapShape.hexagonal) { if (shape == MapShape.hexagonal) {
1 + 3 * mapSize.radius * (mapSize.radius - 1) 1 + 3 * mapSize.radius * (mapSize.radius - 1)

View File

@ -578,8 +578,8 @@ open class TileInfo {
/** Generates a sequence of reasons that prevent building given [improvement]. /** Generates a sequence of reasons that prevent building given [improvement].
* If the sequence is empty, improvement can be built immediately. * If the sequence is empty, improvement can be built immediately.
*/ */
fun getImprovementBuildingProblems(improvement: TileImprovement, civInfo: CivilizationInfo, failFast: Boolean = false): Sequence<ImprovementBuildingProblem> = sequence { fun getImprovementBuildingProblems(improvement: TileImprovement, civInfo: CivilizationInfo): Sequence<ImprovementBuildingProblem> = sequence {
val stateForConditionals = StateForConditionals(civInfo, tile=this@TileInfo) val stateForConditionals = StateForConditionals(civInfo, tile = this@TileInfo)
if (improvement.uniqueTo != null && improvement.uniqueTo != civInfo.civName) if (improvement.uniqueTo != null && improvement.uniqueTo != civInfo.civName)
yield(ImprovementBuildingProblem.WrongCiv) yield(ImprovementBuildingProblem.WrongCiv)

View File

@ -485,4 +485,3 @@ fun String.removeConditionals(): String {
.replace(" ", " ") .replace(" ", " ")
.trim() .trim()
} }

View File

@ -79,7 +79,7 @@ class MapEditorViewTab(
val area = tileMap.values.size val area = tileMap.values.size
val waterPercent = (tileMap.values.count { it.isWater } * 100f / area).toInt() val waterPercent = (tileMap.values.count { it.isWater } * 100f / area).toInt()
val continents = tileMap.continentSizes.size val continents = tileMap.continentSizes.size
val statsText = "Area: [$area] tiles, $waterPercent% water, [$continents] continents/islands" val statsText = "Area: [$area] tiles, [$waterPercent]% water, [$continents] continents/islands"
val statsLabel = WrappableLabel(statsText, labelWidth) val statsLabel = WrappableLabel(statsText, labelWidth)
add(statsLabel.apply { wrap = true }).row() add(statsLabel.apply { wrap = true }).row()
@ -135,7 +135,7 @@ class MapEditorViewTab(
addSeparator() addSeparator()
add("Exit map editor".toTextButton().apply { onClick(editorScreen::closeEditor) }).row() add("Exit map editor".toTextButton().apply { onClick(editorScreen::closeEditor) }).row()
invalidateHierarchy() //todo - unsure this helps invalidateHierarchy() //todo - unsure this helps
validate() validate()
} }

View File

@ -20,8 +20,8 @@ object MultiplayerHelpers {
fun getLoadExceptionMessage(ex: Throwable) = when (ex) { fun getLoadExceptionMessage(ex: Throwable) = when (ex) {
is FileStorageRateLimitReached -> "Server limit reached! Please wait for [${ex.limitRemainingSeconds}] seconds" is FileStorageRateLimitReached -> "Server limit reached! Please wait for [${ex.limitRemainingSeconds}] seconds"
is FileNotFoundException -> "File could not be found on the multiplayer server" is FileNotFoundException -> "File could not be found on the multiplayer server"
is UncivShowableException -> ex.message!! // some of these seem to be translated already, but not all is UncivShowableException -> ex.message // If this is already translated, it's an error on the throwing side!
else -> "Unhandled problem, [${ex::class.simpleName}] ${ex.message}" else -> "Unhandled problem, [${ex::class.simpleName} ${ex.localizedMessage}]"
} }
fun loadMultiplayerGame(screen: BaseScreen, selectedGame: OnlineMultiplayerGame) { fun loadMultiplayerGame(screen: BaseScreen, selectedGame: OnlineMultiplayerGame) {

View File

@ -34,7 +34,7 @@ class MultiplayerScreen(previousScreen: BaseScreen) : PickerScreen() {
private val copyUserIdText = "Copy user ID" private val copyUserIdText = "Copy user ID"
private val copyUserIdButton = createCopyUserIdButton() private val copyUserIdButton = createCopyUserIdButton()
private val friendsListText = "Friends List" private val friendsListText = "Friends list"
private val friendsListButton = createFriendsListButton() private val friendsListButton = createFriendsListButton()
private val refreshText = "Refresh list" private val refreshText = "Refresh list"

View File

@ -97,7 +97,7 @@ class MapOptionsTable(private val newGameScreen: NewGameScreen): Table() {
Popup(newGameScreen).apply { Popup(newGameScreen).apply {
addGoodSizedLabel("Could not load map!").row() addGoodSizedLabel("Could not load map!").row()
if (ex is UncivShowableException) if (ex is UncivShowableException)
addGoodSizedLabel(ex.message!!).row() addGoodSizedLabel(ex.message).row()
addCloseButton() addCloseButton()
open() open()
} }

View File

@ -83,7 +83,7 @@ abstract class LoadOrSaveScreen(
} catch (ex: Throwable) { } catch (ex: Throwable) {
"Failed to delete [$selectedSave]." "Failed to delete [$selectedSave]."
} }
descriptionLabel.setText(result) descriptionLabel.setText(result.tr())
} }
private fun updateShownSaves(showAutosaves: Boolean) { private fun updateShownSaves(showAutosaves: Boolean) {