Effect of rationalism was not visible in city UI: Translations patch (#2442)

* Effect of rationalism was not visible in city UI

* Effect of rationalism was not visible in city UI - translations patch
This commit is contained in:
SomeTroglodyte 2020-04-17 09:21:11 +02:00 committed by GitHub
parent 14991c3261
commit cb87ae94a8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
25 changed files with 38 additions and 27 deletions

View file

@ -600,7 +600,7 @@ Great person points = Body velké osobnosti
Current points = Získané body
Points per turn = Bodů za tah
Convert production to gold at a rate of 4 to 1 = Převést produkci na zlato v poměru 4 ku 1
Convert production to science at a rate of 4 to 1 = Převést produkci na výzkum v poměru 4 ku 1
Convert production to science at a rate of [rate] to 1 = Převést produkci na výzkum v poměru [rate] ku 1
The city will not produce anything. = Město nebude nic vyrábět.
# Technology UI
@ -679,7 +679,7 @@ Science victory = Výzkumné vítězství
Cultural victory = Kulturní vítězství
Conquest victory = Vítězství v boji
Complete all the spaceship parts\n to win! = Vybudováním všech šesti části vesmírné lodi\n dosáhneme vítězství!
Complete 5 policy branches\n to win! = Zkompletováním 4 větví Sociální politiky\n dosáhneme vítězství!
Complete 5 policy branches\n to win! = Zkompletováním 5 větví Sociální politiky\n dosáhneme vítězství!
Destroy all enemies\n to win! = Zničením všech ostatních civilizací\n dosáhneme vítězství!
You have won a scientific victory! = Dosáhli jste vítězství ve hře díky Výzkumu!
You have won a cultural victory! = Dosáhli jste vítězství ve hře díky Kulturní vyspělosti!

View file

@ -972,7 +972,7 @@ Points per turn =
# Requires translation!
Convert production to gold at a rate of 4 to 1 =
# Requires translation!
Convert production to science at a rate of 4 to 1 =
Convert production to science at a rate of [rate] to 1 =
# Requires translation!
The city will not produce anything. =

View file

@ -1114,7 +1114,7 @@ Points per turn =
# Requires translation!
Convert production to gold at a rate of 4 to 1 =
# Requires translation!
Convert production to science at a rate of 4 to 1 =
Convert production to science at a rate of [rate] to 1 =
# Requires translation!
The city will not produce anything. =

View file

@ -600,7 +600,7 @@ Great person points = Points de personnage illustre
Current points = Nombre actuel de points
Points per turn = Points par tour
Convert production to gold at a rate of 4 to 1 = Convertit la production en or au taux de 4 pour 1
Convert production to science at a rate of 4 to 1 = Convertit la production en science au taux de 4 pour 1
Convert production to science at a rate of [rate] to 1 = Convertit la production en science au taux de [rate] pour 1
The city will not produce anything. = La cité ne produira plus rien
# Technology UI

View file

@ -599,8 +599,8 @@ Are you sure you want to sell this [building]? = [building] wirklich verkaufen?
Great person points = Punkte für Große Persönlichkeit
Current points = Aktuelle Punkte
Points per turn = Punkte pro Runde
Convert production to gold at a rate of 4 to 1 = Verwandel Produktion zu Gold (4:1)
Convert production to science at a rate of 4 to 1 = Verwandel Produktion zu Wissenschaft (4:1)
Convert production to gold at a rate of 4 to 1 = Konvertiert Produktion zu Gold (4:1)
Convert production to science at a rate of [rate] to 1 = Konvertiert Produktion zu Wissenschaft ([rate]:1)
The city will not produce anything. = Die Stadt produziert nichts.
# Technology UI

View file

@ -670,7 +670,7 @@ Great person points = Poin orang hebat
Current points = Poin saat ini
Points per turn = Poin per giliran
Convert production to gold at a rate of 4 to 1 = Konversi produksi ke emas dalam taksiran 4 sampai 1
Convert production to science at a rate of 4 to 1 = Konversi produksi ke ilmu pengetahuan dalam taksiran 4 sampai 1
Convert production to science at a rate of [rate] to 1 = Konversi produksi ke ilmu pengetahuan dalam taksiran [rate] sampai 1
The city will not produce anything. = Kota ini tidak akan memproduksi apapun.
# Technology UI

View file

@ -600,7 +600,7 @@ Great person points = Punti Grande Personaggio
Current points = Punti attuali
Points per turn = Punti per turno
Convert production to gold at a rate of 4 to 1 = Converte la Produzione a Oro a un tasso di 4 a 1
Convert production to science at a rate of 4 to 1 = Converte la Produzione a Scienza a un tasso di 4 a 1
Convert production to science at a rate of [rate] to 1 = Converte la Produzione a Scienza a un tasso di [rate] a 1
The city will not produce anything. = La città non produrrà nulla
# Technology UI

View file

@ -642,7 +642,7 @@ Great person points = 偉人ポイント
Current points = 今のポイント
Points per turn = ターンごとのポイント
Convert production to gold at a rate of 4 to 1 = 生産力を4対1の割合でゴールドに変換する
Convert production to science at a rate of 4 to 1 = 生産力を4対1の割合で科学力に変換する
Convert production to science at a rate of [rate] to 1 = 生産力を[rate]対1の割合で科学力に変換する
The city will not produce anything. = 都市は何も生産しません
# Technology UI

View file

@ -712,7 +712,7 @@ Great person points = 위인 포인트
Current points = 현재 포인트
Points per turn = 턴당 포인트
Convert production to gold at a rate of 4 to 1 = 생산력의 1/4에 해당하는 양의 금 생산
Convert production to science at a rate of 4 to 1 = 생산력의 1/4에 해당하는 양의 과학 생산
Convert production to science at a rate of [rate] to 1 = 생산력의 1/[rate]에 해당하는 양의 과학 생산
The city will not produce anything. = 도시 생산 중단하기
# Technology UI

View file

@ -1068,7 +1068,7 @@ Points per turn =
# Requires translation!
Convert production to gold at a rate of 4 to 1 =
# Requires translation!
Convert production to science at a rate of 4 to 1 =
Convert production to science at a rate of [rate] to 1 =
# Requires translation!
The city will not produce anything. =

View file

@ -603,7 +603,7 @@ Great person points = Punkty wielkiego człowieka
Current points = Obecne punkty
Points per turn = Punkty na turę
Convert production to gold at a rate of 4 to 1 = Przetwarzanie produkcji na złoto po kursie 4 do 1
Convert production to science at a rate of 4 to 1 = Przetwarzanie produkcji na naukę po kursie 4 do 1
Convert production to science at a rate of [rate] to 1 = Przetwarzanie produkcji na naukę po kursie [rate] do 1
The city will not produce anything. = Miasto niczego nie produkuje
# Technology UI

View file

@ -728,7 +728,7 @@ Great person points = Pontos de grandes pessoas
Current points = Pontos atuais
Points per turn = Pontos por turno
Convert production to gold at a rate of 4 to 1 = Coverter produção em ouro a uma taxa de 4 para 1
Convert production to science at a rate of 4 to 1 = Coverter produção em ciência a uma taxa de 4 para 1
Convert production to science at a rate of [rate] to 1 = Coverter produção em ciência a uma taxa de [rate] para 1
The city will not produce anything. = A cidade não vai produzir nada.
# Technology UI

View file

@ -726,7 +726,7 @@ Great person points = Puncte pentru oameni extraordinari
Current points = Puncte actuale
Points per turn = Puncte pe tură
Convert production to gold at a rate of 4 to 1 = Convertește producție în aur cu o rată de 4 la 1
Convert production to science at a rate of 4 to 1 = Convertește producție în știință cu o rată de 4 la 1
Convert production to science at a rate of [rate] to 1 = Convertește producție în știință cu o rată de [rate] la 1
The city will not produce anything. = Acest oraș nu va produce nimic
# Technology UI

View file

@ -613,7 +613,7 @@ Great person points = Очки великих людей
Current points = Очков сейчас
Points per turn = Очки за ход
Convert production to gold at a rate of 4 to 1 = Обмен производства на золото 4 к 1
Convert production to science at a rate of 4 to 1 = Обмен производства на науку 4 к 1
Convert production to science at a rate of [rate] to 1 = Обмен производства на науку [rate] к 1
The city will not produce anything. = Город ничего не будет производить.
# Technology UI

View file

@ -616,7 +616,7 @@ Great person points = 伟人点数
Current points = 当前点数
Points per turn = 获得点数/回合
Convert production to gold at a rate of 4 to 1 = 按4:1的比例转化产能为金钱
Convert production to science at a rate of 4 to 1 = 按4:1的比例转化产能为科研
Convert production to science at a rate of [rate] to 1 = 按[rate]:1的比例转化产能为科研
The city will not produce anything. = 城市将不会建造/组建任何项目
# Technology UI

View file

@ -681,7 +681,7 @@ Great person points = Puntos de Gran Personaje
Current points = Puntos actuales
Points per turn = Puntos por turno
Convert production to gold at a rate of 4 to 1 = Convertir la producción en oro a una tasa de 4 a 1
Convert production to science at a rate of 4 to 1 = Convertir la producción en ciencia a una tasa de 4 a 1
Convert production to science at a rate of [rate] to 1 = Convertir la producción en ciencia a una tasa de [rate] a 1
The city will not produce anything. = La ciudad no producirá nada.
# Technology UI

View file

@ -693,7 +693,7 @@ Great person points = แต้มบุคคลผู้ยิ่งใหญ
Current points = แต้มปัจจุบัน
Points per turn = แต้มต่อเทิร์น
Convert production to gold at a rate of 4 to 1 = เปลี่ยนการผลิตไปเป็นทองที่อัตรา 4 ถึง 1
Convert production to science at a rate of 4 to 1 = เปลี่ยนการผลิตไปเป็นวิทยาศาสตร์ที่อัตรา 4 ถึง 1
Convert production to science at a rate of [rate] to 1 = เปลี่ยนการผลิตไปเป็นวิทยาศาสตร์ที่อัตรา [rate] ถึง 1
The city will not produce anything. = เมืองจะไม่ผลิตอะไรเลย
# Technology UI

View file

@ -601,7 +601,7 @@ Great person points = 偉人點數
Current points = 目前點數
Points per turn = 獲得點數/回合
Convert production to gold at a rate of 4 to 1 = 按4:1的比例轉化產能為金錢
Convert production to science at a rate of 4 to 1 = 按4:1的比例轉化產能為科研
Convert production to science at a rate of [rate] to 1 = 按[rate]:1的比例轉化產能為科研
The city will not produce anything. = 城市將不會建造/訓練任何項目
# Technology UI

View file

@ -614,7 +614,7 @@ Great person points = Harika insan puanları
Current points = Mevcut puan
Points per turn = Tur başına puan
Convert production to gold at a rate of 4 to 1 = Üretimi 4'e 1 oranında altına çevir
Convert production to science at a rate of 4 to 1 = Üretimi 4'e 1 oranında bilime dönüştür
Convert production to science at a rate of [rate] to 1 = Üretimi [rate]'e 1 oranında bilime dönüştür
The city will not produce anything. = Şehir hiçbir şey üretmeyecek
# Technology UI

View file

@ -600,7 +600,7 @@ Great person points = Очки великих людей
Current points = Поточні очки
Points per turn = Очки за хід
Convert production to gold at a rate of 4 to 1 = Конвертує виробництво в золото з курсом 4 до 1
Convert production to science at a rate of 4 to 1 = Конвертує виробництво в науку з курсом 4 до 1
Convert production to science at a rate of [rate] to 1 = Конвертує виробництво в науку з курсом [rate] до 1
The city will not produce anything. = Місто не буде нічого виробляти.
# Technology UI

View file

@ -600,7 +600,7 @@ Great person points =
Current points =
Points per turn =
Convert production to gold at a rate of 4 to 1 =
Convert production to science at a rate of 4 to 1 =
Convert production to science at a rate of [rate] to 1 =
The city will not produce anything. =
# Technology UI

View file

@ -61,4 +61,6 @@ object Constants {
const val tutorialPopupNamePrefix = "Tutorial: "
const val close = "Close"
const val scienceConversionEffect = "Production to science conversion in cities increased by 33%"
}

View file

@ -64,7 +64,7 @@ class CityStats {
"Gold" -> stats.gold += production / 4
"Science" -> {
var scienceProduced = production / 4
if (cityInfo.civInfo.policies.hasEffect("Production to science conversion in cities increased by 33%")) scienceProduced *= 1.33f
if (cityInfo.civInfo.policies.hasEffect(Constants.scienceConversionEffect)) scienceProduced *= 1.33f
stats.science += scienceProduced
}
}

View file

@ -1,5 +1,6 @@
package com.unciv.logic.city
import com.unciv.Constants
import com.unciv.logic.civilization.CivilizationInfo
import com.unciv.models.stats.INamed
import com.unciv.models.translations.tr
@ -17,19 +18,27 @@ interface IConstruction : INamed {
open class PerpetualConstruction(override var name: String, val description: String) : IConstruction{
open class PerpetualConstruction(override var name: String, val description: String) : IConstruction {
override fun shouldBeDisplayed(cityConstructions: CityConstructions): Boolean {
return isBuildable(cityConstructions)
}
open fun getProductionTooltip(cityInfo: CityInfo) : String
= "\r\n${(cityInfo.cityStats.currentCityStats.production / CONVERSION_RATE).roundToInt()}/${"{turn}".tr()}"
open fun getConversionRate(cityInfo: CityInfo) : Int
= CONVERSION_RATE
companion object {
const val CONVERSION_RATE: Int = 4
val science = object : PerpetualConstruction("Science", "Convert production to science at a rate of $CONVERSION_RATE to 1") {
const val CONVERSION_RATE_WITH_POLICY = CONVERSION_RATE * 3 / 4
val science = object : PerpetualConstruction("Science", "Convert production to science at a rate of [rate] to 1") {
override fun isBuildable(cityConstructions: CityConstructions): Boolean {
return cityConstructions.cityInfo.civInfo.tech.getTechUniques().contains("Enables conversion of city production to science")
}
override fun getProductionTooltip(cityInfo: CityInfo): String {
return "\r\n${(cityInfo.cityStats.currentCityStats.production / getConversionRate(cityInfo)).roundToInt()}/${"{turn}".tr()}"
}
override fun getConversionRate(cityInfo: CityInfo): Int
= if (cityInfo.civInfo.policies.hasEffect(Constants.scienceConversionEffect)) CONVERSION_RATE_WITH_POLICY else CONVERSION_RATE
}
val gold = object : PerpetualConstruction("Gold", "Convert production to gold at a rate of $CONVERSION_RATE to 1") {
override fun isBuildable(cityConstructions: CityConstructions): Boolean {

View file

@ -66,7 +66,7 @@ class ConstructionInfoTable(val city: CityInfo): Table() {
else if (construction is Building)
description = construction.getDescription(true, city.civInfo, city.civInfo.gameInfo.ruleSet)
else if(construction is PerpetualConstruction)
description = construction.description.tr()
description = construction.description.replace("[rate]","[${construction.getConversionRate(city)}]") .tr()
else description="" // Should never happen
val descriptionLabel = description.toLabel()