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