mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-30 22:58:50 +07:00
We no longer need the ugly "Missing translations" dropdown in the Options, now that all missing translations are super easy to find in the translation files themselves =)
This commit is contained in:
@ -49,8 +49,10 @@ class UncivGame(val version: String) : Game() {
|
||||
|
||||
override fun create() {
|
||||
Gdx.input.setCatchKey(Input.Keys.BACK, true)
|
||||
if (Gdx.app.type != Application.ApplicationType.Desktop)
|
||||
if (Gdx.app.type != Application.ApplicationType.Desktop) {
|
||||
viewEntireMapForDebug = false
|
||||
rewriteTranslationFiles=false
|
||||
}
|
||||
Current = this
|
||||
|
||||
|
||||
@ -140,12 +142,11 @@ class UncivGame(val version: String) : Game() {
|
||||
if(!isInitialized) return // The stuff from Create() is still happening, so the main screen will load eventually
|
||||
ImageGetter.refreshAltas()
|
||||
|
||||
// This is to solve a rare problem that I still don't understand its cause -
|
||||
// This is to solve a rare problem -
|
||||
// Sometimes, resume() is called and the gameInfo doesn't have any civilizations.
|
||||
// My guess is that resume() was called but create() wasn't, or perhaps was aborted too early,
|
||||
// and the original (and empty) initial GameInfo remained.
|
||||
// if(!::gameInfo.isInitialized || gameInfo.civilizations.isEmpty())
|
||||
// return autoLoadGame()
|
||||
// Can happen if you resume to the language picker screen for instance.
|
||||
if(!::gameInfo.isInitialized || gameInfo.civilizations.isEmpty())
|
||||
return autoLoadGame()
|
||||
|
||||
if(::worldScreen.isInitialized) worldScreen.dispose() // I hope this will solve some of the many OuOfMemory exceptions...
|
||||
loadGame(gameInfo)
|
||||
|
@ -80,7 +80,8 @@ class Translations : LinkedHashMap<String, TranslationEntry>(){
|
||||
languages.remove("Thai") // Until we figure out what to do with it
|
||||
|
||||
return languages.distinct()
|
||||
.filter { Gdx.files.internal("jsons/translationsByLanguage/$it.properties").exists() }
|
||||
.filter { it!="Thai" &&
|
||||
Gdx.files.internal("jsons/translationsByLanguage/$it.properties").exists() }
|
||||
}
|
||||
|
||||
fun readAllLanguagesTranslation() {
|
||||
|
@ -7,7 +7,6 @@ import com.badlogic.gdx.scenes.scene2d.ui.*
|
||||
import com.badlogic.gdx.scenes.scene2d.utils.ChangeListener
|
||||
import com.badlogic.gdx.utils.Array
|
||||
import com.unciv.UncivGame
|
||||
import com.unciv.models.translations.Translations
|
||||
import com.unciv.models.translations.tr
|
||||
import com.unciv.ui.utils.*
|
||||
import com.unciv.ui.worldscreen.WorldScreen
|
||||
@ -288,18 +287,6 @@ class WorldScreenOptionsTable(val worldScreen:WorldScreen) : PopupTable(worldScr
|
||||
}
|
||||
})
|
||||
|
||||
if (languageSelectBox.selected.percentComplete != 100) {
|
||||
innerTable.add("Missing translations:".toLabel()).pad(5f).colspan(2).row()
|
||||
val missingTextSelectBox = SelectBox<String>(skin)
|
||||
val missingTextArray = Array<String>()
|
||||
val currentLanguage = UncivGame.Current.settings.language
|
||||
UncivGame.Current.translations.filter { !it.value.containsKey(currentLanguage) }
|
||||
.forEach { missingTextArray.add(it.key) }
|
||||
missingTextSelectBox.items = missingTextArray
|
||||
missingTextSelectBox.selected = "Untranslated texts"
|
||||
innerTable.add(missingTextSelectBox).pad(10f)
|
||||
.width(screen.stage.width / 2).colspan(2).row()
|
||||
}
|
||||
}
|
||||
|
||||
fun selectLanguage(){
|
||||
|
Reference in New Issue
Block a user