Unit name translation (#4635)

This commit is contained in:
SomeTroglodyte 2021-07-25 18:05:56 +02:00 committed by GitHub
parent 966f70d0d4
commit 3e482182b3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 12 additions and 20 deletions

View File

@ -3336,20 +3336,11 @@ Send your best explorers on a quest to discover Natural Wonders. Nobody knows th
#################### Lines from Religions from Civ V - Vanilla ####################
# Requires translation!
Buddhism =
# Requires translation!
Christianity =
# Requires translation!
Hinduism =
# Requires translation!
Islam =
# Requires translation!
Taoism =
Buddhism = Buddhismus
Christianity = Christentum
Hinduism = Hinduismus
Islam = Islam
Taoism = Taoismus
#################### Lines from Specialists from Civ V - Vanilla ####################

View File

@ -89,11 +89,14 @@ class MapUnit {
/**
* Name which should be displayed in UI
*
* Note this is translated after being returned from this function, so let's pay
* attention to combined names (renamed units, religion).
*/
fun displayName(): String {
val name = if (instanceName == null) name
else "$instanceName (${name})"
return if (religion != null && maxReligionSpreads() > 0) "$name ($religion)"
else "$instanceName ({${name}})"
return if (religion != null && maxReligionSpreads() > 0) "[$name] ([$religion])"
else name
}

View File

@ -18,8 +18,6 @@ class IdleUnitButton (
val image = ImageGetter.getImage("OtherIcons/BackArrow")
fun hasIdleUnits() = unitTable.worldScreen.viewingCiv.getIdleUnits().any()
init {
val imageSize = 25f
if(!previous) {

View File

@ -91,7 +91,7 @@ class UnitTable(val worldScreen: WorldScreen) : Table(){
val position = selectedUnit?.currentTile?.position
?: selectedCity?.location
if (position != null)
worldScreen.mapHolder.setCenterPosition(position, false, false)
worldScreen.mapHolder.setCenterPosition(position, immediately = false, selectUnit = false)
}
}).expand()
@ -109,7 +109,7 @@ class UnitTable(val worldScreen: WorldScreen) : Table(){
}
}
if (prevIdleUnitButton.hasIdleUnits()) { // more efficient to do this check once for both
if (worldScreen.viewingCiv.getIdleUnits().any()) { // more efficient to do this check once for both
prevIdleUnitButton.enable()
nextIdleUnitButton.enable()
} else {