Separate 'en' locale into 'en-US' and 'en-GB' for displaying dates

This commit is contained in:
inorichi 2018-04-22 13:15:47 +02:00
parent e7e1a9bf50
commit 968f4a69e8
2 changed files with 4 additions and 3 deletions

View File

@ -29,8 +29,9 @@ class SettingsGeneralController : SettingsController() {
listPreference { listPreference {
key = Keys.lang key = Keys.lang
titleRes = R.string.pref_language titleRes = R.string.pref_language
entryValues = arrayOf("", "ar", "bg", "bn", "de", "en", "es", "fr", "hi", "hu", "id", entryValues = arrayOf("", "ar", "bg", "bn", "de", "en-US", "en-GB", "es", "fr", "hi",
"it", "ja", "ko", "lv", "ms", "nl", "pl", "pt", "pt-BR", "ro", "ru", "vi") "hu", "id", "it", "ja", "ko", "lv", "ms", "nl", "pl", "pt", "pt-BR", "ro",
"ru", "vi")
entries = entryValues.map { value -> entries = entryValues.map { value ->
val locale = LocaleHelper.getLocaleFromString(value.toString()) val locale = LocaleHelper.getLocaleFromString(value.toString())
locale?.getDisplayName(locale)?.capitalize() ?: locale?.getDisplayName(locale)?.capitalize() ?:

View File

@ -7,7 +7,7 @@ buildscript {
google() google()
} }
dependencies { dependencies {
classpath 'com.android.tools.build:gradle:3.1.0' classpath 'com.android.tools.build:gradle:3.1.1'
classpath 'com.github.ben-manes:gradle-versions-plugin:0.17.0' classpath 'com.github.ben-manes:gradle-versions-plugin:0.17.0'
classpath 'com.github.zellius:android-shortcut-gradle-plugin:0.1.2' classpath 'com.github.zellius:android-shortcut-gradle-plugin:0.1.2'
// NOTE: Do not place your application dependencies here; they belong // NOTE: Do not place your application dependencies here; they belong