From 92abe0cf73781e39586c8b584e82758e9412ca44 Mon Sep 17 00:00:00 2001 From: Yair Morgenstern Date: Fri, 15 Jun 2018 16:48:38 +0300 Subject: [PATCH] More translations! --- android/assets/jsons/Translations.json | 19 +++++++++++++++++-- .../com/unciv/models/gamebasics/Building.kt | 2 +- .../com/unciv/models/gamebasics/Technology.kt | 3 ++- .../com/unciv/models/gamebasics/unit/Unit.kt | 13 +++++++------ 4 files changed, 27 insertions(+), 10 deletions(-) diff --git a/android/assets/jsons/Translations.json b/android/assets/jsons/Translations.json index 97102ccfe4..7c45df6735 100644 --- a/android/assets/jsons/Translations.json +++ b/android/assets/jsons/Translations.json @@ -113,6 +113,8 @@ French:"Bonheur" Romanian:"Fericire" } + "Production":{ + } "Culture":{ Italian:"Cultura" Russian:"Культура" @@ -219,6 +221,20 @@ "Train":{ // eg Train Scout } + + // Tech picker + "Pick a tech":{ // eg "Research Pottery" + } + "Research":{ // eg "Research Pottery" + } + "Units enabled":{ // eg "Research Pottery" + } + "Buildings enabled":{ // eg "Research Pottery" + } + "Wonders enabled":{ // eg "Research Pottery" + } + "Tile improvements enabled":{ // eg "Research Pottery" + } // Notifications // Some notifications have an exclamation mark after them - is the exclamation mark different in other languages? @@ -357,8 +373,6 @@ } "Gems":{ } - "Gold":{ - } "Silver":{ } "Incense":{ @@ -413,6 +427,7 @@ "Customs house":{ } + // Technologies (Ancient Era) "Pottery":{ diff --git a/core/src/com/unciv/models/gamebasics/Building.kt b/core/src/com/unciv/models/gamebasics/Building.kt index 1e87a020a8..eb3e94fdb0 100644 --- a/core/src/com/unciv/models/gamebasics/Building.kt +++ b/core/src/com/unciv/models/gamebasics/Building.kt @@ -124,7 +124,7 @@ class Building : NamedStats(), IConstruction{ stringBuilder.appendln("$resources provide $resourceBonusStats") } if (maintenance != 0) - stringBuilder.appendln("Maintenance cost: $maintenance gold") + stringBuilder.appendln("Maintenance cost: $maintenance "+"Gold".tr()) return stringBuilder.toString().trim() } diff --git a/core/src/com/unciv/models/gamebasics/Technology.kt b/core/src/com/unciv/models/gamebasics/Technology.kt index f6ada81fc9..f82a04c5f0 100644 --- a/core/src/com/unciv/models/gamebasics/Technology.kt +++ b/core/src/com/unciv/models/gamebasics/Technology.kt @@ -16,7 +16,8 @@ class Technology : ICivilopedia { } val enabledUnits = GameBasics.Units.values.filter { it.requiredTech==name } - if(enabledUnits.isNotEmpty()) SB.appendln("Units enabled: "+enabledUnits.map { it.name + " ("+it.getShortDescription()+")" }.joinToString()) + if(enabledUnits.isNotEmpty()) SB.appendln("" + + "Units enabled: "+enabledUnits.map { it.name + " ("+it.getShortDescription()+")" }.joinToString()) val enabledBuildings = GameBasics.Buildings.values.filter { it.requiredTech==name } val regularBuildings = enabledBuildings.filter { !it.isWonder } diff --git a/core/src/com/unciv/models/gamebasics/unit/Unit.kt b/core/src/com/unciv/models/gamebasics/unit/Unit.kt index 6b60f65444..7d9bcaf26e 100644 --- a/core/src/com/unciv/models/gamebasics/unit/Unit.kt +++ b/core/src/com/unciv/models/gamebasics/unit/Unit.kt @@ -6,6 +6,7 @@ import com.unciv.logic.civilization.CivilizationInfo import com.unciv.logic.map.MapUnit import com.unciv.models.gamebasics.ICivilopedia import com.unciv.models.stats.INamed +import com.unciv.ui.utils.tr class Unit : INamed, IConstruction, ICivilopedia { @@ -33,9 +34,9 @@ class Unit : INamed, IConstruction, ICivilopedia { fun getShortDescription(): String { val infoList= mutableListOf() if(baseDescription!=null) infoList+=baseDescription!! - if(strength!=0) infoList += "strength: $strength" - if(rangedStrength!=0) infoList += "ranged strength: $rangedStrength" - if(movement!=2) infoList+="movement: $movement" + if(strength!=0) infoList += "Strength".tr()+": $strength" + if(rangedStrength!=0) infoList += "Ranged strength".tr()+": $rangedStrength" + if(movement!=2) infoList+="Movement".tr()+": $movement" return infoList.joinToString() } @@ -49,8 +50,8 @@ class Unit : INamed, IConstruction, ICivilopedia { if(requiredTech!=null) sb.appendln("Required tech: $requiredTech") } if(strength!=0){ - sb.append("Strength: $strength") - if(rangedStrength!=0) sb.append(", Ranged strength: $rangedStrength") + sb.append("Strength".tr()+": $strength") + if(rangedStrength!=0) sb.append(", "+"Ranged strength".tr()+": $rangedStrength") sb.appendln() } @@ -58,7 +59,7 @@ class Unit : INamed, IConstruction, ICivilopedia { for(unique in uniques!!) sb.appendln(unique) } - sb.appendln("Movement: $movement") + sb.appendln("Movement".tr()+": $movement") return sb.toString() }