diff --git a/core/src/com/unciv/UncivGame.kt b/core/src/com/unciv/UncivGame.kt index 5833625b84..ece2a21be6 100644 --- a/core/src/com/unciv/UncivGame.kt +++ b/core/src/com/unciv/UncivGame.kt @@ -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) diff --git a/core/src/com/unciv/models/translations/Translations.kt b/core/src/com/unciv/models/translations/Translations.kt index 0135ff67b2..27b16db700 100644 --- a/core/src/com/unciv/models/translations/Translations.kt +++ b/core/src/com/unciv/models/translations/Translations.kt @@ -80,7 +80,8 @@ class Translations : LinkedHashMap(){ 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() { diff --git a/core/src/com/unciv/ui/worldscreen/optionstable/WorldScreenOptionsTable.kt b/core/src/com/unciv/ui/worldscreen/optionstable/WorldScreenOptionsTable.kt index e720287000..3d3fd5703f 100644 --- a/core/src/com/unciv/ui/worldscreen/optionstable/WorldScreenOptionsTable.kt +++ b/core/src/com/unciv/ui/worldscreen/optionstable/WorldScreenOptionsTable.kt @@ -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(skin) - val missingTextArray = Array() - 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(){