diff options
author | Allan Wang <me@allanwang.ca> | 2017-11-12 04:03:41 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-11-12 04:03:41 -0500 |
commit | 4aed05a8923a7f76799bbaa254f407f7e11fef0b (patch) | |
tree | badd20ad111989ce7bbeed3f7e9ed8df47b94331 /app/src/main/kotlin/com/pitchedapps/frost/settings | |
parent | 2b51bc4bfa86863ed14b550fe3281840587ab038 (diff) | |
download | frost-4aed05a8923a7f76799bbaa254f407f7e11fef0b.tar.gz frost-4aed05a8923a7f76799bbaa254f407f7e11fef0b.tar.bz2 frost-4aed05a8923a7f76799bbaa254f407f7e11fef0b.zip |
Translations (#482)
* Update translators
* Remove translation for some other texts
* Update kau
* Fix build and optimize
* Add translations
* Update readme and changelog
* Clean unnecessary strings
* Fix translations
* Add korean translations for kau
Diffstat (limited to 'app/src/main/kotlin/com/pitchedapps/frost/settings')
-rw-r--r-- | app/src/main/kotlin/com/pitchedapps/frost/settings/Appearance.kt | 12 | ||||
-rw-r--r-- | app/src/main/kotlin/com/pitchedapps/frost/settings/Experimental.kt | 4 |
2 files changed, 5 insertions, 11 deletions
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/settings/Appearance.kt b/app/src/main/kotlin/com/pitchedapps/frost/settings/Appearance.kt index 9a2eddb6..382b2dad 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/settings/Appearance.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/settings/Appearance.kt @@ -23,15 +23,13 @@ fun SettingsActivity.getAppearancePrefs(): KPrefAdapterBuilder.() -> Unit = { header(R.string.theme_customization) text(R.string.theme, { Prefs.theme }, { Prefs.theme = it }) { - onClick = { - _, _, item -> + onClick = { _, _, item -> materialDialogThemed { title(R.string.theme) items(Theme.values() .map { if (it == Theme.CUSTOM && !IS_FROST_PRO) R.string.custom_pro else it.textRes } .map { string(it) }) - itemsCallbackSingleChoice(item.pref) { - _, _, which, _ -> + itemsCallbackSingleChoice(item.pref) { _, _, which, _ -> if (item.pref != which) { if (which == Theme.CUSTOM.ordinal && !IS_FROST_PRO) { purchasePro() @@ -121,13 +119,11 @@ fun SettingsActivity.getAppearancePrefs(): KPrefAdapterBuilder.() -> Unit = { text(R.string.main_activity_layout, { Prefs.mainActivityLayoutType }, { Prefs.mainActivityLayoutType = it }) { textGetter = { string(Prefs.mainActivityLayout.titleRes) } - onClick = { - _, _, item -> + onClick = { _, _, item -> materialDialogThemed { title(R.string.set_main_activity_layout) items(MainActivityLayout.values.map { string(it.titleRes) }) - itemsCallbackSingleChoice(item.pref) { - _, _, which, _ -> + itemsCallbackSingleChoice(item.pref) { _, _, which, _ -> if (item.pref != which) { item.pref = which shouldRestartMain() diff --git a/app/src/main/kotlin/com/pitchedapps/frost/settings/Experimental.kt b/app/src/main/kotlin/com/pitchedapps/frost/settings/Experimental.kt index a1b459fb..aad2fe9a 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/settings/Experimental.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/settings/Experimental.kt @@ -25,7 +25,6 @@ fun SettingsActivity.getExperimentalPrefs(): KPrefAdapterBuilder.() -> Unit = { // Experimental content starts here ------------------ - // Experimental content ends here -------------------- checkbox(R.string.verbose_logging, { Prefs.verboseLogging }, { @@ -40,8 +39,7 @@ fun SettingsActivity.getExperimentalPrefs(): KPrefAdapterBuilder.() -> Unit = { plainText(R.string.restart_frost) { descRes = R.string.restart_frost_desc - onClick = { - _, _, _ -> + onClick = { _, _, _ -> setFrostResult(MainActivity.REQUEST_RESTART_APPLICATION) finish() true |