mirror of
https://github.com/yairm210/Unciv.git
synced 2025-02-24 13:41:08 +07:00
Fixed translation order
This commit is contained in:
parent
86f2560d7e
commit
46b1516159
@ -350,10 +350,6 @@ fun String.tr(): String {
|
||||
return fullyTranslatedString
|
||||
}
|
||||
|
||||
if (contains('{')) { // Translating partial sentences
|
||||
return curlyBraceRegex.replace(this) { it.groups[1]!!.value.tr() }
|
||||
}
|
||||
|
||||
// There might still be optimization potential here!
|
||||
if (contains('[')) { // Placeholders!
|
||||
/**
|
||||
@ -403,6 +399,12 @@ fun String.tr(): String {
|
||||
return languageSpecificPlaceholder // every component is already translated
|
||||
}
|
||||
|
||||
|
||||
if (contains('{')) { // Translating partial sentences
|
||||
return curlyBraceRegex.replace(this) { it.groups[1]!!.value.tr() }
|
||||
}
|
||||
|
||||
|
||||
if (Stats.isStats(this)) return Stats.parse(this).toString()
|
||||
|
||||
val translation = UncivGame.Current.translations.getText(this, language, TranslationActiveModsCache.activeMods)
|
||||
|
Loading…
Reference in New Issue
Block a user