mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-28 06:16:37 -04: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:
parent
2b654ecdeb
commit
7d1eaf4338
@ -49,8 +49,10 @@ class UncivGame(val version: String) : Game() {
|
|||||||
|
|
||||||
override fun create() {
|
override fun create() {
|
||||||
Gdx.input.setCatchKey(Input.Keys.BACK, true)
|
Gdx.input.setCatchKey(Input.Keys.BACK, true)
|
||||||
if (Gdx.app.type != Application.ApplicationType.Desktop)
|
if (Gdx.app.type != Application.ApplicationType.Desktop) {
|
||||||
viewEntireMapForDebug = false
|
viewEntireMapForDebug = false
|
||||||
|
rewriteTranslationFiles=false
|
||||||
|
}
|
||||||
Current = this
|
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
|
if(!isInitialized) return // The stuff from Create() is still happening, so the main screen will load eventually
|
||||||
ImageGetter.refreshAltas()
|
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.
|
// 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,
|
// Can happen if you resume to the language picker screen for instance.
|
||||||
// and the original (and empty) initial GameInfo remained.
|
if(!::gameInfo.isInitialized || gameInfo.civilizations.isEmpty())
|
||||||
// if(!::gameInfo.isInitialized || gameInfo.civilizations.isEmpty())
|
return autoLoadGame()
|
||||||
// return autoLoadGame()
|
|
||||||
|
|
||||||
if(::worldScreen.isInitialized) worldScreen.dispose() // I hope this will solve some of the many OuOfMemory exceptions...
|
if(::worldScreen.isInitialized) worldScreen.dispose() // I hope this will solve some of the many OuOfMemory exceptions...
|
||||||
loadGame(gameInfo)
|
loadGame(gameInfo)
|
||||||
|
@ -80,7 +80,8 @@ class Translations : LinkedHashMap<String, TranslationEntry>(){
|
|||||||
languages.remove("Thai") // Until we figure out what to do with it
|
languages.remove("Thai") // Until we figure out what to do with it
|
||||||
|
|
||||||
return languages.distinct()
|
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() {
|
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.scenes.scene2d.utils.ChangeListener
|
||||||
import com.badlogic.gdx.utils.Array
|
import com.badlogic.gdx.utils.Array
|
||||||
import com.unciv.UncivGame
|
import com.unciv.UncivGame
|
||||||
import com.unciv.models.translations.Translations
|
|
||||||
import com.unciv.models.translations.tr
|
import com.unciv.models.translations.tr
|
||||||
import com.unciv.ui.utils.*
|
import com.unciv.ui.utils.*
|
||||||
import com.unciv.ui.worldscreen.WorldScreen
|
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(){
|
fun selectLanguage(){
|
||||||
|
Loading…
x
Reference in New Issue
Block a user