mirror of
https://github.com/yairm210/Unciv.git
synced 2025-08-03 16:49:15 +07:00
Added more translations in the code
This commit is contained in:
@ -81,6 +81,9 @@
|
|||||||
Romanian:"Fortifica"
|
Romanian:"Fortifica"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
"Set up":{ // For siege units
|
||||||
|
}
|
||||||
|
|
||||||
"Health":{
|
"Health":{
|
||||||
Italian:"Salute"
|
Italian:"Salute"
|
||||||
Russian:"Здоровье"
|
Russian:"Здоровье"
|
||||||
@ -203,28 +206,73 @@
|
|||||||
|
|
||||||
"Maintainance cost":{
|
"Maintainance cost":{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
"Pick construction":{ // eg Build Granary
|
||||||
|
}
|
||||||
|
|
||||||
|
"Build":{ // eg Build Granary
|
||||||
|
}
|
||||||
|
|
||||||
|
"Train":{ // eg Train Scout
|
||||||
|
}
|
||||||
|
|
||||||
// Notifications
|
// Notifications
|
||||||
" has grown":{ // eg Alexandria has grown
|
// Some notifications have an exclamation mark after them - is the exclamation mark different in other languages?
|
||||||
|
// If so then we need to deal with that as well
|
||||||
|
// I remember that some languages have upside-down question marks before to mark a question
|
||||||
|
|
||||||
|
" has grown":{
|
||||||
|
}
|
||||||
|
|
||||||
|
" has been founded!":{
|
||||||
|
}
|
||||||
|
|
||||||
|
" has been razed to the ground!":{
|
||||||
|
}
|
||||||
|
|
||||||
|
"We have conquered the city of ":{
|
||||||
|
}
|
||||||
|
|
||||||
|
"Research of ":{ // For technology notifications EG Research of Writing has completed
|
||||||
|
}
|
||||||
|
|
||||||
|
" has completed":{
|
||||||
}
|
}
|
||||||
|
|
||||||
" is starving":{
|
" is starving!":{
|
||||||
|
}
|
||||||
|
|
||||||
|
"has been built in":{
|
||||||
|
}
|
||||||
|
|
||||||
|
"Work has started on":{
|
||||||
|
}
|
||||||
|
|
||||||
|
"Cannot continue work on":{
|
||||||
}
|
}
|
||||||
|
|
||||||
" has expanded its borders":{ // eg Alexandria has grown
|
" has expanded its borders":{
|
||||||
}
|
}
|
||||||
|
|
||||||
"An enemy ":{
|
"An enemy ":{
|
||||||
}
|
}
|
||||||
|
|
||||||
" has attacked our ":{ // eg Alexandria has grown
|
" has attacked ":{
|
||||||
}
|
}
|
||||||
|
|
||||||
" has destroyed our ":{ // eg Alexandria has grown
|
" has destroyed ":{
|
||||||
|
}
|
||||||
|
|
||||||
|
" has captured ":{
|
||||||
|
}
|
||||||
|
|
||||||
|
" revealed near ":{ // As in "Coal revealed near London"
|
||||||
|
}
|
||||||
|
|
||||||
|
"The civilization of":{
|
||||||
|
}
|
||||||
|
"has been destroyed!":{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -6,6 +6,7 @@ import com.unciv.logic.GameInfo
|
|||||||
import com.unciv.logic.city.CityInfo
|
import com.unciv.logic.city.CityInfo
|
||||||
import com.unciv.logic.map.TileInfo
|
import com.unciv.logic.map.TileInfo
|
||||||
import com.unciv.models.gamebasics.unit.UnitType
|
import com.unciv.models.gamebasics.unit.UnitType
|
||||||
|
import com.unciv.ui.utils.tr
|
||||||
import java.util.*
|
import java.util.*
|
||||||
import kotlin.collections.HashMap
|
import kotlin.collections.HashMap
|
||||||
import kotlin.math.max
|
import kotlin.math.max
|
||||||
@ -229,7 +230,7 @@ class Battle(val gameInfo:GameInfo=UnCivGame.Current.gameInfo) {
|
|||||||
return
|
return
|
||||||
} // barbarians don't capture civilians!
|
} // barbarians don't capture civilians!
|
||||||
val capturedUnit = (defender as MapUnitCombatant).unit
|
val capturedUnit = (defender as MapUnitCombatant).unit
|
||||||
capturedUnit.civInfo.addNotification("Our "+defender.getName()+" was captured by an enemy "+attacker.getName(),
|
capturedUnit.civInfo.addNotification("An enemy ".tr()+attacker.getName()+" has captured our "+defender.getName()+"!",
|
||||||
defender.getTile().position, Color.RED)
|
defender.getTile().position, Color.RED)
|
||||||
capturedUnit.civInfo = attacker.getCivilization()
|
capturedUnit.civInfo = attacker.getCivilization()
|
||||||
capturedUnit.owner = capturedUnit.civInfo.civName
|
capturedUnit.owner = capturedUnit.civInfo.civName
|
||||||
|
@ -4,6 +4,7 @@ import com.unciv.logic.city.CityConstructions
|
|||||||
import com.unciv.logic.city.IConstruction
|
import com.unciv.logic.city.IConstruction
|
||||||
import com.unciv.models.stats.NamedStats
|
import com.unciv.models.stats.NamedStats
|
||||||
import com.unciv.models.stats.Stats
|
import com.unciv.models.stats.Stats
|
||||||
|
import com.unciv.ui.utils.tr
|
||||||
|
|
||||||
class Building : NamedStats(), IConstruction{
|
class Building : NamedStats(), IConstruction{
|
||||||
private var baseDescription: String? = null
|
private var baseDescription: String? = null
|
||||||
@ -105,11 +106,11 @@ class Building : NamedStats(), IConstruction{
|
|||||||
if (stats.toString() != "")
|
if (stats.toString() != "")
|
||||||
stringBuilder.appendln(stats)
|
stringBuilder.appendln(stats)
|
||||||
if (this.percentStatBonus != null) {
|
if (this.percentStatBonus != null) {
|
||||||
if (this.percentStatBonus!!.production != 0f) stringBuilder.append("+" + this.percentStatBonus!!.production.toInt() + "% production\r\n")
|
if (this.percentStatBonus!!.production != 0f) stringBuilder.append("+" + this.percentStatBonus!!.production.toInt() + "% "+"Production".tr()+"\r\n")
|
||||||
if (this.percentStatBonus!!.gold != 0f) stringBuilder.append("+" + this.percentStatBonus!!.gold.toInt() + "% gold\r\n")
|
if (this.percentStatBonus!!.gold != 0f) stringBuilder.append("+" + this.percentStatBonus!!.gold.toInt() + "% "+"Gold".tr()+"\r\n")
|
||||||
if (this.percentStatBonus!!.science != 0f) stringBuilder.append("+" + this.percentStatBonus!!.science.toInt() + "% science\r\n")
|
if (this.percentStatBonus!!.science != 0f) stringBuilder.append("+" + this.percentStatBonus!!.science.toInt() + "% "+"Science".tr()+"\r\n")
|
||||||
if (this.percentStatBonus!!.food != 0f) stringBuilder.append("+" + this.percentStatBonus!!.food.toInt() + "% food\r\n")
|
if (this.percentStatBonus!!.food != 0f) stringBuilder.append("+" + this.percentStatBonus!!.food.toInt() + "% "+"Food".tr()+"\r\n")
|
||||||
if (this.percentStatBonus!!.culture != 0f) stringBuilder.append("+" + this.percentStatBonus!!.culture.toInt() + "% culture\r\n")
|
if (this.percentStatBonus!!.culture != 0f) stringBuilder.append("+" + this.percentStatBonus!!.culture.toInt() + "% "+"Culture".tr()+"\r\n")
|
||||||
}
|
}
|
||||||
if (this.greatPersonPoints != null) {
|
if (this.greatPersonPoints != null) {
|
||||||
val gpp = this.greatPersonPoints!!
|
val gpp = this.greatPersonPoints!!
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
package com.unciv.models.stats
|
package com.unciv.models.stats
|
||||||
|
|
||||||
|
import com.unciv.ui.utils.tr
|
||||||
|
|
||||||
|
|
||||||
open class Stats() {
|
open class Stats() {
|
||||||
var production: Float=0f
|
var production: Float=0f
|
||||||
@ -47,7 +49,7 @@ open class Stats() {
|
|||||||
|
|
||||||
override fun toString(): String {
|
override fun toString(): String {
|
||||||
return toHashMap().filter { it.value != 0f }
|
return toHashMap().filter { it.value != 0f }
|
||||||
.map { (if(it.value>0)"+" else "") + it.value.toInt()+" "+it.key.toString() }.joinToString()
|
.map { (if(it.value>0)"+" else "") + it.value.toInt()+" "+it.key.toString().tr() }.joinToString()
|
||||||
}
|
}
|
||||||
|
|
||||||
fun toHashMap(): HashMap<Stat, Float> {
|
fun toHashMap(): HashMap<Stat, Float> {
|
||||||
|
@ -33,7 +33,7 @@ class ConstructionPickerScreen(val city: CityInfo) : PickerScreen() {
|
|||||||
dispose()
|
dispose()
|
||||||
}
|
}
|
||||||
|
|
||||||
rightSideButton.setText("Pick building")
|
rightSideButton.setText("Pick construction".tr())
|
||||||
rightSideButton.addClickListener {
|
rightSideButton.addClickListener {
|
||||||
city.cityConstructions.currentConstruction = selectedProduction!!
|
city.cityConstructions.currentConstruction = selectedProduction!!
|
||||||
city.cityStats.update() // Because maybe we set/removed the science or gold production options.
|
city.cityStats.update() // Because maybe we set/removed the science or gold production options.
|
||||||
|
@ -51,10 +51,10 @@ class UnitActionsTable(val worldScreen: WorldScreen) : Table(){
|
|||||||
private fun getUnitActionButton(unitAction: UnitAction): Button {
|
private fun getUnitActionButton(unitAction: UnitAction): Button {
|
||||||
val actionButton = Button(CameraStageBaseScreen.skin)
|
val actionButton = Button(CameraStageBaseScreen.skin)
|
||||||
actionButton.add(getIconForUnitAction(unitAction.name)).size(20f).pad(5f)
|
actionButton.add(getIconForUnitAction(unitAction.name)).size(20f).pad(5f)
|
||||||
actionButton.add(Label(unitAction.name,CameraStageBaseScreen.skin)
|
actionButton.add(Label(unitAction.name.tr(),CameraStageBaseScreen.skin)
|
||||||
.setFontColor(Color.WHITE)).pad(5f)
|
.setFontColor(Color.WHITE)).pad(5f)
|
||||||
actionButton.pack()
|
actionButton.pack()
|
||||||
actionButton.addClickListener({ unitAction.action(); UnCivGame.Current.worldScreen!!.update() })
|
actionButton.addClickListener({ unitAction.action(); UnCivGame.Current.worldScreen.update() })
|
||||||
if (!unitAction.canAct) actionButton.disable()
|
if (!unitAction.canAct) actionButton.disable()
|
||||||
return actionButton
|
return actionButton
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user