Remove en-GB option since we don't actually localize different English locales
(cherry picked from commit 0cb042cd93d5bd2ad249a71af7d7bf87da5a6a89) # Conflicts: # app/build.gradle.kts
This commit is contained in:
parent
ad2bbd0e3c
commit
aa23de77bc
@ -229,6 +229,11 @@ object Migrations {
|
||||
putString(PreferenceKeys.librarySortingDirection, newSortingDirection.name)
|
||||
}
|
||||
}
|
||||
if (oldVersion < 65) {
|
||||
if (preferences.lang().get() in listOf("en-US", "en-GB")) {
|
||||
preferences.lang().set("en")
|
||||
}
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
|
@ -290,7 +290,7 @@ class PreferencesHelper(val context: Context) {
|
||||
fun downloadNewCategories() = flowPrefs.getStringSet(Keys.downloadNewCategories, emptySet())
|
||||
fun downloadNewCategoriesExclude() = flowPrefs.getStringSet(Keys.downloadNewCategoriesExclude, emptySet())
|
||||
|
||||
fun lang() = prefs.getString(Keys.lang, "")
|
||||
fun lang() = flowPrefs.getString(Keys.lang, "")
|
||||
|
||||
fun defaultCategory() = prefs.getInt(Keys.defaultCategory, -1)
|
||||
|
||||
|
@ -191,8 +191,7 @@ class SettingsGeneralController : SettingsController() {
|
||||
"eo",
|
||||
"es",
|
||||
"es-419",
|
||||
"en-US",
|
||||
"en-GB",
|
||||
"en",
|
||||
"fa",
|
||||
"fi",
|
||||
"fil",
|
||||
|
@ -25,7 +25,7 @@ object LocaleHelper {
|
||||
/**
|
||||
* The application's locale. When it's null, the system locale is used.
|
||||
*/
|
||||
private var appLocale = getLocaleFromString(preferences.lang())
|
||||
private var appLocale = getLocaleFromString(preferences.lang().get())
|
||||
|
||||
/**
|
||||
* The currently applied locale. Used to avoid losing the selected language after a non locale
|
||||
|
@ -329,6 +329,10 @@ object EXHMigrations {
|
||||
if (oldVersion under 21) {
|
||||
// Setup EH updater task after migrating to WorkManager
|
||||
EHentaiUpdateWorker.scheduleBackground(context)
|
||||
|
||||
if (preferences.lang().get() in listOf("en-US", "en-GB")) {
|
||||
preferences.lang().set("en")
|
||||
}
|
||||
}
|
||||
|
||||
// if (oldVersion under 1) { } (1 is current release version)
|
||||
|
Loading…
x
Reference in New Issue
Block a user