From 4bbffe318b4fd8e543b875ea7a379af9c5f58a90 Mon Sep 17 00:00:00 2001 From: Yair Morgenstern Date: Mon, 25 Jun 2018 21:50:56 +0300 Subject: [PATCH] More translation stuff --- android/assets/jsons/Translations.json | 33 +++++++++---------- android/build.gradle | 4 +-- core/src/com/unciv/logic/GameInfo.kt | 2 +- .../unciv/logic/automation/UnitAutomation.kt | 4 +-- .../com/unciv/models/gamebasics/unit/Unit.kt | 7 ++-- 5 files changed, 24 insertions(+), 26 deletions(-) diff --git a/android/assets/jsons/Translations.json b/android/assets/jsons/Translations.json index 3f0a886f77..b247814fae 100644 --- a/android/assets/jsons/Translations.json +++ b/android/assets/jsons/Translations.json @@ -7,12 +7,7 @@ German:"Nächste Runde" } - "Waiting":{ // Displayed when next turn is being...turned - Italian:"In attesa" - Russian:"В ожидании" - French:"Attendre" - Romanian:"Aşteptare" - German:"Warten..." + "Working...":{ // Displayed when next turn is being...turned } "Turn":{ // For main screen at top left, e.g. Turn 234 @@ -633,20 +628,20 @@ German:"Ein(e) feindliche(r) [unit] wurde zerstört beim Angriff auf unsere(n) [ourUnit]" // Gender sensitive } - "spotted near our territory":{ - Italian:"avvistato vicino al nostro territorio" - Russian:"пятнистый у нашей территории" - French:"repéré près de notre territoire" - Romanian:"reperat în apropierea teritoriului nostru" - German:"wurde nahe unserer Grenzen entdeckt" + "An enemy [unit] was spotted near our territory":{ + Italian:"Un'unità [unit] avvistato vicino al nostro territorio" + Russian:"Враг [unit] пятнистый у нашей территории" + French:"Un ennemi [unit] repéré près de notre territoire" + Romanian:"Un inamic [unit] reperat în apropierea teritoriului nostru" + German:"Ein(e) feindliche(r) [unit] wurde nahe unserer Grenzen entdeckt" } - "spotted in our territory":{ - Italian:"avvistato nel nostro territorio" - Russian:"пятнистый на нашей территории" - French:"repéré sur notre territoire" - Romanian:"reperat pe teritoriul nostru" - German:"wurde in unseren Grenzen entdeckt" + "An enemy [unit] was spotted in our territory":{ + Italian:"Un'unità [unit] avvistato nel nostro territorio" + Russian:"Враг [unit] пятнистый на нашей территории" + French:"Un ennemi [unit] repéré sur notre territoire" + Romanian:"Un inamic [unit] reperat pe teritoriul nostru" + German:"Ein(e) feindliche(r) [unit] wurde in unseren Grenzen entdeckt" } @@ -1609,6 +1604,8 @@ German:"Zukünftige Technologien" } + "Who knows what the future holds?":{} + // Tech Eras "Ancient":{} "Classical":{} diff --git a/android/build.gradle b/android/build.gradle index afb440a8eb..20f542511c 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -21,8 +21,8 @@ android { applicationId "com.unciv.game" minSdkVersion 14 targetSdkVersion 26 - versionCode 93 - versionName "2.5.7" + versionCode 94 + versionName "2.5.8" } buildTypes { release { diff --git a/core/src/com/unciv/logic/GameInfo.kt b/core/src/com/unciv/logic/GameInfo.kt index 433c00eb0a..fccb7b18b5 100644 --- a/core/src/com/unciv/logic/GameInfo.kt +++ b/core/src/com/unciv/logic/GameInfo.kt @@ -55,7 +55,7 @@ class GameInfo { && (it.getOwner()==player || it.neighbors.any { neighbor -> neighbor.getOwner()==player }) } for(enemyUnitTile in enemyUnitsCloseToTerritory) { val inOrNear = if(enemyUnitTile.getOwner()==player) "in" else "near" - player.addNotification("Enemy spotted $inOrNear our territory!", enemyUnitTile.position, Color.RED) + player.addNotification("An enemy [${enemyUnitTile.militaryUnit!!.name}] was spotted $inOrNear our territory", enemyUnitTile.position, Color.RED) } turns++ diff --git a/core/src/com/unciv/logic/automation/UnitAutomation.kt b/core/src/com/unciv/logic/automation/UnitAutomation.kt index 9778d76af7..2091c8cf6b 100644 --- a/core/src/com/unciv/logic/automation/UnitAutomation.kt +++ b/core/src/com/unciv/logic/automation/UnitAutomation.kt @@ -49,12 +49,12 @@ class UnitAutomation{ val rangeOfAttack = if(MapUnitCombatant(unit).isMelee()) 1 else unit.getBaseUnit().range val attackableTiles = ArrayList() - // The +0.09 solves a bug where you've moved 2/3 road tiles, + // The >0.1 (instead of >0) solves a bug where you've moved 2/3 road tiles, // you come to move a third (distance is less that remaining movements), // and then later we round it off to a whole. // So the poor unit thought it could attack from the tile, but when it comes to do so it has no moveement points! // Silly floats, basically - val tilesToAttackFrom = distanceToTiles.filter { (it.value+0.09) < unit.currentMovement } + val tilesToAttackFrom = distanceToTiles.filter { unit.currentMovement - it.value > 0.1 } .map { it.key } .filter { unit.canMoveTo(it) || it==unit.getTile() } for(reachableTile in tilesToAttackFrom){ // tiles we'll still have energy after we reach there diff --git a/core/src/com/unciv/models/gamebasics/unit/Unit.kt b/core/src/com/unciv/models/gamebasics/unit/Unit.kt index 78b0890166..f20840cf53 100644 --- a/core/src/com/unciv/models/gamebasics/unit/Unit.kt +++ b/core/src/com/unciv/models/gamebasics/unit/Unit.kt @@ -46,7 +46,7 @@ class Unit : INamed, IConstruction, ICivilopedia { fun getDescription(forPickerScreen:Boolean): String { val sb = StringBuilder() - if(baseDescription!=null) sb.appendln(baseDescription) + if(baseDescription!=null) sb.appendln(baseDescription!!.tr()) if(!forPickerScreen) { if (unbuildable) sb.appendln("Unbuildable") else sb.appendln("Cost: $cost") @@ -60,8 +60,9 @@ class Unit : INamed, IConstruction, ICivilopedia { } if(uniques!=null){ - for(unique in uniques!!) - sb.appendln(unique) + for(unique in uniques!!) { + sb.appendln(unique.tr()) + } } sb.appendln("{Movement}: $movement".tr()) return sb.toString()